Documentation has been updated: see help center and changelog in one place.
🆕Explore
LogoLogo
Oxylabs dashboardContact usProduct
English
  • Documentation
  • Help center
  • Changelog
English
  • Overview
  • PROXIES
    • Integration Guides
      • Get IP Address for Integrations
      • Residential Proxies Guides
        • AdsPower
        • Android
        • ClonBrowser
        • Dolphin Anty
        • Ghost Browser
        • GoLogin
        • Helium Scraper
        • Incogniton
        • iOS
        • Kameleo
        • Lalicat Browser
        • MacOS
        • MoreLogin
        • MuLogin
        • Multilogin
        • Nstbrowser
        • Octoparse
        • Oxy® Proxy Extension for Chrome
        • ParseHub
        • Playwright
        • Puppeteer
        • Selenium
        • SEO Neo
        • SessionBox
        • Shadowrocket
        • Super Proxy
        • SwitchyOmega
        • Ubuntu
        • VMLogin
        • WebHarvy
        • Hidemyacc
      • ISP Proxies Guides
        • AdsPower
        • Android
        • Dolphin Anty
        • FoxyProxy
        • GoLogin
        • Incogniton
        • iOS
        • Lalicat Browser
        • MacOS
        • MoreLogin
        • MuLogin
        • Multilogin
        • Nstbrowser
        • Octoparse
        • Oxy® Proxy Extension for Chrome
        • SEO Neo
        • Shadowrocket
        • Sphere
        • Super Proxy
        • SwitchyOmega
        • Ubuntu
        • Hidemyacc
      • Mobile Proxies Guides
        • AdsPower
        • Android
        • ClonBrowser
        • Dolphin Anty
        • Ghost Browser
        • GoLogin
        • Helium Scraper
        • Incogniton
        • iOS
        • Kameleo
        • Lalicat Browser
        • MacOS
        • MoreLogin
        • MuLogin
        • Multilogin
        • Nstbrowser
        • Octoparse
        • Oxy® Proxy Extension for Chrome
        • ParseHub
        • Playwright
        • Puppeteer
        • Selenium
        • SEO Neo
        • SessionBox
        • Shadowrocket
        • SwitchyOmega
        • Ubuntu
        • VMLogin
        • WebHarvy
      • Dedicated Datacenter Proxies Guides
        • Enterprise
          • Dolphin Anty
          • FoxyProxy
          • GoLogin
          • Lalicat Browser
          • MoreLogin
          • MuLogin
          • Nstbrowser
          • Octoparse
          • Oxy® Proxy Extension for Chrome
          • SEO Neo
          • Shadowrocket
          • Sphere
          • Super Proxy
          • SwitchyOmega
          • Ubuntu
          • Hidemyacc
        • Self-Service
          • Android
          • Dolphin Anty
          • FoxyProxy
          • GoLogin
          • iOS
          • Lalicat Browser
          • MacOS
          • MoreLogin
          • MuLogin
          • Nstbrowser
          • Octoparse
          • Oxy® Proxy Extension for Chrome
          • SEO Neo
          • Shadowrocket
          • Sphere
          • Super Proxy
          • SwitchyOmega
          • Ubuntu
          • Hidemyacc
      • Datacenter Proxies Guides
        • AdsPower
        • Android
        • Dolphin Anty
        • GoLogin
        • iOS
        • Lalicat Browser
        • MacOS
        • MoreLogin
        • MuLogin
        • Nstbrowser
        • Octoparse
        • Oxy® Proxy Extension for Chrome
        • SEO Neo
        • Shadowrocket
        • Super Proxy
        • SwitchyOmega
        • Ubuntu
        • Hidemyacc
    • Residential Proxies
      • Getting Started
      • Making Requests
        • Entry Node for China
      • Location Settings
        • Country
        • City
        • State
        • Continent
        • ZIP/Postal code
        • Coordinates
        • ASN Targeting
      • Session Control
        • Sticky Proxy Entry Nodes
      • Protocols
      • Whitelisting IPs
        • Requests with Whitelisted IPs
      • Endpoint Generator
      • Restricted Targets
      • Public API
      • Response Codes
    • ISP Proxies
      • Making Requests
      • Proxy List
      • Proxy Rotation
      • Location Settings
      • Protocols
      • Whitelisting IPs
      • Response Codes
      • Restricted Targets
      • Fair usage policy
    • Mobile Proxies
      • Getting Started
      • Making Requests
        • Entry Node for China
      • Location Settings
        • Country
        • City
        • State
        • Continent
        • Coordinates
        • ASN Targeting
      • Session Control
        • Sticky Proxy Entry Nodes
      • Protocols
      • Whitelisting IPs
      • Endpoint Generator
      • Restricted Targets
      • Public API
      • Response Codes
    • Datacenter Proxies
      • Proxy List
      • IP Control
      • Select Country
      • Protocols
      • Whitelisting
      • Response Codes
      • Restricted Targets
      • Fair usage policy
      • Free Datacenter IPs
    • Dedicated Datacenter Proxies
      • Enterprise
        • Getting Started
        • Proxy List
        • Making Requests
        • Protocols
        • Whitelisting IPs
          • Dashboard
          • RESTful
            • Getting Whitelisted IPs List
            • Adding a Whitelisted IP
            • Removing a Whitelisted IP
            • Saving Changes (5min Cooldown)
        • Datacenter Proxy API
        • Proxy Rotator - Optional
        • Response Codes
      • Self-Service
        • Getting Started
        • Making Requests
        • Proxy List
        • Proxy Rotation
        • Location Settings
        • Protocols
        • Whitelisting IPs
        • Response Codes
        • Restricted Targets
        • Fair usage policy
    • Dedicated ISP Proxies
      • Getting Started
      • Proxy List
      • Making Requests
      • Protocols
      • Whitelisting IPs (RESTful)
        • Getting Whitelisted IPs List
        • Adding a Whitelisted IP
        • Removing a Whitelisted IP
        • Saving Changes (5min Cooldown)
      • Proxy API
      • Proxy Rotator - Optional
      • Response Codes
  • Advanced proxy solutions
    • Web Unblocker
      • Getting Started
      • Making Requests
        • Session
        • Geo-location
        • Headers & Cookies
        • Custom status code
        • POST requests
      • Headless Browser
        • JavaScript rendering
        • Browser instructions (Beta)
          • List of instructions
      • Sample Response
      • Response Codes
      • Rate Limits
      • Migration Guides
        • From Bright Data Web Unlocker
      • Usage Statistics
      • Billing Information
  • VIDEO DATA
    • High-Bandwidth Proxies
      • YouTube Downloader (yt_dlp) integration
  • Video Data API
  • Scraper APIs
    • Web Scraper API
      • Integration Methods
        • Realtime
        • Push-Pull
        • Proxy Endpoint
      • Features
        • Localization
          • Proxy Location
          • SERP Localization
          • E-Commerce Localization
          • Domain, Locale, Results Language
        • JS Rendering & Browser Control
          • JavaScript Rendering
          • Browser Instructions
            • List of instructions
        • Result Processing & Storage
          • Dedicated Parsers
          • Custom Parser
            • Getting started
            • Parsing instruction examples
            • List of functions
              • Function examples
          • Download Images
          • Cloud Storage
        • HTTP Context & Job Management
          • Headers, Cookies, Method
          • User Agent Type
          • Client Notes
        • Scheduler
      • Solutions for AI Workflows
        • Model Context Protocol (MCP)
        • LangChain
        • LlamaIndex
      • Targets
        • Google
          • Search
            • Web Search
            • AI Overviews
            • Image Search
            • News Search
            • Local Search
            • Reverse Image Search
            • Google Suggest
          • Ads Max
          • Shopping
            • Shopping Product
            • Shopping Search
            • Shopping Pricing
          • Trends: Explore
          • Travel: Hotels
          • Lens
          • URL
        • Amazon
          • Product
          • Search
          • Pricing
          • Sellers
          • Best Sellers
          • Reviews
          • Questions & Answers
          • URL
        • YouTube
          • YouTube Scraping Guide for AI
          • YouTube Search
          • YouTube Video Trainability
          • YouTube Metadata
          • YouTube Downloader
          • YouTube Transcript
        • Generic Target
        • Walmart
          • Search
          • Product
        • Ebay
        • Etsy
          • Search
          • Product
        • Bing
          • Search
          • URL
        • North American E-Commerce
          • Best Buy
            • Search
            • Product
          • Target
            • Search
            • Product
            • Category
          • Kroger
            • Product
            • Search
            • URL
          • Costco
          • Bed Bath & Beyond
          • Menards
          • Petco
          • Staples
          • Grainger
          • Instacart
        • European E-Commerce
          • Allegro
            • Search
            • Product
          • Idealo
          • Mediamarkt
          • Cdiscount
        • Asian E-Commerce
          • Alibaba
          • Aliexpress
          • Lazada
          • Rakuten
          • Tokopedia
          • Flipkart
          • Avnet
          • Indiamart
        • Latin American E-Commerce
          • Mercado Livre
          • Magazine Luiza
          • Falabella
          • Dcard
      • Restricted Targets
      • Response Codes
    • OxyCopilot (Beta)
    • Usage and Billing
      • Usage Statistics
      • Traffic and Billing
      • Rate Limits
    • Unblocking Browser
      • Chrome
      • Firefox
      • Device Type
      • Restricted Targets
      • Integration with MCP
  • Dashboard
    • Teams
    • Billing Information
      • Accessing Billing Information
      • Managing Payment Methods
      • Updating Billing Information
      • Canceling a Subscription
    • IP Replacement
  • Guides for Scraper APIs
    • Python SDK
    • Go SDK
    • Forming Requests
    • Forming URLs
    • Using Postman
  • Useful links
    • Oxylabs Dashboard
    • Release Notes
    • Network status
    • Open Source Tools
      • Oxy Parser
      • Oxy Mouse
      • Web Scraper API Scheduler
    • Discord Community
    • GitHub
    • Scraping Experts
  • SUPPORT
    • FAQ
    • Have a Question?
Powered by GitBook
On this page
  • HTML processing
  • element_text
  • xpath
  • xpath_one
  • css
  • css_one
  • String manipulation
  • amount_from_string
  • amount_range_from_string
  • join
  • regex_find_all
  • regex_search
  • regex_substring
  • Common
  • length
  • select_nth
  • convert_to_float
  • convert_to_int
  • convert_to_str
  • Math
  • average
  • max
  • min
  • product

Was this helpful?

  1. Scraper APIs
  2. Web Scraper API
  3. Features
  4. Result Processing & Storage
  5. Custom Parser

List of functions

HTML processing

element_text

  • Name: element_text

  • Description: Extracts text from html. Strips leading and trailing whitespaces.

  • Args: n/a

  • Valid input types: html

  • Expected output types: str

xpath

  • Name: xpath

  • Description: Executes an XPath expression on the given input value. If the execution fails to produce a result, the following expression in the array is used. XSLT functions can be used in expressions. XPath version 1.0 is supported. XSLT version 1.0 is supported.

  • Args:

    • xpath_expressions

      • Type: [str]

      • Required: true

  • Valid input types:

    • html

  • Expected output types:

    • [str]

    • [html]

    • str

    • float

    • bool

xpath_one

  • Name: xpath_one

  • Description: Works the same way as xpath, but returns only the first value even if more than one value is selected by the provided XPath.

  • Args:

    • xpath_expressions

      • Type: [str]

      • Required: true

  • Valid input types:

    • html

  • Expected output types:

    • str

    • html

    • str

    • float

    • bool

css

  • Name: css

  • Description: Executes an CSS expression on the given input value. If the execution fails to produce a result, the following expression in the array is used. Please note that the output of the css function always is a JSON array containing HTML elements (including the opening and closing tags). If you're interested in extracting the content of the element, you may execute the element_text function afterwards.

  • Args:

    • css_expressions

      • Type: [str]

      • Required: true

  • Valid input types:

    • html

  • Expected output types:

    • [html_element]

css_one

  • Name: css_one

  • Description: Works the same way as css, but returns only the first value even if more than one value is selected by the provided CSS expression. Please note that the output of the css_one function always is an HTML element (including the opening and closing tags). If you're interested in extracting the content of the element, you may execute the element_text function afterwards.

  • Args:

    • css_expressions

      • Type: [str]

      • Required: true

  • Valid input types:

    • html

  • Expected output types:

    • html_element

String manipulation

amount_from_string

  • Name: amount_from_string

  • Description: Find the first occurrence of a numeric value in a string and convert it to a float.

  • Args: n/a

  • Valid input types:

    • str

  • Expected output types:

    • float

amount_range_from_string

  • Name: amount_range_from_string

  • Description: Finds all occurrences of numeric values in a string and converts them to floats.

  • Args: n/a

  • Valid input types:

    • str

  • Expected output types:

    • [float]

