Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Hacker News Search

เอกสาร API
https://api.sandbase.ai/v1/api/hacker-news/search

Search Hacker News by keyword - matching stories with title, link, author, points, and comment count as clean JSON.

ราคา
เริ่มต้นที่ $0.0015USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
1 จำเป็น · 1 ไม่บังคับ

Playground

อินพุต
Search keyword, e.g. "ai".
Optional result filter, e.g. "story" or "comment".
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

API README

Hacker News Search API

Returns Hacker News items that match a keyword. Each result has the title, link, author, points, comment count, and creation time. The only required input is query.

Use cases

  • Track how often a topic such as AI reaches Hacker News and how many points those posts earn.
  • Find the most discussed Hacker News posts about a product or company name.
  • Collect source URLs shared on Hacker News for a keyword to build a reading list.
  • Filter results with tags to look only at stories or only at comments.

Request

curl -X POST "https://api.sandbase.ai/v1/api/hacker-news/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "ai"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesSearch keyword, e.g. "ai".
tagsstringNoOptional result filter, e.g. "story" or "comment".

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "results": [
      {
        "author": "usefulposter",
        "comments": 1668,
        "createdUtc": 1773257369,
        "id": "47340079",
        "permalink": "https://news.ycombinator.com/item?id=47340079",
        "points": 4229,
        "title": "Don't post generated/AI-edited comments. HN is for conversation between humans",
        "url": "https://news.ycombinator.com/newsguidelines.html#generated"
      }
    ]
  },
  "found": true
}

Response fields

FieldMeaning
data.results[].titleTitle of the Hacker News post.
data.results[].urlLink the post points to. This is the external page or guideline the author shared.
data.results[].permalinkLink to the item's discussion page on Hacker News.
data.results[].idHacker News item ID, returned as a string.
data.results[].authorHacker News username of the person who posted the item.
data.results[].pointsScore of the post.
data.results[].commentsNumber of comments on the post.
data.results[].createdUtcCreation time as a Unix timestamp in seconds.
foundtrue when the search returned results.

Notes

Pricing

Billed at the actual cost of each call, about $0.0015 for the request above. Failed calls are not charged.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
Hacker News SearchAPI นี้
Hacker News
เริ่มต้นที่ $0.0015 ต่อครั้งJSON
Hacker Newsเริ่มต้นที่ $0.0015 ต่อครั้งJSON
Hacker Newsเริ่มต้นที่ $0.0015 ต่อครั้งJSON
Hacker Newsเริ่มต้นที่ $0.0015 ต่อครั้งJSON

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Hacker News Search API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/hacker-news/search โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Hacker News Search API ราคาเท่าไร?

เริ่มต้นที่ $0.0015 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Hacker News Search API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: query (string). ตัวเลือก: tags (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Hacker News Search API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Hacker News ไหม?

ไม่จำเป็น Hacker News Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Hacker News API แยกต่างหาก