BazaarLinkBazaarLink
เข้าสู่ระบบ
เอกสารAPI ข้อมูลอ้างอิงSDK ข้อมูลอ้างอิงการใช้งาน AgentAI ทักษะ
การค้นหาเว็บ

รวบรวมข้อมูลหน้าเว็บ

สำรวจกราฟลิงก์ของเว็บไซต์จาก URL รากและดึงเนื้อหาจากหน้าที่สำเร็จ ใช้ Bearer API key หรือส่ง api_key ใน JSON body เป็นทางเลือกเพื่อความเข้ากันได้ รองรับทั้ง https://api.bazaarlink.ai/v1 และ https://bazaarlink.ai/api/v1 ระบบจะละเว้นฟิลด์ที่ไม่รู้จัก คำตอบมีหน้าที่สำเร็จ response_time usage.credits usage.cost ที่เราเพิ่ม (เครดิตคูณด้วยราคาต่อเครดิตที่ผู้ดูแลตั้งไว้) และ request_id Tavily รับ timeout 10–150 วินาที แต่ค่าสูงสุดที่มีผลของ BazaarLink คือ 90 วินาที ค่าที่เกิน 90 จะลดเป็น 90 เพื่อให้อยู่ต่ำกว่าขีดจำกัด edge 100 วินาที ค่าบริการคือค่า mapping บวกค่า extraction: basic ที่สำเร็จ 10 หน้าใช้ 1 + 2 = 3 credits; advanced extraction เพิ่มส่วน extraction เป็นสองเท่า และ instructions เพิ่มส่วน mapping เป็นสองเท่า หน้าที่ล้มเหลวไม่คิดค่าใช้จ่าย เครดิตจริงจะหักจากโควต้าฟรีรายวันที่ใช้ร่วมกัน หากค่าประเมินจาก limit เกินโควต้าที่เหลือ จะคิดส่วนเกินจากยอดคงเหลือ หรือคืน 432 เมื่อไม่มียอดพร้อมแนะนำให้ลด limit ตัวอย่าง SDK โปรดเก็บคีย์ไว้ในตัวแปรสภาพแวดล้อมหรือการตั้งค่าฝั่งเซิร์ฟเวอร์ที่ปลอดภัย Python: from tavily import TavilyClient client = TavilyClient(api_key="...", api_base_url="https://api.bazaarlink.ai/v1") response = client.crawl("docs.tavily.com", instructions="Find Python SDK pages") JavaScript: import { tavily } from "@tavily/core" const tvly = tavily({ apiKey: process.env.BAZAARLINK_API_KEY, apiBaseURL: "https://api.bazaarlink.ai/v1" }) const response = await tvly.crawl("docs.tavily.com", { instructions: "Find Python SDK pages" }) LangChain (crawl only): from langchain_tavily import TavilyCrawl tool = TavilyCrawl(api_key="...", api_base_url="https://api.bazaarlink.ai/v1") response = tool.invoke({"url": "docs.tavily.com", "instructions": "Find Python SDK pages"})

POST/v1/crawl

การอนุญาต

Authorizationจำเป็น
string · header

API key เป็น bearer token ใน header Authorization

Body

urlจำเป็น
string

URL รากที่จะเริ่มรวบรวมข้อมูล สามารถละ scheme ได้ เช่น docs.tavily.com

required; scheme optional
Example: "docs.tavily.com"
instructions
string

คำสั่งภาษาธรรมชาติสำหรับการรวบรวมข้อมูล เมื่อระบุแล้วจะใช้ chunks_per_source ได้ และส่วน mapping คิด 2 credits ต่อ 10 หน้าที่สำเร็จ

Example: "Find Python SDK pages"
chunks_per_source
integer

จำนวนชิ้นเนื้อหาสั้นสูงสุดต่อแหล่งที่มา ใช้ได้เมื่อมี instructions เท่านั้น อยู่ระหว่าง 1–5 ค่าเริ่มต้น 3

1-5; only with instructions; default: 3
Example: 3
max_depth
integer

ความลึกสูงสุดของการรวบรวมข้อมูล 1–5 ค่าเริ่มต้น 1

1-5; default: 1
Example: 1
max_breadth
integer

จำนวนลิงก์สูงสุดที่ติดตามต่อหน้าในแต่ละระดับ 1–500 ค่าเริ่มต้น 20