join

  • Name: join

  • Description: Joins a list of strings into a single string. Joined values are separated by the separator value.

  • Args:

    • separator

      • Type: str

      • Required: false

      • Default: ""

  • Valid input types:

    • [str]

  • Expected output types:

    • str

regex_find_all

  • Name: regex_find_all

  • Description: Finds all strings that match a given RegEx expression.

  • Args:

    • regex_pattern

      • Type: str

      • Required: true

  • Valid input types:

    • str

  • Expected output types:

    • [str]

regex_search

  • Name: regex_search

  • Description: Finds a string that matches the given RegEx expression. Returns the specified matching group (defaults to 0).

  • Args:

    • regex_pattern

      • Type: str

      • Required: true

    • group_to_return

      • Type: int

      • Required: false

      • Default: 0

  • Valid input types:

    • str

  • Expected output types:

    • str

regex_substring

  • Name: regex_substring

  • Description: Finds a string that matches the given RegEx expression. Returns the specified matching group (defaults to 0).

  • Args:

    • regex_pattern

      • Type: str

      • Required: true

    • group_to_return

      • Type: int

      • Required: false

      • Default: 0

  • Valid input types:

    • str

  • Expected output types:

    • str

Common

length

  • Name: length

  • Description: Gets the length of the array. If a multi-dimensional array is provided as input, the function will work on the innermost array.

  • Args: n/a

  • Valid input types:

    • [OneDimensionalArray]

  • Expected output types:

    • int

select_nth

  • Name: select_nth

  • Description: Returns the nth array element. Zero-based indexing is used. Supports negative indexes to select last (-1), second last (-2), … item from an array.

  • Args:

    • index

      • Type: int

      • Required: true

  • Valid input types:

    • [AnyType]

  • Expected output types:

    • AnyType

convert_to_float

  • Name: convert_to_float

  • Description: Converts a string or an int to a float.

  • Args: n/a

  • Valid input types:

    • str

    • int

  • Expected output types:

    • float

convert_to_int

  • Name: convert_to_int

  • Description: Converts a string or a float to an int.

  • Args: n/a

  • Valid input types:

    • str

    • float

  • Expected output types:

    • int

convert_to_str

  • Name: convert_to_str

  • Description: Converts an int or a float to a string.

  • Args: n/a

  • Valid input types:

    • int

    • float

  • Expected output types:

    • string

Math

average

  • Name: average

  • Description: Calculates the average of values in an array.

  • Args:

    • round_precision

      • Type: int

      • Required: false

  • Valid input types:

    • [int]

    • [float]

  • Expected output types:

    • float

max

  • Name: max

  • Description: Finds the greatest value in an array.

  • Args: n/a

  • Valid input types:

    • [float]

    • [int]

  • Expected output types:

    • float

    • int

min

  • Name: min

  • Description: Finds the smallest value in an array.

  • Args: n/a

  • Valid input types:

    • [float]

    • [int]

  • Expected output types:

    • float

    • int

product

  • Name: product

  • Description: Returns the multiplication product of all array values.

  • Args: n/a

  • Valid input types:

    • [float]

    • [int]

  • Expected output types:

    • float

    • int

PreviousParsing instruction examplesNextFunction examples

Last updated 11 months ago

Was this helpful?