API

API ค้นหาสำหรับ AI

คำขอ HTTP เดียวคืนผลลัพธ์แบบมีโครงสร้าง — ค้นคืนเว็บเรียลไทม์สำหรับแอป AI, RAG และเอเจนต์ ทางเลือกแทน Firecrawl · Exa · Tavily.

เริ่มต้นอย่างรวดเร็ว

GET /api/v1/search
curl "https://tutusoo.com/api/v1/search?q=rust&limit=5"

พารามิเตอร์คิวรี

พารามิเตอร์ประเภทคำอธิบาย
q*stringคำค้น (จำเป็น); หลายคำเป็น AND โดยค่าเริ่มต้น (ต้องตรงทั้งหมด)
limitintจำนวนผล ค่าเริ่มต้น 10 สูงสุด 100
offsetintออฟเซ็ตการแบ่งหน้า ค่าเริ่มต้น 0 สูงสุด 990
langstringตัวกรองภาษา เช่น zh / en
time_rangestringช่วงเวลาที่จัดทำดัชนี: 1d/7d/30d/1y/all (ตาม crawled_at)
sitestringจำกัดเฉพาะโดเมนเว็บไซต์
lang_prioritystringลำดับความสำคัญภาษา (บูสต์แบบนุ่ม ไม่ใช่ตัวกรองแข็ง): เช่น zh ดันผลภาษาที่ตรงขึ้นโดยไม่ซ่อนอื่น เป็นอิสระจาก lang

ตัวดำเนินการคิวรี (เขียนใน q)

site:domainจำกัดเฉพาะเว็บไซต์ เช่น site:github.com rust
intitle:wordตรงเฉพาะหัวเรื่องที่มีคำนั้น
"exact phrase"ทุกคำในวลีต้องปรากฏ
-excludeยกเว้นผลที่มีคำนั้น เช่น rust -tutorial
A OR Bตรงคำใดคำหนึ่ง เช่น rust OR golang
filetype:typeกรองตามชนิดไฟล์ (pdf/doc/ppt/xls) เช่น filetype:pdf

การตอบกลับ

{
  "total": 586,
  "took_ms": 142,
  "results": [
    {
      "id": "a1b2c3d4-…",         // page id for local results; may be empty for external fallback
      "url": "https://rust-lang.org/",
      "title": "Rust Programming Language",
      "snippet": "A language empowering everyone to build reliable software…",
      "domain": "rust-lang.org",
      "site_name": "Rust Programming Language", // display name (optional; client falls back to domain)
      "lang": "en",
      "score": 12.4,
      "source": "local",          // local (our index) | brave (web fallback)
      "has_llms_txt": true,
      "published_at": "2010-01-25T…", // article publish time (nullable; returned when known; RAG freshness/date)
      "crawled_at": "2026-07-18T…" // crawl time (freshness; time_range filters on this)
    }
  ]
}

site_name: ชื่อที่แสดง อาจถูกละเว้น — ใช้ domain แทน. source: local = ดัชนีของเรา / brave = สำรองจากเว็บเมื่อผลในระบบไม่พอ. has_llms_txt: เว็บเป้าหมายมี llms.txt หรือไม่ (เป็นมิตรกับ AI)

ดึงข้อความเต็ม (RAG)

GET /api/v1/content/{id}

เมื่อผลลัพธ์มี source=local และ id ไม่ว่าง ให้ดึงเนื้อหาเต็มไปป้อน LLM ผลสำรองภายนอกไม่มีเนื้อหาในระบบและใช้เอนด์พอยต์นี้ไม่ได้

curl "https://tutusoo.com/api/v1/content/<local_page_id>"

# Response (RAG-relevant fields only, no internal columns):
{
  "id": "…",
  "url": "https://rust-lang.org/",
  "title": "Rust Programming Language",
  "body_text": "…full article text…",
  "author": "Jane Doe",        // author (nullable; RAG citation/byline)
  "published_at": "2026-01-…", // original publish time (nullable; freshness)
  "lang": "en",
  "word_count": 1200,
  "crawled_at": "2026-07-18T…",
  "has_llms_txt": true
}

การเข้าถึงและขีดจำกัดอัตรา

จุดปลายทางค้นหาและเนื้อหาสาธารณะไม่ต้องเข้าสู่ระบบหรือใช้คีย์ API — ลองใช้ได้ทันที ชั้นสาธารณะจะจำกัดอัตราอย่างเป็นธรรมต่อ IP ของไคลเอนต์ และคืนค่า 429 เมื่อเกินขีดจำกัด คีย์ API เฉพาะจะออกให้โดยผู้ดำเนินการสำหรับการเชื่อมต่อที่ยืนยันแล้ว เว็บไซต์นี้ไม่แสดงช่องทางสมัครแบบบริการตนเองที่ไม่มีอยู่จริง

การตอบกลับด้วยคีย์เฉพาะจะคืนค่า X-RateLimit-Limit, X-RateLimit-Remaining และ X-RateLimit-Reset เมื่อเจอ 429 ให้ชะลอตามคำแนะนำในการตอบกลับ อย่าลองใหม่ทันทีโดยไม่มีขีดจำกัด