Search

Search the web

Search the web and get structured results. Returns ranked results with titles, snippets, and URLs.

Location and language resolution:

  • If location is set but language is not, the language auto-resolves to the most predominantly used language in that country.
  • If language is set but location is not, the location auto-resolves to the country where that language is most predominantly used.
  • If neither location nor language is set, defaults to US and en.
get/search

Request

  • Base URL: https://api.search.tinyfish.ai
  • URL: https://api.search.tinyfish.ai/search
  • Auth: API key in header X-API-Key

Query parameters

querystring required

Search query

Example:web automation tools
purposestring

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.

Example:Find an open-source library for parsing PDF invoices in Python
locationstring

Country code for geo-targeted results

Example:US
languagestring

Language code for result language

Example:en
include_domainsstring

Comma-separated list of domains to restrict results to

Example:github.com,arxiv.org
exclude_domainsstring

Comma-separated list of domains to exclude from results

Example:pinterest.com,quora.com
domain_type'web' | 'news' | 'research_paper'

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

Example:news
after_datestring

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

Example:2024-01-01
before_datestring

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

Example:2024-12-31
recency_minutesinteger

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

Example:60
pub_year_mininteger

Return research papers published on or after this year (0-9999, inclusive). Only supported for domain_type=research_paper.

Example:2019
pub_year_maxinteger

Return research papers published on or before this year (0-9999, inclusive). Only supported for domain_type=research_paper.

Example:2022
pageinteger nullable

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

Example:2
include_thumbnail'true' | 'false'

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

Example:true
fetchstring

JSON-encoded fetch configuration object.

Example:{}

Response

Search completed successfully.

querystring required

The search query that was executed

total_resultsinteger required

Total number of results

pageinteger required

The current page number, starting from 0

request_idstring

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.

Example response

{
  "query": "web automation tools",
  "results": [
    {
      "position": 1,
      "site_name": "example.com",
      "snippet": "This is an example snippet...",
      "title": "Example Page",
      "url": "https://example.com/page",
      "thumbnail_url": "https://example.com/thumb.jpg"
    }
  ],
  "total_results": 10,
  "request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}

Changes

No recorded changes to this operation across all 1 revision of this API.