Dataset jobs
The bulk API for fetching, validating, deduplicating and exporting records without collecting the entire dataset in memory.
Source reference · Match your SDK version. Availability and known issues
In this guide
A shared configuration
Rust, Python, Node.js and the CLI use the same JSON keys. Unknown configuration keys are rejected. Define at least one field and use a job-owned output directory.
{
"urls_file": "urls.txt",
"output_dir": "datasets/pages",
"fields": [
{
"name": "title",
"selector": "h1",
"required": true
}
],
"concurrency": 16,
"format": "jsonl"
}json13 lines · copy-ready
Multiple rows per page
Set row_selector to the CSS container for one record. Field matches are assigned to that container, so a missing price cannot shift the price of the next product into the wrong row. Without a row selector, the page produces one record.
{
"urls_file": "urls.txt",
"output_dir": "datasets/products",
"row_selector": "article.product",
"fields": [
{
"name": "name",
"selector": "h2",
"required": true
},
{
"name": "sku",
"selector": "article.product",
"extract_type": "attr:data-sku",
"required": true
},
{
"name": "price",
"selector": ".price",
"extract_type": "price",
"data_type": "float"
}
],
"dedup_fields": [
"sku"
],
"format": "jsonl"
}json28 lines · copy-ready
Configuration reference
The default HTTP transport caps bodies while reading at 16 MiB; the smaller job limit is checked before parsing. Custom transports must enforce their own streaming cap. Limits bound specific buffers, not total process memory.
| Setting | Default | Meaning |
|---|---|---|
| urls_file / output_dir | Required | Input file and exclusive job directory. |
| fields | Required | Named field extraction definitions. |
| row_selector | None | CSS container for one row. |
| concurrency | 16 | In-flight page limit; range 1–1024. |
| checkpoint_pages | 256 | Input lines in one checkpoint batch; range 1–10000. |
| max_response_bytes | 2097152 | Body limit before parsing. |
| max_records_per_page | 1000 | Maximum row containers per page. |
| max_record_bytes | 262144 | Maximum serialized extracted field bytes. |
| checkpoint_bytes | 33554432 | Pending exact-dedup key/value byte budget. |
| deduplicate | true | Exact record deduplication. |
| dedup_fields | [] | Identity fields; empty means all extracted fields. |
| respect_robots | true | Check robots rules and crawl delay. |
| format | jsonl | jsonl or csv. |
Run a job
import json
from crawlingo import DatasetJob
with open("job.json", encoding="utf-8") as source:
config = json.load(source)
report = DatasetJob(config).run()
print(report["records_written"])
print(report["pages_failed"], report["records_rejected"])python9 lines · copy-ready