主题
Amazon Merchant API 地点列表
GET /v3/merchant/amazon/locations
本接口提供 Amazon Merchant API 支持的地点列表,可按国家/地区筛选。
GET /v3/merchant/amazon/locationsGET /v3/merchant/amazon/locations/$country
,$country 为国家或地区的 ISO 代码,例如 us。
> 注意: 由于地区限制,本平台暂不支持俄罗斯和白俄罗斯的地点。
计费说明
调用本接口不收取费用,响应中的 cost 通常为 0。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
完整的 Amazon 地点列表可通过本接口获取,也可以使用平台提供的地点数据文件进行离线处理。
请求参数
路径参数
当使用 GET /v3/merchant/amazon/locations/$country 时,将 $country 替换为国家或地区的 ISO 代码。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
country | string | 否 | 国家或地区 ISO 代码,用于筛选地点列表。例如:us。 |
请求示例
获取支持的 Amazon 地点:
http
GET https://api.seermartech.cn/v3/merchant/amazon/locations
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json获取美国地点:
http
GET https://api.seermartech.cn/v3/merchant/amazon/locations/us
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json响应结构
接口返回 JSON 数据 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求的通用状态码。 |
status_message | string | 请求的通用说明信息。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks素字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,采用 UUID 格式。 |
status_code | integer | 任务状态码,通常在 10000 至 60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 本次请求对应的 URL 路径。 |
data | object | URL 请求中传的参数。 |
result | array | 地点信息数组。 |
result 地点字段
| 字段 | 类型 | 说明 |
|---|---|---|
location_code | integer | 地点编码。 |
location_name | string | 地点完整名称。 |
location_name_parent | string | 上级地点名称。 |
country_iso_code | string | 地点所属国家或地区的 ISO 代码。 |
location_type | string | 地点类型。 |
地点信息示例:
json
{
"location_code": 9041134,
"location_name": "90290,California,United States",
"location_name_parent": "California,United States",
"country_iso_code": "US",
"location_type": "Postal Code"
}请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/merchant/amazon/locations" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"按国家筛选:
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/merchant/amazon/locations/us" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"PHP
php
<?php
$apiUrl = 'https://api.seermartech.cn';
$endpoint = '/v3/merchant/amazon/locations';
$ch = curl_init($apiUrl . $endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
if ($response === false) {
echo '请求失败:' . curl_error($ch);
} else {
$result = json_decode($response, true);
if (($result['status_code'] ?? null) === 20000) {
// 处理地点列表
print_r($result);
} else {
echo '错误码:' . ($result['status_code'] ?? 'unknown')
. ',错误信息:' . ($result['status_message'] ?? 'unknown');
}
}
curl_close($ch);TypeScript
typescript
import axios from 'axios';
axios({
method: 'get',
url: 'https://api.seermartech.cn/v3/merchant/amazon/locations',
headers: {
Authorization: 'Bearer smt_live_YOUR_KEY',
'Content-Type': 'application/json',
},
})
.then((response) => {
// 处理接口返回的地点列表
console.log(response.data);
})
.catch((error) => {
console.error('请求失败:', error.response?.data || error.message);
});Python
python
import requests
url = "https://api.seermartech.cn/v3/merchant/amazon/locations"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
result = response.json()
if result.get("status_code") == 20000:
# 处理地点列表
print(result)
else:
print(
"错误码:%s,错误信息:%s"
% (result.get("status_code"), result.get("status_message"))
)C#
csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
public static class AmazonMerchantLocations
{
public static async Task GetLocationsAsync()
{
using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "smt_live_YOUR_KEY");
var response = await httpClient.GetAsync(
"https://api.seermartech.cn/v3/merchant/amazon/locations"
);
var responseText = await response.Content.ReadAsStringAsync();
var result = JObject.Parse(responseText);
if ((int?)result["status_code"] == 20000)
{
// 处理地点列表
Console.WriteLine(result);
}
else
{
Console.WriteLine(
$"错误码:{result["status_code"]}," +
$"错误信息:{result["status_message"]}"
);
}
}
}响应示例
json
{
"version": "0.1.20200421",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2710 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "a3c8e7d1-5c10-4a4d-9b8f-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1200 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"merchant",
"amazon",
"locations"
],
"data": {
"api": "merchant",
"function": "locations",
"se": "amazon"
},
"result": [
{
"location_code": 9041134,
"location_name": "90290,California,United States",
"location_name_parent": "California,United States",
"country_iso_code": "US",
"location_type": "Postal Code"
}
]
}
]
}状态码
- 顶层
status_code用于表示本次请求的整体处理结果。 - 任务对象中的
status_code用于表示单个任务的处理结果。 - 当状态码为
20000时,表示请求成功。 - 状态码表示请求或任务处理异常,错误信息以
status_message为准。
实用场景
- 筛选 Amazon 目标市场地点:按国家或地区 ISO 代码获取可用地点,为跨境电商 SEO 和商品投放选择准确的市场范围。
- 构建地点选择器:读取地点编码、名称和层级,生成国家、省州、城市或邮编等多级筛选组件。
- 校验任务地点参数:在提交商品排名、或市场分析任务前验证地点编码是否受支持,减少无效请求。
- 统一地点维度数据:利用
location_code和location_type业务数据,按地区分析商品、流量和转化表现。 - 维护市场覆盖单:定期拉取完整地点列表,识别新增或下线的 Amazon 市场地点,保证与平台支持范围一致。