Search results
tinyfish/searchReturn ranked search results as structured records.
- call
- Price: $0
- TinyFish
- 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.
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | What to search for. |
| domain_type | string | No | Which corpus to search. Allowed: web, news, research_paper Default: "web" |
| location | string | No | Country code to target. Default: "US" |
| language | string | No | Language of the results. Default: "en" |
| recency_minutes | number | No | Only return results published within this many minutes. |
| page | number | No | Zero-based page number. Default: 0Minimum: 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.