1-500; default: 20
Example: 20
limit
integer

จำนวนลิงก์รวมที่จะประมวลผลก่อนหยุด ขั้นต่ำ 1 ค่าเริ่มต้น 50

minimum: 1; default: 50
Example: 50
select_paths
string[]

อาร์เรย์รูปแบบ regex สำหรับ การเลือกเส้นทาง สูงสุด 50 รายการ และแต่ละรูปแบบยาวไม่เกิน 200 อักขระ

max 50 entries; max 200 characters per regex
Example: ["^/docs/.*"]
select_domains
string[]

อาร์เรย์รูปแบบ regex สำหรับ การเลือกโดเมน สูงสุด 50 รายการ และแต่ละรูปแบบยาวไม่เกิน 200 อักขระ

max 50 entries; max 200 characters per regex
Example: ["^docs\.example\.com$"]
exclude_paths
string[]

อาร์เรย์รูปแบบ regex สำหรับ การยกเว้นเส้นทาง สูงสุด 50 รายการ และแต่ละรูปแบบยาวไม่เกิน 200 อักขระ

max 50 entries; max 200 characters per regex
Example: ["^/private/.*"]
exclude_domains
string[]

อาร์เรย์รูปแบบ regex สำหรับ การยกเว้นโดเมน สูงสุด 50 รายการ และแต่ละรูปแบบยาวไม่เกิน 200 อักขระ

max 50 entries; max 200 characters per regex
Example: ["^private\.example\.com$"]
allow_external
boolean

กำหนดว่าจะรวมลิงก์จากโดเมนภายนอกในผลลัพธ์สุดท้ายหรือไม่ ค่าเริ่มต้น true

default: true
Example: true
include_images
boolean

กำหนดว่าจะรวมรูปภาพที่ดึงจากหน้าหรือไม่ ค่าเริ่มต้น false

default: false
Example: false
extract_depth
string

ระดับการดึงข้อมูล advanced รองรับตารางและเนื้อหาฝังตัวมากขึ้น และเพิ่มส่วนเครดิต extraction เป็นสองเท่าต่อ 5 หน้าที่สำเร็จ

default: basic
basicadvanced
Example: "basic"
format
string

รูปแบบเนื้อหาหน้าที่ดึงออกมา markdown หรือข้อความธรรมดา ค่าเริ่มต้น markdown

default: markdown
markdowntext
Example: "markdown"
include_favicon
boolean

กำหนดว่าจะรวม URL favicon ในแต่ละผลลัพธ์หรือไม่ ค่าเริ่มต้น false

default: false
Example: false
timeout
number

จำนวนวินาทีที่จะรอการรวบรวมข้อมูล Tavily อยู่ที่ 10–150 แต่ค่าสูงสุดที่มีผลของ BazaarLink คือ 90 วินาที ค่าที่เกิน 90 จะลดเป็น 90

Tavily: 10-150; BazaarLink default/effective maximum: 90 seconds; values above 90 are lowered to 90
Example: 90
include_usage
boolean

กำหนดว่าจะรวม usage ในคำตอบหรือไม่ ค่าเริ่มต้น false หากรวมจะแสดง credits และ usage.cost

default: false
Example: false
POST /v1/crawl
curl https://api.bazaarlink.ai/v1/crawl   -H "Authorization: Bearer $BAZAARLINK_API_KEY"   -H "Content-Type: application/json"   -d '{
    "url": "docs.tavily.com",
    "instructions": "Find Python SDK pages",
    "limit": 20,
    "timeout": 90,
    "include_usage": true
  }'
ตัวอย่างการตอบกลับ

รวบรวมข้อมูลเสร็จแล้ว results มีเฉพาะหน้าที่สำเร็จ usage.credits คือเครดิตจริง และ usage.cost คือราคาสำหรับลูกค้าตามราคาต่อเครดิตที่ผู้ดูแลตั้งไว้

{
  "base_url": "docs.tavily.com",
  "results": [
    {
      "url": "https://docs.tavily.com/welcome",
      "raw_content": "Welcome to the docs",
      "favicon": "https://docs.tavily.com/favicon.ico"
    }
  ],
  "response_time": 1.23,
  "usage": {
    "credits": 3,
    "cost": 0.03
  },
  "request_id": "crawl_123e4567-e89b-12d3-a456-426614174111"
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.