BazaarLinkBazaarLink
साइन इन
दस्तावेज़API संदर्भSDK संदर्भएजेंटिक उपयोगAI स्किल्स
वेब खोज

वेब सामग्री निकालें

एक URL या एक बार में अधिकतम 20 URL से कच्ची वेब सामग्री निकालें। सफल URL results में और हर URL की विफलता failed_results में आती है; HTTP 200 में results ऐरे खाली हो तब भी दोनों ऐरे जाँचें। आउटपुट क्रम की गारंटी नहीं है। यह endpoint query से reranking, हर स्रोत के लिए 1–5 chunks (केवल query देने पर), basic या advanced extraction, images, favicon, markdown या text format और 1–60 सेकंड timeout देता है। अज्ञात request fields अनदेखे किए जाते हैं। Authorization: Bearer <key> का उपयोग करें, या Tavily-संगत fallback के रूप में JSON body में api_key भेजें। दोनों BazaarLink base URL समर्थित हैं: https://api.bazaarlink.ai/v1 और https://bazaarlink.ai/api/v1। हर 5 सफल URL extraction पर basic में 1 credit या advanced में 2 credits लगते हैं; विफल URL निःशुल्क हैं। ग्राहक मूल्य credits को admin द्वारा तय प्रति-credit मूल्य से गुणा करने पर बनता है। BazaarLink pricing page देखें और response के usage.cost को मानें। मुफ्त allowance search के साथ वही दैनिक credits साझा करता है; बिना balance के allowance समाप्त होने पर response 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

प्राधिकरण

Authorizationआवश्यक
string · header

Authorization हेडर में bearer token के रूप में API कुंजी।

Body

urlsआवश्यक
string | string[]

निकाले जाने वाले URL। एक स्ट्रिंग या 1–20 URL वाला ऐरे दें। खाली ऐरे या कोई मान्य URL न होने पर 400 मिलता है।

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

निकाली गई सामग्री के chunks को फिर से rank करने के लिए उपयोगकर्ता का आशय।

Example: "key findings"
chunks_per_source
integer

हर स्रोत से लौटाए जाने वाले प्रासंगिक कंटेंट chunks की अधिकतम संख्या। 1–5 होनी चाहिए और केवल query देने पर उपलब्ध है।

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

Extraction depth। advanced अधिक latency के साथ tables और embedded content निकाल सकता है; basic में हर 5 सफल URL पर 1 credit और advanced में 2 credits लगते हैं।

default: basic
basicadvanced
Example: "basic"
include_images
boolean

हर सफल पेज से निकाले गए image URL शामिल करने हैं या नहीं।

default: false
Example: true
include_favicon
boolean

हर सफल परिणाम में favicon URL शामिल करने हैं या नहीं।

default: false
Example: true
format
string

निकाली गई सामग्री का फ़ॉर्मैट। markdown Markdown संरचना रखता है; text साधारण टेक्स्ट लौटाता है।

default: markdown
markdowntext
Example: "markdown"
timeout
number

Extraction के लिए प्रतीक्षा करने के अधिकतम सेकंड, 1–60। छोड़ने पर basic के लिए 10 सेकंड और advanced के लिए 30 सेकंड डिफ़ॉल्ट है।

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

Response में credits और usage.cost शामिल करने हैं या नहीं।

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
  }'
प्रतिक्रिया उदाहरण

Extraction पूरी हुई। सफल items के लिए results और हर URL की विफलता के लिए failed_results दोनों जाँचें। HTTP 200 में results ऐरे खाली हो सकता है और आउटपुट क्रम की गारंटी नहीं है। usage.credits credit उपयोग है; usage.cost upstream लागत नहीं बल्कि BazaarLink द्वारा ग्राहक से लिया गया USD मूल्य है; request_id BazaarLink द्वारा बनाया गया 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.