BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Web Search

Extract web content

Extract raw web content from one URL or a batch of up to 20 URLs. Successful URLs appear in results and per-URL failures appear in failed_results; even when HTTP 200 returns an empty results array, check both arrays. Output order is not guaranteed. The endpoint supports query reranking, 1–5 chunks per source (only when query is provided), basic or advanced extraction, images, favicons, markdown or text format, and a 1–60 second timeout. Unknown request fields are ignored. Use Authorization: Bearer <key>, or pass api_key in the JSON body as a Tavily-compatibility fallback. Both BazaarLink base URLs are supported: https://api.bazaarlink.ai/v1 and https://bazaarlink.ai/api/v1. Every 5 successful URL extractions costs 1 credit with basic or 2 credits with advanced; failed URLs are free. The customer price is credits multiplied by the per-credit price set by the admin: see the BazaarLink pricing page and use usage.cost from the response. The free allowance shares the same daily credits as search; when it is exhausted with no balance, the response is 432. cURL: `curl https://api.bazaarlink.ai/v1/extract -H "Authorization: Bearer $BAZAARLINK_API_KEY" -H "Content-Type: application/json" -d '{"urls":["https://example.com/article"]}'` Python: `TavilyClient(api_key=..., api_base_url="https://api.bazaarlink.ai/v1").extract(urls=[...])` JavaScript: `tavily({ apiKey, apiBaseURL })` LangChain: `TavilyExtract(api_base_url=...)`

POST/v1/extract

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Body

urlsrequired
string | string[]

URLs to extract. Pass one string or an array containing 1–20 URLs. An empty array or no valid URL returns 400.

string or array of 1–20 URLs
Example: ["https://example.com/article"]
query
string

User intent used to rerank extracted content chunks.

Example: "key findings"
chunks_per_source
integer

Maximum relevant content chunks returned per source. Must be 1–5 and is available only when query is provided.

1–5; only with query
Example: 3
extract_depth
string

Extraction depth. advanced can retrieve tables and embedded content with higher latency; basic costs 1 credit per 5 successful URLs and advanced costs 2 credits.

default: basic
basicadvanced
Example: "basic"
include_images
boolean

Whether to include image URLs extracted from each successful page.

default: false
Example: true
include_favicon
boolean

Whether to include the favicon URL in each successful result.

default: false
Example: true
format
string

Format of extracted content. markdown preserves Markdown structure; text returns plain text.

default: markdown
markdowntext
Example: "markdown"
timeout
number

Maximum seconds to wait for extraction, from 1–60. When omitted, the default is 10 seconds for basic and 30 seconds for advanced.

1–60 seconds; default depends on extract_depth
Example: 30
include_usage
boolean

Whether to include credits and usage.cost in the response.

default: false
Example: true
POST /v1/extract
curl https://api.bazaarlink.ai/v1/extract \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://example.com/article", "https://example.org/docs"],
    "query": "key findings",
    "chunks_per_source": 3,
    "extract_depth": "basic",
    "include_images": true,
    "include_favicon": true,
    "format": "markdown",
    "timeout": 30,
    "include_usage": true
  }'
Response examples

Extraction completed. Check both results for successful items and failed_results for per-URL failures. HTTP 200 can have an empty results array, and output order is not guaranteed. usage.credits is credit usage; usage.cost is the USD customer price charged by BazaarLink, not upstream cost; request_id is the BazaarLink-generated request ID.

{
  "results": [
    {
      "url": "https://example.com/article",
      "raw_content": "Article content extracted as Markdown.",
      "images": [
        "https://example.com/image.jpg"
      ],
      "favicon": "https://example.com/favicon.ico"
    }
  ],
  "failed_results": [
    {
      "url": "https://example.org/unavailable",
      "error": "Failed to retrieve content"
    }
  ],
  "response_time": 0.42,
  "usage": {
    "credits": 1,
    "cost": 0
  },
  "request_id": "bl-extract-example-request"
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.