curl --request POST \
--url https://api.anysite.io/api/dhgate/products \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"product": "<string>",
"timeout": 300,
"currency": "USD",
"ship_to_country": "US"
}
'import requests
url = "https://api.anysite.io/api/dhgate/products"
payload = {
"product": "<string>",
"timeout": 300,
"currency": "USD",
"ship_to_country": "US"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({product: '<string>', timeout: 300, currency: 'USD', ship_to_country: 'US'})
};
fetch('https://api.anysite.io/api/dhgate/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/dhgate/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product' => '<string>',
'timeout' => 300,
'currency' => 'USD',
'ship_to_country' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/dhgate/products"
payload := strings.NewReader("{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/dhgate/products")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/dhgate/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "DhgateProduct",
"product_url": "<string>",
"product_title": "<string>",
"image": "<string>",
"images": [],
"video_url": "<string>",
"video_duration": 123,
"price": 123,
"max_price": 123,
"currency": "<string>",
"price_tiers": [],
"measure": "<string>",
"min_order": 123,
"max_order": 123,
"category": "<string>",
"category_id": "<string>",
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"units_sold": 123,
"review_count": 123,
"rating": 123,
"rating_breakdown": {
"@type": "DhgateProductRatingBreakdown",
"five_star": 123,
"four_star": 123,
"three_star": 123,
"two_star": 123,
"one_star": 123
},
"review_with_pic_count": 123,
"review_tags": [],
"features": [],
"specifications": [],
"description_url": "<string>",
"variants": [],
"shipping": {
"@type": "DhgateProductShipping",
"is_free": false,
"cost": 123,
"currency": "<string>",
"country": "<string>",
"stock_country": "<string>",
"delivery_time": "<string>",
"delivery_min_days": 123,
"delivery_max_days": 123,
"express_type": "<string>"
},
"store": {
"@type": "DhgateProductStore",
"id": "<string>",
"seller_id": "<string>",
"name": "<string>",
"url": "<string>",
"country": "<string>",
"positive_feedback_percent": 123,
"transaction_count": 123,
"item_count": 123,
"favorite_count": 123,
"opened_at": "<string>",
"business_type": "<string>",
"level": "<string>",
"tier": "<string>"
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/dhgate/products
Get a single DHgate product by id or product URL. Returns title, images and product video, the price range and per-quantity wholesale price tiers, minimum order and measure unit, category, weight and package dimensions, units sold, review count, rating with its star breakdown and review highlight tags, product features, the specification list, the variant axes (colour, compatible model and more, each with its values and images), the shipping option for the requested country (free flag, cost, delivery window, express type, stock country) and the seller store (id, name, positive feedback, transactions, item count, location, opening date, level).
Price: 20 credits
⚠️ Common errors: 412: Product not found or no longer listed on DHgate
curl --request POST \
--url https://api.anysite.io/api/dhgate/products \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"product": "<string>",
"timeout": 300,
"currency": "USD",
"ship_to_country": "US"
}
'import requests
url = "https://api.anysite.io/api/dhgate/products"
payload = {
"product": "<string>",
"timeout": 300,
"currency": "USD",
"ship_to_country": "US"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({product: '<string>', timeout: 300, currency: 'USD', ship_to_country: 'US'})
};
fetch('https://api.anysite.io/api/dhgate/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/dhgate/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product' => '<string>',
'timeout' => 300,
'currency' => 'USD',
'ship_to_country' => 'US'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/dhgate/products"
payload := strings.NewReader("{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/dhgate/products")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/dhgate/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product\": \"<string>\",\n \"timeout\": 300,\n \"currency\": \"USD\",\n \"ship_to_country\": \"US\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "DhgateProduct",
"product_url": "<string>",
"product_title": "<string>",
"image": "<string>",
"images": [],
"video_url": "<string>",
"video_duration": 123,
"price": 123,
"max_price": 123,
"currency": "<string>",
"price_tiers": [],
"measure": "<string>",
"min_order": 123,
"max_order": 123,
"category": "<string>",
"category_id": "<string>",
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"units_sold": 123,
"review_count": 123,
"rating": 123,
"rating_breakdown": {
"@type": "DhgateProductRatingBreakdown",
"five_star": 123,
"four_star": 123,
"three_star": 123,
"two_star": 123,
"one_star": 123
},
"review_with_pic_count": 123,
"review_tags": [],
"features": [],
"specifications": [],
"description_url": "<string>",
"variants": [],
"shipping": {
"@type": "DhgateProductShipping",
"is_free": false,
"cost": 123,
"currency": "<string>",
"country": "<string>",
"stock_country": "<string>",
"delivery_time": "<string>",
"delivery_min_days": 123,
"delivery_max_days": 123,
"express_type": "<string>"
},
"store": {
"@type": "DhgateProductStore",
"id": "<string>",
"seller_id": "<string>",
"name": "<string>",
"url": "<string>",
"country": "<string>",
"positive_feedback_percent": 123,
"transaction_count": 123,
"item_count": 123,
"favorite_count": 123,
"opened_at": "<string>",
"business_type": "<string>",
"level": "<string>",
"tier": "<string>"
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
120 <= x <= 1500USD, EUR, GBP, CAD, AUD, JPY, RUB, BRL, INR, MXN, KRW, TRY, SEK, NOK, DKK, PLN, CHF, NZD, SGD, HKD, THB, ILS, AED, SAR, ZAR, CZK US, GB, CA, AU, DE, FR, IT, ES, NL, BE, SE, NO, DK, FI, IE, PT, PL, CH, AT, CZ, GR, RU, BR, MX, CL, AR, JP, KR, CN, HK, TW, SG, MY, TH, ID, PH, VN, IN, AE, SA, IL, TR, ZA, NZ Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes