Simple Extraction
Use the synchronous endpoint for quick, one-off extractions where you need the result immediately.Batch Processing
For multiple URLs, use the async endpoint to submit all tasks at once, then poll for results. This avoids blocking while waiting for each task to complete.Retry with Stealth Mode
Some sites block automated requests. Start with lite mode for speed, then automatically retry with stealth mode if you get blocked.Result Validation
A run withCOMPLETED status means the agent finished, but the result may still describe a failure (e.g., the site showed a captcha or access-denied page). Always validate the result content.
Rate Limit Handling
TinyFish has concurrency limits based on your plan. The SDK automatically retries429 and 5xx errors with exponential backoff (up to maxRetries attempts, default 2).
Cross-API Workflows
Chain multiple TinyFish APIs together for complex workflows.Search + Fetch
Search for URLs, then fetch full content from the top results:Python
Search + Agent
Search for a URL, then extract structured data via the Agent API:Python
Related
AI Integration Guide
Best practices for AI agents
Examples
More detailed examples