DHgate APIdhgate.com ↗
Access DHgate product search, category browsing, bulk pricing tiers, customer reviews, and flash deals via 5 structured API endpoints.
What is the DHgate API?
The DHgate API covers 5 endpoints that expose product search, category browsing, full product detail pages, customer reviews, and active flash deals from DHgate.com. The get_product_details endpoint returns price tiers for bulk purchasing, color and size variants, shipping options, seller ratings, and product specifications — all in a single call identified by an item code obtained from search_products or get_category_products.
curl -X GET 'https://api.parse.bot/scraper/024e9def-2f3c-46b2-820b-7badc7341d2a/search_products?page=1&sort=price_asc&query=laptop+bag&max_price=100&min_price=10' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace dhgate-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: DHgate SDK — search products, drill into details, check reviews and deals."""
from parse_apis.dhgate_api import DHgate, Sort, ProductNotFound
client = DHgate()
# Search for products with sort and price filter — limit caps total items fetched.
for product in client.productsummaries.search(query="wireless earbuds", sort=Sort.PRICE_ASC, limit=3):
print(product.name, product.price, product.seller)
# Drill down: take one item, then fetch full details.
summary = client.productsummaries.by_category(category_id="110", limit=1).first()
if summary:
detail = summary.details()
print(detail.name, detail.item_code)
for ship in detail.shipping[:2]:
print(ship.expressType, ship.deliveryTime, ship.shipcost)
# Sub-resource: reviews for a product.
if summary:
for review in summary.reviews.list(limit=3):
print(review.score, review.content[:60], review.country)
# Typed error handling on a bad item code.
try:
client.products.get(item_code="0000000000")
except ProductNotFound as exc:
print(f"Product not found: {exc.item_code}")
# Flash deals — single-page listing of current promotions.
for deal in client.flashdeals.list(limit=5):
print(deal.price, deal.original_price, deal.discount_percent, deal.save_price)
print("exercised: productsummaries.search / productsummaries.by_category / details / reviews.list / products.get / flashdeals.list")
Full-text search over DHgate product listings. Returns paginated results matching the query keyword, with optional price range filtering and sort control. Each result includes item code, name, price, URL, image, and seller info. Paginates via integer page number.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| sort | string | Sort order for results. |
| queryrequired | string | Search keyword. |
| max_price | string | Maximum price filter in USD (numeric string, e.g. '100'). |
| min_price | string | Minimum price filter in USD (numeric string, e.g. '10'). |
{
"type": "object",
"fields": {
"total": "integer total number of results",
"products": "array of product summary objects with item_code, name, price, url, image, seller, supplier_id"
},
"sample": {
"data": {
"total": 50,
"products": [
{
"url": "https://www.dhgate.com/product/vintage-style-laptop-sleeve-bag-envelope/1104927294.html",
"name": "Vintage Style Laptop Sleeve Bag Envelope Clutch with Metal Lock Document Organizer for Daily Use Fits 13-14 Inch Notebook",
"image": "",
"price": "$64.67",
"seller": "yxbggs",
"item_code": "1104927294",
"supplier_id": ""
}
]
},
"status": "success"
}
}About the DHgate API
Searching and Browsing Products
The search_products endpoint accepts a required query keyword and optional min_price, max_price (both USD numeric strings), sort, and page parameters. Results are paginated and each item in the products array includes item_code, name, price, url, image, seller, and supplier_id. The total field tells you how many matching products exist across all pages. The get_category_products endpoint works similarly but accepts a numeric category_id string — for example, '110' for Shoes & Accessories — and returns the same product summary shape without supplier_id.
Product Details and Variants
get_product_details takes a single item_code and returns the full detail record: a name string, an images array, an attributes array of color and size variant objects (each with attrName and itemAttrvalList), price_tiers for bulk quantity pricing, a shipping array with cost and delivery time per method, a seller_rating object summarizing the seller's review history, and a specifications object mapping spec names to values. Item codes flow directly from the search or category endpoints.
Reviews and Flash Deals
get_product_reviews paginates 10 reviews per page for a given item_code. Each object in reviewList includes reviewid, score, content, buyerNickname, country, createdDateText, and prodAttrs — the product attributes the buyer selected. The totalCount field indicates the full review volume. The get_flash_deals endpoint takes no inputs and returns all currently active deals, each with item_code, image, price, original_price, discount_percent, url, and save_price.
The DHgate API is a managed, monitored endpoint for dhgate.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dhgate.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dhgate.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a bulk-sourcing tool that reads
price_tiersfromget_product_detailsto calculate per-unit costs at different order quantities. - Aggregate competitor pricing by running
search_productswithmin_priceandmax_pricefilters across product categories. - Monitor flash deal availability using
get_flash_dealsto trackdiscount_percentandsave_pricechanges over time. - Populate a product catalog by combining
get_category_productsfor listing pages withget_product_detailsfor full spec pages. - Analyze seller quality by collecting
seller_ratingobjects across multiple item codes from the samesupplier_id. - Display localized review sentiment by filtering
reviewListentries bycountryfromget_product_reviews. - Automate price-drop alerts by comparing
original_pricevspricefields returned byget_flash_deals.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does DHgate have an official developer API?+
How does bulk pricing work in the `get_product_details` response?+
price_tiers field is an array of objects, each specifying a minimum quantity threshold and the corresponding per-unit price. For example, a product might return three tiers covering 1–9 units, 10–49 units, and 50+ units at progressively lower prices. This data maps directly to DHgate's quantity discount display on the product page.Does the API return seller store pages or seller-level product catalogs?+
supplier_id and seller_rating on product records, but there is no dedicated endpoint for browsing a seller's full storefront or retrieving all listings by a specific supplier_id. You can fork the API on Parse and revise it to add a seller-catalog endpoint using the supplier_id values already exposed.Are product variant stock levels returned by `get_product_details`?+
attributes array returns color and size variant definitions via attrName and itemAttrvalList, but per-variant inventory counts are not included in the response. The API covers pricing tiers, variant names, shipping options, and specifications. You can fork it on Parse and revise to add inventory availability if that data becomes a requirement.What is the page size for `get_product_reviews` and can it be changed?+
page input. Use totalCount in the response to determine how many pages are available for a given item_code.