crawlbase文档
登录

API 用法

Crawling API 请求中添加 &scraper=producthunt-product。在 url 参数中对目标 URL 进行 URL 编码。

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.producthunt.com/products/acme-analytics' \
  --data-urlencode 'scraper=producthunt-product' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.producthunt.com/products/acme-analytics',
    {'scraper': 'producthunt-product'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.producthunt.com/products/acme-analytics',
  { scraper: 'producthunt-product' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.producthunt.com/products/acme-analytics', scraper: 'producthunt-product')
data = JSON.parse(res.body)

示例输入 URL

传入 url 参数的 URL(为便于阅读已 URL 解码):

https://www.producthunt.com/products/acme-analytics

响应结构

JSON 响应体。当源页面省略对应值时,字段类型可能为 null

id
string
产品的 Product Hunt 标识符。
name
string
产品名称。
tagline
string
产品 tagline。
slug
string
产品的 URL slug。
url
string
产品的规范 Product Hunt URL。
description
string
完整的产品描述。
upvotes
integer
产品的 upvotes 数量。
commentsCount
integer
产品的评论数量。
reviewsCount
integer
产品的评价数量。
reviewsRating
number | null
平均评价评分,若无评价则为 null。
featuredAt
string | null
产品被推荐展示的时间(ISO 8601)。
createdAt
string
产品创建时间(ISO 8601)。
website
string | null
产品的外部网站。
thumbnail
string | null
缩略图图片 URL(如存在)。
topics
array
产品被标记的 topics。
makers
array
产品所记入的 makers 名称。
makerCount
integer
产品所记入的 maker 数量。

示例响应

{
  "id": "612345",
  "name": "Acme Analytics",
  "tagline": "Product analytics that ships itself",
  "slug": "acme-analytics",
  "url": "https://www.producthunt.com/products/acme-analytics",
  "description": "Acme Analytics is a self-serve product analytics platform that auto-instruments your app and surfaces the metrics that matter without a data team.",
  "upvotes": 842,
  "commentsCount": 74,
  "reviewsCount": 128,
  "reviewsRating": 4.8,
  "featuredAt": "2026-07-14T07:01:00Z",
  "createdAt": "2026-07-14T07:01:00Z",
  "website": "https://acme-analytics.com",
  "thumbnail": "https://ph-files.imgix.net/acme-thumb.png",
  "topics": ["Analytics", "SaaS", "Developer Tools"],
  "makers": ["Jane Doe", "Sam Rivera", "Priya Patel"],
  "makerCount": 3
}