Skip to main content
GET
/
Search the web
curl --request GET \
  --url https://api.search.tinyfish.ai/ \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.search.tinyfish.ai/"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.search.tinyfish.ai/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.search.tinyfish.ai/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.search.tinyfish.ai/"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.search.tinyfish.ai/")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.search.tinyfish.ai/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "query": "web automation tools",
  "results": [
    {
      "position": 1,
      "site_name": "example.com",
      "snippet": "Top web automation tools for 2026...",
      "title": "Best Web Automation Tools",
      "url": "https://example.com/web-automation-tools"
    }
  ],
  "total_results": 10,
  "page": 0
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key from the API Keys page.

Query Parameters

query
string
required

Search query

Required string length: 1 - 2000
Example:

"web automation tools"

purpose
string

Why this search is being run — the underlying goal or task the results will be used for. Used to better rank results against your intent.

Required string length: 1 - 2000
Example:

"Find an open-source library for parsing PDF invoices in Python"

location
string

Country code for geo-targeted results

Example:

"US"

language
string

Language code for result language

Example:

"en"

domain_type
enum<string>

Type of search to perform: "web" for standard results, "news" for news articles, "research_paper" for academic papers. Defaults to "web".

Available options:
web,
news,
research_paper
Example:

"news"

after_date
string

Return results after this date (YYYY-MM-DD)

Example:

"2024-01-01"

before_date
string

Return results before this date (YYYY-MM-DD)

Example:

"2024-12-31"

recency_minutes
integer

Return results from the past N minutes (1 to 5,256,000).

Required range: 1 <= x <= 5256000
Example:

60

page
integer | null

Page number for pagination, starting from 0 (max 10)

Required range: 0 <= x <= 10
Example:

2

include_thumbnail
enum<string>

When "true", each result includes a thumbnail_url when available. Defaults to false.

Available options:
true,
false
Example:

"true"

fetch
string

JSON-encoded fetch configuration object.

Maximum string length: 256
Example:

"{}"

Response

Search completed successfully.

Search response with results

query
string
required

The search query that was executed

Example:

"web automation tools"

results
object[]
required

Array of search results

total_results
integer
required

Total number of results

Example:

10

page
integer
required

The current page number, starting from 0

Example:

0