Search does not use credits.
api.search.tinyfish.ai is the public Search API endpoint.
Before You Start
Get your API key
Visit agent.tinyfish.ai/api-keys and create a key. Store it in your environment:
X-API-Key header. See Authentication for the full setup and troubleshooting guide.
Your First Request
What Success Looks Like
When to Use Search vs the Other APIs
- Use Search when you need ranked search engine results, snippets, and URLs.
- Use Fetch when you already have the URLs and want extracted page content.
- Use Agent when you want TinyFish to browse and execute a workflow on the site.
- Use Browser when you need direct browser control from your own code.
Geo-Targeted Results
Use thelocation and language parameters to get results tailored to a specific region.
Freshness and Date Filters
Userecency_minutes when you want a freshness window, or after_date / before_date when you want a calendar date cutoff.
recency_minutesaccepts an integer from1to5256000(10 years).after_dateandbefore_datemust useYYYY-MM-DD.- Do not combine
recency_minuteswithafter_dateorbefore_date. - If you send both
after_dateandbefore_date,after_datemust be less than or equal tobefore_date.
Domain Types
Usedomain_type to search a specific content category:
web(default) — standard web resultsnews— news articles with publisher and date fieldsresearch_paper— academic papers with authors, venue, year, and citation count
after_date, before_date, recency_minutes) are not supported for domain_type=research_paper.
Search Intent
The optionalpurpose parameter lets you state why you are searching — the underlying goal or task the results will be used for. A query is often a terse set of keywords, and the intent behind it isn’t always obvious from the keywords alone. Passing purpose gives us additional signal to further inform and deliver better-quality results.
purposeis always optional. Omitting it leaves search behaviour unchanged.- Keep it to a short phrase or sentence (maximum 2000 characters), for example
Find an open-source library for parsing PDF invoices in Python.
Read Next
API Reference
Full request and response schema
Authentication
API key setup
For coding agents
One page that routes an agent to the right TinyFish API
Search Examples
Common Search request patterns