scrape_template
Extract structured data from well-known websites using predefined templates. Supports auto-detection, template listing, and parameter-driven list connectors.
Instructions
Use this when you want structured data from a well-known site or platform API without writing custom selectors. Three modes: a template id with a url (scrape_template({template:"github-repo", url:"https://github.com/user/repo"})); template:"auto" with a url, which picks the template from the URL and names its choice in the response; or template:"list" to enumerate every template with the URLs it handles. Page templates return one record - e-commerce, social, developer and news sites (shopify-product, amazon-product, github-repo, youtube-video, reddit-thread, hacker-news-front-page, producthunt-launch, stackoverflow-question, npm-package; reddit-thread reads the post from the Arctic Shift archive and reddit_search reads the comment tree). linkedin-profile and tweet are retired - those sites' robots.txt disallow every keyless path - and naming one returns the reason. List connectors return N records from one call and are driven by params instead of a url: job boards (Greenhouse, Lever, Ashby, Workable, Recruitee, Teamtailor) return a company's whole careers board, US government APIs (NHTSA VIN decode, NPI provider registry) answer keyless lookups, and shopify-collection returns a whole collection. Not for a site without a template (scrape) - template:"list" shows what exists. Cost: 1 credit. Example: scrape_template({template:"greenhouse-jobs", params:{company:"stripe"}})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to scrape — required unless template is list, or params drive a list connector | |
| params | No | Parameters for a list connector, e.g. {company:"stripe"} for greenhouse-jobs or {store:"www.allbirds.com", collection:"mens"} for shopify-collection. Use template:"list" to see which templates take params | |
| timeout | No | Request timeout in milliseconds | |
| template | Yes | Template ID (e.g. github-repo), "auto" to detect one from the url, or "list" to enumerate available templates | |
| user_agent | No | Override the outbound User-Agent. CrawlForge identifies itself honestly by default; use this only for targets you have your own agreement with. | |
| respect_robots | No | Respect the target site's robots.txt (default: true). Setting this to false is honoured, returns a warning in the response, and is recorded against your API key — it is your decision, not a silent default. |