Loading...
Loading...
Extract a typed JSON object from one or more web pages against a JSON Schema with fastCRW. Use when you need structured data — "get the price and stock status", "extract all job listings as JSON", "pull structured fields from this page". Step 6 of the crw workflow ladder.
npx skill4agent add us/crw crw-extractformats:["json"]prompt/v1/extract| Path | When to use | Sync? |
|---|---|---|
Per-page: | Single URL, or inline during a crawl | Synchronous |
Async multi-URL: | Many URLs, fire-and-forget | Async |
/v2/extract/v2/scrapeformats:["json"][extraction.llm]crw setup--extract# Inline schema
crw scrape "https://example.com/product" \
--extract '{"type":"object","properties":{"price":{"type":"number"},"inStock":{"type":"boolean"}}}'
# Schema from file
crw scrape "https://example.com/job" --extract @schema.json -o result.jsonformats:["json"]jsonSchemacrw_scrape(
url="https://example.com/product",
formats=["json"],
extract={"schema": {"type":"object","properties":{"price":{"type":"number"}}}}
)crw_scrapeextract.schemajsonSchemacurl -X POST "$CRW_API_URL/v1/scrape" \
-H "Authorization: Bearer $CRW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product",
"formats": ["json"],
"jsonSchema": {
"type": "object",
"properties": {
"price": {"type": "number"},
"inStock": {"type": "boolean"}
}
}
}'# Start job
curl -X POST "$CRW_API_URL/v2/extract" \
-H "Authorization: Bearer $CRW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com/p1", "https://example.com/p2"],
"schema": {"type":"object","properties":{"price":{"type":"number"}}}
}'
# → {"success":true,"id":"<uuid>","warnings":["...use /v2/scrape..."], ...}
# Poll until completed
curl "$CRW_API_URL/v2/extract/<uuid>" -H "Authorization: Bearer $CRW_API_KEY"
# → {"success":true,"status":"completed|scraping|failed","data":{...}}| Need | CLI | MCP / REST |
|---|---|---|
| JSON schema | | |
| Free-text prompt (no schema) | — | |
| Save output | | write the response yourself |
| Multi-URL async | not available | |
| LLM override | | server config only |
promptcrw_crawljsonSchemadata.jsondata.jsondata.markdownmarkdown