Search results

by TinyFish

tinyfish/search

Return ranked search results as structured records.

Billed per
call
Price
Price: $0
Provider
TinyFish
Timeout
5 min

Overview

Runs a search and returns ranked results as structured records with position, title, snippet, source, URL, and date, rather than a scraped results page. The corpus is selectable between general web, news, and research papers, and the result shape extends accordingly: news carries a publisher, research carries authors, venue, year, and citation count. Results can be constrained by country and language, limited to or excluded from named domains, and bounded by how recent they are.

The query, a ranked result list with position, title, snippet, URL, and date, and the total available.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
querystringYesWhat to search for.
domain_typestringNoWhich corpus to search.
Allowed: web, news, research_paper
Default: "web"
locationstringNoCountry code to target.
Default: "US"
languagestringNoLanguage of the results.
Default: "en"
recency_minutesnumberNoOnly return results published within this many minutes.
pagenumberNoZero-based page number.
Default: 0
Minimum: 0
Maximum: 10

Requests up to 1 MB.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"tinyfish","endpoint":"search","input":{"query":"agent gateways","domain_type":"web","location":"US","language":"en"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

$0 per call using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions