Skip to content

About

Alibaba scraper API: Alibaba Product Details, Alibaba Product Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Alibaba Scraper API

Scrape Alibaba with a JSON API. This repo has working Python examples for DataGuru's Alibaba scraper APIs: Alibaba Product Details and Alibaba Product Search.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0012 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

Alibaba APIs

API What it returns Price Page
Alibaba Product Details Get product details from an Alibaba product URL, including quantity-based prices, minimum order, specifications, purchase options, images and supplier information. $0.0022 https://dataguru.cc/apis/alibaba-product-details/
Alibaba Product Search Search Alibaba by keyword and get matching wholesale products with titles, price ranges, minimum order quantities, images, and supplier details. $0.0012 https://dataguru.cc/apis/alibaba-product-search/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/alibaba-scraper-api.git
cd alibaba-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py alibaba-product-details

Examples

Every example covers all 2 Alibaba APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O alibaba.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

Alibaba Product Details

Get product details from an Alibaba product URL, including quantity-based prices, minimum order, specifications, purchase options, images and supplier information.

Parameter Type Required Description
location string no Two-letter country code (default US). Prices and currency follow this country.
product_url string yes Full Alibaba product URL (e.g. https://www.alibaba.com/product-detail/Wireless-Headphones_1601749124707.html).

Response fields: product_id, title, url, brand, price, min_order, rating, images, videos, options, specifications, categories, ships_from, supplier, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/alibaba/products/details" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url": "https://www.alibaba.com/product-detail/Us-Warehouse-Direct-Sales-Noise-Cancelling_1602004873313.html"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "product_id": "1234567890",
  "title": "string",
  "url": "https://example.com/...",
  "brand": "string",
  "price": {
    "min_price": 0.0,
    "max_price": 0.0,
    "formatted_price": "string",
    "currency": "USD",
    "unit": "string",
    "tiers": [
      {
        "min_quantity": 0,
        "max_quantity": 0,
        "price": 0.0,
        "formatted_price": "string"
      }
    ]
  },
  "min_order": "string",
  "rating": {
    "average_rating": 0.0,
    "review_count": 0
  },
  "images": [
    "string"
  ],
  "videos": [
    "string"
  ],
  "options": {},
  "specifications": {},
  "categories": [
    "string"
  ],
  "ships_from": "string",
  "supplier": {
    "name": "string",
    "url": "https://example.com/...",
    "country": "string",
    "business_type": "string",
    "years_on_platform": "string",
    "employees": "string",
    "response_time": "string",
    "on_time_delivery_rate": "string",
    "average_rating": 0.0,
    "review_count": 0
  },
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "Alibaba Product Details",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

Alibaba Product Search

Search Alibaba by keyword and get matching wholesale products with titles, price ranges, minimum order quantities, images, and supplier details.

Parameter Type Required Description
limit integer no Maximum number of search results to return (up to 40). Default: 24.
location string no Two-letter country code (default US). Prices and currency follow this country.
query string yes Search keywords in English, e.g. "wireless headphones"

Response fields: query, total_results, returned_results, results, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/alibaba/products/search" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "wireless headphones"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "query": "string",
  "total_results": 0,
  "returned_results": 0,
  "results": [
    {
      "product_id": "1234567890",
      "title": "string",
      "url": "https://example.com/...",
      "price": {
        "min_price": 0.0,
        "max_price": 0.0,
        "formatted_price": "string",
        "currency": "USD"
      },
      "min_order": "string",
      "image": "string",
      "images": [
        "string"
      ],
      "supplier": {
        "name": "string",
        "url": "https://example.com/...",
        "country": "string",
        "years_on_platform": "string",
        "average_rating": 0.0,
        "review_count": 0
      },
      "sponsored": false
    }
  ],
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "Alibaba Product Search",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

Alibaba scraper API: Alibaba Product Details, Alibaba Product Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors