scrape_ template
20 个预置提取器:热门站点、通过平台自有文档化公开 API 读取的六个 ATS 招聘板,以及免密钥的政府 API。无需 schema、无需选择器、无需 LLM——传入模板名称,配合 URL 或 params 即可。每次调用 1 credit,无论返回多少条记录。
使用场景
快速获取电商数据
无需编写任何选择器即可获取 Amazon 商品的价格、评分和库存。
聚合开发者资料
将 GitHub 仓库、npm 包和 Stack Overflow 活动汇总到一个开发者视图中。
社交媒体监控
用每个来源一个端点的方式追踪 Product Hunt 发布和 Hacker News;Reddit 则用 reddit-thread 读取帖子,用 reddit_search 读取评论树。
一次调用读取整个招聘板
读取某公司 Greenhouse、Lever、Ashby、Workable、Recruitee 或 Teamtailor 招聘板上的全部已发布职位——数值直接来自平台自有 API,而不是从招聘页面解析而来。
Endpoint
/api/v1/tools/scrape_templateParameters
请传入 `url` 或 `params`,不要两者皆无。 list 两者都不需要,而 auto 始终需要 url。页面模板需要 url;平台 API 连接器接受 params,或者接受一个招聘板 URL 并自行解析成 API 端点。
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
template | string | Required | - | 模板名称——20 个受支持模板之一。传入 `"auto"` 可根据 `url` 自动选择模板;响应中返回的是实际选中的标识符,绝不是字面量 `"auto"`。传入 `"list"` 则以编程方式发现这些模板。使用 `"list"` 时,每个可通过 `params` 调用的连接器都会以 `params: [{ name, required, description }]` 列出其参数。 Example: github-repo |
url | string | Optional | - | 要抓取的 URL。除非 `template` 为 `"list"`,或你改用 `params` 调用连接器,否则必填。 Example: https://github.com/mysleekdesigns/crawlforge-mcp |
params | object | Optional | - | 供读取平台 API(而非页面)的连接器使用的输入:招聘板的板标识符(`company`)、`shopify-collection` 的 `store` 与 `collection`、`nhtsa-vin` 的 `vin`、`npi-provider` 使用登记库自身的检索字段。各连接器的额外选项也放在这里:Greenhouse 的 `content: true`、Workable 的 `details: true`、Lever 的 `skip`/`limit`、Teamtailor 的 `per_page`/`offset`。缺少必填输入时会被拒绝,并指明具体是哪个参数。 Example: { "company": "stripe" } |
timeout | number | Optional | 15000 | 请求超时时间,单位毫秒(5000–60000)。 Example: 15000 |
respect_robots | boolean | Optional | true | 遵守目标站点的 robots.txt。保持 `true` 时,robots.txt 对 `CrawlForge` 禁止的路径会在抓取之前以 403 拒绝,且不扣除 credits。仅在你与目标站点另有约定时才设为 `false`——此时响应会带上一条 `warnings`,并且该覆盖会记录到你的 API key 上。 Example: true |
max_inline_chars | number | Optional | 40000 | 内联返回的最大结果大小,以其 JSON 的字符数计(1,000-10,000,000)。超过后,响应会携带 `preview`(格式化 JSON 的前 `max_inline_chars` 个字符)、`result_handle`、`total_chars`、`truncated: true` 和 `expires_at`,其余部分由 [read_result](/docs/api-reference/tools/read-result) 读取,每次调用 1 credit。已存储的结果保留 1 小时。 Example: 40000 |
模板:页面与商品
20 个模板,分为三组。 每个模板都返回一种针对其来源调整过的规范化 JSON 结构。
amazon-productshopify-productsource: json-ld 并附带警告;各变体库存、对比价和选项名称不在 JSON-LD 中,这些字段为 nullshopify-collectionproducts.json 读取某个集合中的全部商品,价格和库存与 shopify-product 针对单件商品返回的同样权威。默认每页 30 个,最多 250 个github-reporeadme_summary(README 的第一段)。GitHub 向未登录访客提供的页面——也就是本模板读取的页面——不含语言和最近推送日期,因此 language 与 last_updated 为 null。/tree/<branch>/… 链接会读取仓库的概览页youtube-videoyoutu.be/<id> 分享链接会按其观看页读取,auto 也能识别reddit-threadwarnings 中给出真实的 subreddithacker-news-front-pageproducthunt-launchstackoverflow-questionnpm-package模板:招聘板
六家招聘管理系统,各自通过该平台记录为公开、免认证使用的端点读取。六者都归一到同一种职位结构,因此两个招聘板可以直接合并而无需按数据源映射——招聘板 API 指南介绍了该结构及其理由。
greenhouse-jobscontent: true 可选获取lever-postingsskip/limit 分页ashby-jobsdescriptions: true 选择加入workable-jobsdetails: true 可选获取recruitee-offersteamtailor-jobstt: 命名空间。除非 per_page 另行指定,否则返回 100 个职位模板:政府 API
免费、免密钥的美国联邦 API,由发布它们的机构自行提供文档。
nhtsa-vinraw 之下。接受部分 VIN;vPIC 自身的错误码会被呈现而不是吞掉npi-provider列表连接器一次调用返回多条记录
读取列表端点的连接器会在 data 下返回 items 和 count,而不是单条记录。shopify-collection 和全部六个招聘板连接器都是这种方式。
- 每条职位记录都带有同样的十二个字段——
id、title、url、location、department、team、employment_type、remote、published_at、updated_at、description、source——平台未发布的字段为null,绝不是猜测。 - 在
params中传入招聘板标识符,或传入招聘板 URL,连接器会自行解析出 API 端点。 - Greenhouse、Workable 和 Ashby 把描述设为可选,因为它占据了绝大部分载荷:一个大型 Greenhouse 招聘板在
content: true下从 349 KB 增至 4.2 MB,OpenAI 拥有 767 个职位的 Ashby 招聘板在descriptions: true下达 5.9 MB。 - 无论返回多少条记录,费用都是固定的每次调用 1 credit。
发送 { "template": "list" }(无需 url)即可获取完整列表以及每一项的 mode:list 表示一次调用返回多条记录的连接器,entity 表示只返回单条记录的连接器。适合用来保持客户端 SDK 同步。
有意未发布
smartrecruiters-postings 不在其中:SmartRecruiters 公开记录了它的 Posting API,但 api.smartrecruiters.com/robots.txt 对所有代理禁止一切访问,唯一例外是 LinkedInBot(2026-08-28 核实),而我们没有为此覆盖 robots.txt。Workday 的 wday/cxs 端点是招聘站点自身的内部端点,而非文档化的公开 API,因此也没有任何连接器读取它。招聘板 API 指南列出了还有哪些内容不在范围之内,以及原因。
请求示例
cURL — github-repo
curl -X POST https://crawlforge.dev/api/v1/tools/scrape_template \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "github-repo",
"url": "https://github.com/mysleekdesigns/crawlforge-mcp"
}'TypeScript — amazon-product
// npm install crawlforge-sdk
import { CrawlForge } from 'crawlforge-sdk';
const client = new CrawlForge({ apiKey: process.env.CRAWLFORGE_API_KEY });
const result = await client.scrapeTemplate({
template: 'amazon-product',
url: 'https://www.amazon.com/dp/B08XYZ1234',
timeout: 20000,
});
// result.data is untyped in crawlforge-sdk 0.1 — its shape is the Response Example below.
const { data: product } = result.data as { data: { title: string; price: string | null; rating: number | null } };
console.log(product.title, product.price, product.rating);Python — amazon-product
# pip install crawlforge
from crawlforge import CrawlForge
client = CrawlForge() # reads CRAWLFORGE_API_KEY
result = client.scrape_template(
template='amazon-product',
url='https://www.amazon.com/dp/B08XYZ1234',
timeout=20000,
)
# result.data is a plain dict — its shape is the Response Example below.
product = result.data['data']
print(product['title'], product['price'], product['rating'])cURL — 发现模板
curl -X POST https://crawlforge.dev/api/v1/tools/scrape_template \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "template": "list" }'cURL — 用 params 调用 greenhouse-jobs
curl -X POST https://crawlforge.dev/api/v1/tools/scrape_template \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "greenhouse-jobs",
"params": { "company": "stripe" }
}'响应示例
{ "success": true, "data": { "template": "greenhouse-jobs", "params": { "company": "stripe" }, "data": { "items": [ { "id": "4012345", "title": "Staff Software Engineer", "url": "https://job-boards.greenhouse.io/stripe/jobs/4012345", "location": "Seattle, Washington, United States", "department": null, "team": null, "employment_type": null, "remote": null, "published_at": "2026-08-04T17:12:03.000Z", "updated_at": "2026-08-21T09:44:51.000Z", "description": null, "source": "greenhouse-jobs", "raw_extra": { "internal_job_id": "4098765", "requisition_id": "REQ-1234", "offices": null } } ], "count": 571, "company": "Stripe" }, "template_name": "Greenhouse Job Board", "extracted_at": "2026-08-28T12:00:00.000Z", "fetched_url": "https://boards-api.greenhouse.io/v1/boards/stripe/jobs" }, "credits_used": 1, "credits_remaining": 999, "processing_time": 812}data.data.items每个已发布职位一条记录,采用所有招聘板连接器共享的十二字段结构data.data.items[0].departmentGreenhouse 仅在 `content: true` 时才返回部门,因此摘要记录在此报告 null,而不是根据职位名称猜测出的部门data.data.count本次响应中的记录数;若数据源声明了更大的总数,还会返回 `total_available`data.template_name实际运行的模板的可读名称data.fetched_url实际读取的端点——只要它与你传入的内容不同就会出现,其中包括所有仅用 `params` 的调用credits_used每次调用固定 1 credit,与模板和记录数无关错误处理
连接器无法构造请求(400 Bad Request)
参数问题,在抓取任何内容之前即被拒绝,且从不计费。INVALID_TEMPLATE_PARAMS 会带上连接器自己的消息,指明它需要的参数——job-boards.greenhouse.io/<token> 中的招聘板 token、<company>.recruitee.com 中的子域。MISSING_URL 表示你把 params 传给了一个读取页面、且没有 params 形式的模板。NO_TEMPLATE_MATCH 表示 template: "auto" 未能从该 URL 识别出任何模板——请自行指定模板,或用 template: "list" 核对。
被 robots.txt 拦截(403 Forbidden)
目标站点的 robots.txt 对 CrawlForge 禁止了该路径。若你与目标站点另有约定,可设置 respect_robots: false 予以覆盖——该覆盖会记录到你的 API key 上。该覆盖不适用于列入 CrawlForge 永久排除名单的主机——无论 respect_robots 取何值,这类主机一律被拒绝。该检查针对模板实际抓取的 URL,而 shopify-product 与 npm-package 抓取的是同一主机上的机器可读端点,并非你传入的 URL。
credit 费用
提示: 需要某个不受支持的站点?使用 scrape_structured 配合自定义选择器(2 credits),或使用 extract_with_llm 进行 LLM 驱动的提取。
相关工具
准备好一次调用即可抓取热门站点了吗?免费注册,获取 1,000 credits。