Docs/Build a dataset

Schema and quality

Make valid records explicit. Keep rejected rows visible and preserve source information.

Download .md
Developers2 min read4 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Field reference

Field optionDefaultUse
nameRequiredUnique output key; must not begin with _.
selectorRequiredSelector evaluated inside the row container.
selector_typecsscss, xpath, regex, text, after_text or before_text.
extract_typetexttext, price, datetime, url or attr:name.
requiredfalseReject an empty or whitespace-only value.
defaultNoneFallback when extraction returns an empty string.
data_typestringstring, integer, float or boolean validation.
normalize_whitespacetrueCollapse extracted whitespace runs.
min_length0Minimum character count after normalization.

Validation and output types

Job records currently contain string values. Integer, float and boolean types validate and canonicalize those strings; they do not produce JSON numbers or booleans. Integers must parse strictly. Floats must be finite. Booleans accept true/false, yes/no and 1/0.

Invalid rows are counted in records_rejected and written to error shards. Missing row containers and HTTP failures count as page failures. Empty records are rejected. Unicode symbols are preserved; Unicode NFC normalization is not currently performed.

Choose the deduplication key

By default, all extracted fields define record identity; source metadata is excluded. Set dedup_fields to declared keys such as sku for entity deduplication. If only sku defines identity, later price observations with the same sku are duplicates too.

Exact dedup compares canonical content stored on disk, with hash-collision checking. Semantic and near-duplicate detection are not implemented. URLs are deduplicated separately.

Review rejected records

Fix the selector, schema or source input after reviewing errors, then use a new job directory. Completed failed URLs are part of the checkpoint; rerunning an unchanged completed job does not retry them.

{"url":"https://example.com/item","row":0,"error":"missing required field 'title'"}
json1 lines · copy-ready