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>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}Search the web
Search the web and get structured results. Returns ranked results with titles, snippets, and URLs.
Location and language resolution:
- If
locationis set butlanguageis not, the language auto-resolves to the most predominantly used language in that country. - If
languageis set butlocationis not, the location auto-resolves to the country where that language is most predominantly used. - If neither
locationnorlanguageis set, defaults toUSanden.
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>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}Authorizations
API key for authentication. Get your key from the API Keys page.
Query Parameters
Search query
1 - 2000"web automation tools"
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.
1 - 2000"Find an open-source library for parsing PDF invoices in Python"
Country code for geo-targeted results
"US"
Language code for result language
"en"
Comma-separated list of domains to restrict results to
"github.com,arxiv.org"
Comma-separated list of domains to exclude from results
"pinterest.com,quora.com"
Type of search to perform: "web" for standard results, "news" for news articles, "research_paper" for academic papers. Defaults to "web".
web, news, research_paper "news"
Return results after this date (YYYY-MM-DD)
"2024-01-01"
Return results before this date (YYYY-MM-DD)
"2024-12-31"
Return results from the past N minutes (1 to 5,256,000).
1 <= x <= 525600060
Return research papers published on or after this year (0-9999, inclusive). Only supported for domain_type=research_paper.
0 <= x <= 99992019
Return research papers published on or before this year (0-9999, inclusive). Only supported for domain_type=research_paper.
0 <= x <= 99992022
Page number for pagination, starting from 0 (max 10)
0 <= x <= 102
When "true", each result includes a thumbnail_url when available. Defaults to false.
true, false "true"
JSON-encoded fetch configuration object.
256"{}"
Response
Search completed successfully.
Search response with results
The search query that was executed
"web automation tools"
Array of search results
Show child attributes
Show child attributes
Total number of results
10
The current page number, starting from 0
0
Request correlation ID, also returned as the X-Request-ID response header. Present only when any result carries a fetch_error; include it when reporting failed fetches.
"8f9dba20-e37b-4749-a919-2269e28b4a2c"
Was this page helpful?