The target_search source is designed to retrieve Target search result pages. We can return the HTML for any Target page you like. Additionally, we can deliver structured (parsed) output for Target search pages.
Request samples
The example below illustrates how you can get a parsed Target search page result.
import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'target_search',
'query': 'iphone',
'render': 'html',
'parse': True,
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('user', 'pass1'),
json=payload,
)
# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())
# The whole string you submit has to be URL-encoded.
https://realtime.oxylabs.io/v1/queries?source=target_search&query=iphone&render=html&parse=true&access_token=12345abcde
The table below presents a detailed list of search results page element we parse, along with its description and data type. The table also includes some metadata.
Key
Description
Key Type
url
The URL of the search results page.
String
results
Container for the search results.
Dictionary
organic
List of organic (non-paid) search results.
List
organic.url
The URL of the individual product page.
String
organic.title
The title of the product.
String
organic.brand_link
The URL to the brand page.
String
organic.brand_name
The name of the brand.
String
organic.price_data
Container for the product price data.
Dictionary
organic.price_data.price
The price of the product.
Float
organic.price_data.currency
The currency of the price.
String
organic.price_data.upper_price
The upper price if there is a price range.
Float
organic.product_id
The unique product ID.
String
organic.rating_data
Container for the product rating data.
Dictionary
organic.rating_data.count
The number of ratings.
Integer
organic.rating_data.score
The average rating score.
Float
organic.rating_data.reviews_url
The URL to the reviews page.
String
organic.shipping_message
The shipping information for the product.
String
created_at
The timestamp when the scraping job was created.
String
updated_at
The timestamp when the scraping job was finished.
String
parse_status_code
Integer
page
The page number of the search results
Integer
status_code
Integer
parser_type
The type of parser used to extract the data.
String
job_id
The ID of the job associated with the scraping job.
String
Enables JavaScript rendering when set to html. .
URL to your callback endpoint. .
Device type and browser. The full list can be found .
The status code of the parsing job. You can see the parser status codes described .
The status code of the scraping job. You can see the scraper status codes described .