Other Targets

This data type is universal and can be applied to any target. It accepts URLs along with additional parameters. You can find the list of all the available parameters in the URL section.

Overview

Below is a quick overview of all the available data source values we support with other targets.

SourceDescriptionStructured data

universal_ecommerce

Submit any URL you like.

Depends on the URL.

You can always write your own parsing instructions with Custom Parser feature and get structured data.

Code examples

Simple request

In this example, the API will retrieve an e-commerce product page.

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "universal_ecommerce",
        "url": "https://sandbox.oxylabs.io/products/1"
    }'

The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.

All parameters

In this example, all available parameters are included (though not always necessary or compatible within the same request), to give you an idea on how to format your requests.

{
    "source": "universal_ecommerce", 
    "url": "https://example.com", 
    "user_agent_type": "desktop",
    "geo_location": "United States",
    "parse": true,
    "parser_type": "ecommerce_product", 
    "context": [
        {
            "key": "headers", 
            "value": {
                "Content-Type": "application/octet-stream", 
                "Custom-Header-Name": "custom header content"
            }
        }, 
        {
            "key": "cookies", 
            "value": [
                {
                    "key": "NID", 
                    "value": "1234567890"
                },
                {
                    "key": "1P JAR",
                    "value": "0987654321"
                }]
        },
        {
            "key": "follow_redirects",
            "value": true
        },
        {
            "key": "http_method", "value": "get"
        },
        {
            "key": "content",
            "value": "YmFzZTY0RW5jb2RlZFBPU1RCb2R5"
        },
        {
            "key": "successful_status_codes",
            "value": [808, 909]
        }]
}

Query parameters

ParameterDescriptionDefault Value

source

Data source. More info.

universal_ecommerce

url

Direct URL (link) to Universal page

-

user_agent_type

Device type and browser. The full list can be found here.

desktop

geo_location

Geo location of proxy used to retrieve the data. The complete list of the supported locations can be found here.

render

Enables JavaScript rendering. More info.

content_encoding

Add this parameter if you are downloading images. Learn more here.

base64

context: content

Base64-encoded POST request body. It is only useful if http_method is set to post.

-

context: cookies

Pass your own cookies.

-

context: follow_redirects

Set to true to enable scraper to follow redirects. By default, redirects are followed up to a limit of 10 links, treating the entire chain as one scraping job.

false

context: headers

Pass your own headers.

-

context: http_method

Set it to post if you would like to make a POST request to your target URL via E-commerce Universal Scraper.

get

context: session_id

If you want to use the same proxy with multiple requests, you can do so by using this parameter. Just set your session to any string you like, and we will assign a proxy to this ID, and keep it for up to 10 minutes. After that, if you make another request with the same session ID, a new proxy will be assigned to that particular session ID.

-

context: successful_status_codes

Define a custom HTTP response code (or a few of them), upon which we should consider the scrape successful and return the content to you. May be useful if you want us to return the 503 error page or in some other non-standard cases.

-

callback_url

URL to your callback endpoint. More info.

-

parse

true will return structured data, as long as the URL submitted directs to an e-commerce product page. Use this parameter in combination with parser_type parameter to use our AI-powered Adaptive Parser.

false

parser_type

Set the value to ecommerce_product to access our AI-powered Adaptive Parser.

-

- required parameter

If you are observing low success rates or retrieve empty content, please try using additional "render": "html" parameter in your request. More info about using render parameter can be found here.

Forming URLs

Wayfair

Job parameter assignment to URL:

https://www.wayfair.<domain>/keyword.php?keyword=<query>&itemsperpage=<limit>&curpage=<start_page>

When forming URLs, please follow these instructions:

  1. Encoding search terms: search terms must be URL encoded. For instance, spaces should be replaced with %20, which represents a space character in a URL.

  2. Parameters: If limit is equal to 48 and start_page is equal to 1, then following additional parameters have to be appended to URL:

    1. command=dosearch

    2. new_keyword_search=true

Built URL examples

https://www.wayfair.com/keyword.php?keyword=test&itemsperpage=24&curpage=1
https://www.wayfair.fr/keyword.php?keyword=t%202&itemsperpage=48&curpage=1&command=dosearch&new_keyword_search=true

Equivalent job example

Decommissioned wayfair_search source:

{
   "source": "wayfair_search",
   "query": "test",
   "domain": "com",
   "limit": 5,
   "start_page": 3
}

Updated universal_ecommerce source:

{
   "source": "universal_ecommerce",
   "url": "https://www.wayfair.com/keyword.php?keyword=room&itemsperpage=5&curpage=10"
}

Parameter values

Geo_Location

Check the complete list of supported geo_location values here.

Here is an example:

"United Arab Emirates",
"Albania",
"Armenia",
"Angola",
"Argentina",
"Australia",
...
"Uruguay",
"Uzbekistan",
"Venezuela Bolivarian Republic of",
"Vietnam",
"South Africa",
"Zimbabwe"

HTTP_Method

E-commerce Universal Scraper API supports two HTTP(S) methods: GET (default) and POST.

"GET",
"POST"

Last updated