Skip to main content
POST
/
v1
/
fetch
Fetch and extract content from URLs
curl --request POST \
  --url https://api.fetch.tinyfish.ai/v1/fetch \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "urls": [
    "https://example.com",
    "https://example.org"
  ],
  "format": "markdown",
  "links": false,
  "image_links": false
}
'
{
  "results": [
    {
      "url": "https://example.com",
      "final_url": "https://www.example.com",
      "title": "Example Domain",
      "description": "This domain is for use in illustrative examples.",
      "language": "en",
      "format": "markdown",
      "text": "<string>",
      "author": "John Doe",
      "published_date": "2024-01-15",
      "links": [
        "<string>"
      ],
      "image_links": [
        "<string>"
      ],
      "latency_ms": 1183.4
    }
  ],
  "errors": [
    {
      "url": "https://invalid.example.com",
      "error": "Failed to fetch resource"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key from the API Keys page.

Body

application/json

URLs to fetch and extraction options

urls
string<uri>[]
required

Array of URLs to fetch (1-10)

Required array length: 1 - 10 elements
Example:
[
  "https://example.com",
  "https://example.org"
]
format
enum<string>
default:markdown

Output format for extracted content

Available options:
markdown,
html,
json
Example:

"markdown"

Include extracted links in response

Example:

false

Include extracted image links in response

Example:

false

Response

Fetch completed. Check errors[] for any per-URL failures.

Fetch response with results and errors

results
object[]
required

Successfully fetched URLs

errors
object[]
required

URLs that failed to fetch