Skip to main content
You can pass parsing instructions to Scraper APIs for selecting the data that you need. Parsing instructions allow you to manually select website elements for parsing. Use custom_parsing parameter in conjunction with parse set to true.

HTML

element_text

NameArgumentsDescription
element_text-Extract text from HTML & remove whitespaces

xpath

NameArgumentsDescription
xpathxpath_expressions Type: string Required: trueApplies an XPath expression to the provided input value. If the execution does not yield a result, the subsequent expression in the array is utilized. Expressions can incorporate XSLT functions and are compatible with XPath version 1.0 and XSLT version 1.0.

xpath_one

css

css_one

Data Manipulation

amount_from_string

NameArgumentsDescription
amount_from_string-Locate the initial instance of a numerical value within a string and transform it into a floating-point number.

amount_range_from_string

NameArgumentsDescription
amount_range_from_string-Identifies every numeric value in a string and changes them into floating-point numbers.

join

regex_find_all

NameArgumentsDescription
regex_find_allseparator Type: string Required: false Default: ""Identifies all strings that conform to a specified regular expression pattern.

regex_substring

length

NameArgumentsDescription
length-Obtains the length of the array. When a multi-dimensional array is given as input, the function operates on the innermost array.

select_nth

NameArgumentsDescription
select_nthindex Type: integer Required: trueProvides the nth element from the array, utilizing zero-based indexing. Negative indexes can be used to select items from the end of the array, such as the last (-1) or second last (-2) elements.

convert_to_float

NameArgumentsDescription
convert_to_float-Converts a string or an integer to a floating point number.

convert_to_int

NameArgumentsDescription
convert_to_int-Converts a string or a floating point number to an integer.

convert_to_str

NameArgumentsDescription
convert_to_str-Converts an integer or a floating point number to a string.

average

NameArgumentsDescription
averageround_precision Type: integer Required: falseCalculates the average of values in an array.

max

NameArgumentsDescription
max-Finds the biggest value in an array.

min

NameArgumentsDescription
min-Finds the smallest value in an array.

product

NameArgumentsDescription
product-Returns the result of multiplying all the values in the array together.

Examples

In these examples, we are using https://www.ebay.com/.

Extract products, price & descriptions

Extract product information


Support

Need help or just want to say hello? Our support is available 24/7.
You can also reach us anytime via email at support@decodo.com.

Feedback

Can’t find what you’re looking for? Request an article!
Have feedback? Share your thoughts on how we can improve.