Tinyfish Fetch
Latest: v1.0.0
Initial release of tinyfish-fetch.
- Fetch web pages via the TinyFish Fetch API with support for JavaScript rendering and proxy/geo targeting.
- Returns page content as clean markdown (default), HTML, or screenshots (base64 PNG).
- Supports fetching multiple URLs in a single request.
- Simple curl and bash script examples provided.
- API key (
TINYFISH_API_KEY) is required and must be set before using. - Includes a helper script for easier command-line use.
Full description
Fetch web pages via TinyFish Fetch API and get clean markdown, HTML, or screenshots back — handles JS rendering and proxying. Use when you need to read a specific URL's content reliably.
TinyFish Fetch
Fetch one or more URLs via the TinyFish Fetch API. Returns rendered page content (markdown by default), optionally with screenshots, behind an optional proxy.
Requires: TINYFISH_API_KEY environment variable.
Pre-flight Check (REQUIRED)
Before calling the API, verify the key is present:
[ -n "$TINYFISH_API_KEY" ] && echo "TINYFISH_API_KEY is set" || echo "TINYFISH_API_KEY is NOT set"
If the key is not set, stop and ask the user to add it. Get one at https://agent.tinyfish.ai/api-keys. Do NOT fall back to other fetch tools.
Basic Fetch
curl -X POST "https://api.fetch.tinyfish.ai" \
-H "X-API-Key: $TINYFISH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com"],
"format": "markdown"
}'
format accepts markdown (default), html, or screenshot.
Multiple URLs
curl -X POST "https://api.fetch.tinyfish.ai" \
-H "X-API-Key: $TINYFISH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com",
"https://example.org"
],
"format": "markdown"
}'
Proxy / Geo Targeting
curl -X POST "https://api.fetch.tinyfish.ai" \
-H "X-API-Key: $TINYFISH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com"],
"format": "markdown",
"proxy_config": { "country": "US" }
}'
Helper Script
scripts/fetch.sh <url> [<url> ...] [--format markdown|html|screenshot] [--country CC] wraps the curl call:
scripts/fetch.sh https://example.com
scripts/fetch.sh https://example.com https://example.org --format html
scripts/fetch.sh https://example.com --format markdown --country US
Response Shape
{
"results": [
{
"url": "https://example.com",
"status": 200,
"content": "# Example Domain\n\nThis domain is for use…",
"format": "markdown"
}
]
}
Read results[].content for the rendered page. Screenshot format returns base64-encoded PNG data.
