Alibaba
Learn how to start scraping Alibaba.
With Web Scraper API, you can scrape various types of Alibaba pages; below is an overview of all supported scrapers and their respective source values. The response returns the page HTML in content, in the standard response structure described in Realtime and Push-Pull.
alibaba_search
Search page for a search term of your choice.
alibaba_product
Product page of a product ID of your choice.
Any other Alibaba page can be scraped by passing its url alone, no source needed.
Search
Request sample
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "alibaba_search",
"query": "case"
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'alibaba_search',
'query': 'case'
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload
)
# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())Request parameter values
source
Sets the scraper.
alibaba_search
query
The keyword or phrase to search for products.
-
start_page
Starting page number.
1
- mandatory parameter
Product
Request samples
Request parameter values
source
Sets the scraper.
alibaba_product
product_id
13-digit Alibaba product ID, the number at the end of the product URL (…/product-detail/<name>_<product_id>.html).
-
– mandatory parameter
Localization and Filtering
Alibaba shows prices in the currency of the visitor's market. Use geo_location with a country name to get results for that market, for example Germany (prices in €) or United Kingdom (prices in £). Without geo_location, results are served for the United States (US $).
For accepted geo_location values, see Proxy location.
Last updated
Was this helpful?