For complete API reference in a single file, use llms-full.txt (218KB, includes all code examples). Note that
llms.txt is just an index — agents should use llms-full.txt for full context.Choose the Right TinyFish API
| API | Use it when | Canonical endpoint | Docs |
|---|---|---|---|
| Agent | You want TinyFish to execute a goal on a real website | POST https://agent.tinyfish.ai/v1/automation/run-sse | Agent reference |
| Search | You want ranked web results for a query | GET https://api.search.tinyfish.ai | Search overview |
| Fetch | You want extracted page content from one or more URLs | POST https://api.fetch.tinyfish.ai | Fetch overview |
| Browser | You want a remote browser session for direct Playwright/CDP control | POST https://api.browser.tinyfish.ai | Browser overview |
Quick Decision Tree
- Need data from a URL? — Agent API (goal-based extraction) or Fetch API (raw page content)
- Need search results? — Search API
- Need browser control? — Browser API (direct Playwright/CDP access)
Expected Latency
| API | Typical Latency | Suggested Timeout |
|---|---|---|
| Agent (sync) | 15-60s | 120s |
| Agent (SSE) | 15-60s (streaming) | N/A (SSE) |
| Search | 1-3s | 10s |
| Fetch | up to 30s per URL | 120s |
| Browser (create) | 10-30s | 60s |
Authentication
All public REST APIs use the sameX-API-Key header.
Minimum Viable Example (Python SDK)
Minimal Request Examples (cURL)
Agent
Search
Fetch
Browser
Prompting
Goal quality determines success rate. Vague goals like “get the data” fail; crafted goals with explicit fields, output format, and edge-case handling succeed consistently.Common Gotchas
- Browser API session creation takes 10-30s — set
timeout=60on your HTTP client. - TypeScript needs
"type": "module"inpackage.jsonfor top-levelawait, or wrap code inasync function main() { ... }; main(). COMPLETEDstatus does not mean the goal succeeded — always checkresult_jsonfor failure signals like “captcha”, “blocked”, or “access denied”.- Fetch API has a 30s per-URL backend timeout — set your client timeout to 120s for batch requests with multiple URLs.
What to Read Next
Agent reference
Goal-based automation, endpoint choice, runs, profiles, and proxies
Authentication
API key setup and troubleshooting
Search overview
Search query parameters and result shape
Fetch overview
Fetch multiple URLs and choose output formats
Browser overview
Create a remote browser session and connect via CDP
Examples
Copy-paste examples for common workflows
llms-full.txt
Complete API reference in a single file (218KB)