Developers

Web Scraping API

Reference

Parsing functions

Selector, string, type-conversion and aggregate functions for extraction rules.

Argument shapes

Set _fn to the function name and _args to its settings. Selector and regular-expression functions use an array. join and select_nth take a scalar value. Functions without settings omit _args. Wrong argument shapes can return null with parser status 12005 and a warning.

HTML functions

FunctionArgumentsResult
xpath / xpath_oneArray of XPath expressionsAll matches or the first match; XPath 1.0 and XSLT 1.0.
css / css_oneArray of CSS expressionsHTML elements, or the first element.
element_textNoneTrimmed text of an HTML element.

Scroll horizontally to read all columns.

String functions

FunctionArgumentsResult
amount_from_stringNoneFirst numeric amount as a float.
amount_range_from_stringNoneAll numeric amounts as floats.
joinSeparator string, for example " "One string from a string list.
regex_find_allArray: patternAll matching strings.
regex_searchArray: pattern and optional group numberSelected match or group.
regex_substringArray: pattern and replacementString with matching parts replaced.

Scroll horizontally to read all columns.

Arrays and conversions

FunctionArgumentsResult
lengthNoneArray length.
select_nthInteger indexSelected item; negative indices count from the end.
convert_to_floatNoneString or integer converted to a float.
convert_to_intNoneString or float converted to an integer.
convert_to_strNoneNumeric input converted to a string.

Scroll horizontally to read all columns.

Aggregate functions

FunctionArgumentsResult
averageOptional rounding precisionMean of numeric values.
max / minNoneLargest or smallest numeric value.
productNoneProduct of numeric values.

Scroll horizontally to read all columns.

Search documentation

Search guides, products and reference pages.