JobField · Node.js
One extraction rule and its validation requirements. Exported values remain strings.
In this guide
Purpose and lifecycle
One extraction rule and its validation requirements. Exported values remain strings.
Definition and availability
Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.
Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.
export interface JobField {
name: string;
selector: string;
selector_type?: 'css' | 'xpath' | 'regex' | 'text' | 'after_text' | 'before_text';
extract_type?: 'text' | 'price' | 'datetime' | 'url' | `attr:${string}`;
required?: boolean;
default?: string;
data_type?: 'string' | 'integer' | 'float' | 'boolean';
normalize_whitespace?: boolean;
min_length?: number;
}Members
| Member | Kind | Return / value type | Source status |
|---|---|---|---|
| name | property | string | Present in source |
| selector | property | string | Present in source |
| selector_type | property | "css" | "xpath" | "regex" | "text" | "after_text" | "before_text" | undefined | Present in source |
| extract_type | property | "text" | "price" | "datetime" | "url" | `attr:${string}` | undefined | Present in source |
| required | property | boolean | undefined | Present in source |
| default | property | string | undefined | Present in source |
| data_type | property | "string" | "boolean" | "integer" | "float" | undefined | Present in source |
| normalize_whitespace | property | boolean | undefined | Present in source |
| min_length | property | number | undefined | Present in source |
name
Unique field name or context-specific item name.
Returns / value: string.
name: string;selector
Field selector. With row_selector, matches are assigned to the row container.
Returns / value: string.
selector: string;selector_type
css (default), xpath, regex, text, after_text or before_text.
Returns / value: "css" | "xpath" | "regex" | "text" | "after_text" | "before_text" | undefined.
selector_type?: 'css' | 'xpath' | 'regex' | 'text' | 'after_text' | 'before_text';extract_type
text (default), price, datetime, url or attr:name.
Returns / value: "text" | "price" | "datetime" | "url" | `attr:${string}` | undefined.
extract_type?: 'text' | 'price' | 'datetime' | 'url' | `attr:${string}`;required
Reject empty/whitespace-only required fields; default false for job fields.
Returns / value: boolean | undefined.
required?: boolean;default
Fallback when extraction is empty.
Returns / value: string | undefined.
default?: string;data_type
string (default), integer, float or boolean validation; output remains string-valued.
Returns / value: "string" | "boolean" | "integer" | "float" | undefined.
data_type?: 'string' | 'integer' | 'float' | 'boolean';normalize_whitespace
Collapse whitespace runs; default true.
Returns / value: boolean | undefined.
normalize_whitespace?: boolean;min_length
Minimum character count after normalization; default 0.
Returns / value: number | undefined.
min_length?: number;Errors and operational limits
See the consuming API for validation and failure behavior. Types and enum declarations do not perform network requests by themselves.
Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.