Fetch

POST /v1/fetch

Fetch one or more web pages and extract their text content. Powered by Exa (default) or Tavily.

Headers

Header Required Description
Authorization Yes Bearer <api-key-or-jwt>
Content-Type Yes application/json
X-Quantized-Provider No Force a provider (exa or tavily)

Request body

Field Type Required Default Description
urls array Yes List of URLs to fetch
include_text boolean No true Whether to include extracted text content

Examples

cURL
Python
curl -X POST https://api.quantized.us/v1/fetch \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://docs.python.org/3/whatsnew/3.13.html"],
    "include_text": true
  }'
import httpx

response = httpx.post(
    "https://api.quantized.us/v1/fetch",
    headers={"Authorization": "Bearer sk-quantized-YOUR-KEY"},
    json={
        "urls": [
            "https://docs.python.org/3/whatsnew/3.13.html",
            "https://example.com/article",
        ],
        "include_text": True,
    },
)
data = response.json()
for result in data["results"]:
    print(f"[{result['status']}] {result['title']}")
    if result["text"]:
        print(result["text"][:200])

Response

{
  "results": [
    {
      "url": "https://docs.python.org/3/whatsnew/3.13.html",
      "title": "What's New in Python 3.13",
      "text": "This article explains the new features in Python 3.13...",
      "status": "success"
    },
    {
      "url": "https://example.com/article",
      "title": "Example Article",
      "text": "Article content extracted as clean text...",
      "status": "success"
    }
  ],
  "usage": {
    "credits_used": 16000,
    "credits_remaining": 984000
  }
}

Response fields

Field Type Description
results array One entry per requested URL
results[].url string The requested URL
results[].title string or null Page title
results[].text string or null Extracted text content
results[].status string or null Fetch status (e.g., "success")
usage.credits_used integer Micro-credits consumed
usage.credits_remaining integer or null Micro-credits remaining
Per-URL status

Each URL in the results has its own status. Some URLs may fail (e.g., pages behind paywalls or with anti-bot protection) while others succeed in the same request.

Errors

Status Condition
400 Invalid request (missing urls, unknown fields)
401 Invalid or missing API key
402 Insufficient credits
503 Fetch provider unavailable