Skip to main content
These patterns cover the most common ways to integrate TinyFish Web Agent into your application.

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 with COMPLETED 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 retries 429 and 5xx errors with exponential backoff (up to maxRetries attempts, default 2).

Authenticated Automation

Use vault credentials to automate sites that require login. Connect your password manager once via the vault setup, then pass credentials to each run.
Use credential_item_ids to scope runs to specific credentials when you have multiple accounts on the same domain. See Vault Credentials for details.

Cross-API Workflows

Chain multiple TinyFish APIs together for complex workflows.

Search + Fetch

Search for URLs, then fetch full content from the top results:

Search + Agent

Search for a URL, then extract structured data via the Agent API:

AI Integration Guide

Best practices for AI agents

Examples

More detailed examples