BazaarLinkBazaarLink
로그인
문서API 레퍼런스SDK 레퍼런스에이전트 사용법AI 스킬
웹 검색

웹 콘텐츠 추출

단일 URL 또는 한 번에 최대 20개의 URL에서 원시 웹 콘텐츠를 추출합니다. 성공한 URL은 results에, URL별 실패는 failed_results에 들어갑니다. HTTP 200이어도 results 배열이 비어 있을 수 있으므로 두 배열을 모두 확인하세요. 출력 순서는 보장되지 않습니다. query 재순위 지정, 소스당 1–5개 청크(query를 제공한 경우에만), basic/advanced 추출, 이미지, favicon, markdown/text 형식, 1–60초 timeout을 지원합니다. 알 수 없는 요청 필드는 무시됩니다. Authorization: Bearer <key>를 사용하거나 Tavily 호환 fallback으로 JSON body에 api_key를 전달하세요. BazaarLink의 두 base URL인 https://api.bazaarlink.ai/v1 및 https://bazaarlink.ai/api/v1을 모두 지원합니다. 성공한 URL 5개마다 basic은 1 credit, advanced는 2 credits를 사용하며 실패한 URL은 무료입니다. 고객 가격은 credits에 관리자가 설정한 credit당 가격을 곱한 값입니다. BazaarLink pricing page를 확인하고 response의 usage.cost를 사용하세요. 무료 한도는 search와 동일한 일일 credits를 공유하며, 잔액 없이 무료 한도가 소진되면 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 토큰으로 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

추출된 콘텐츠 청크의 순위를 다시 매길 때 사용하는 사용자 의도입니다.

Example: "key findings"
chunks_per_source
integer

소스별로 반환할 관련 콘텐츠 청크의 최대 개수입니다. 1–5여야 하며 query를 제공한 경우에만 사용할 수 있습니다.

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

추출 깊이입니다. advanced는 표와 임베디드 콘텐츠를 가져올 수 있지만 지연이 더 클 수 있습니다. basic은 성공한 URL 5개당 1 credit, advanced는 2 credits를 사용합니다.

default: basic
basicadvanced
Example: "basic"
include_images
boolean

각 성공 페이지에서 추출한 이미지 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

추출을 기다리는 최대 시간(초)이며 1–60입니다. 생략하면 basic은 10초, advanced는 30초가 기본값입니다.

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

응답에 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
  }'
응답 예시

추출이 완료되었습니다. 성공 항목은 results에서, URL별 실패는 failed_results에서 확인하므로 두 배열을 모두 확인하세요. HTTP 200이어도 results 배열이 비어 있을 수 있으며 출력 순서는 보장되지 않습니다. usage.credits는 credit 사용량이고 usage.cost는 업스트림 비용이 아닌 BazaarLink의 고객 청구 USD 가격이며 request_id는 BazaarLink가 생성한 요청 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.