位置代码参考
SERP 与关键词 API 的 location_code 指定目标市场地理位置。以下为常用代码速查;完整列表可通过 API 动态获取。
常用 location_code
中国
| location_code | 地区 |
|---|---|
| 2156 | 中国 |
| 2157 | 北京 |
| 2158 | 上海 |
| 2159 | 广州 |
| 2160 | 深圳 |
| 2161 | 杭州 |
| 2162 | 成都 |
主要海外市场
| location_code | 地区 |
|---|---|
| 2840 | 美国 |
| 2826 | 英国 |
| 2124 | 加拿大 |
| 2036 | 澳大利亚 |
| 2276 | 德国 |
| 2250 | 法国 |
| 2392 | 日本 |
| 2410 | 韩国 |
| 2702 | 新加坡 |
| 2356 | 印度 |
以上为常用值,实际上游支持全球数千个 location。若不确定,请调用下方 API 查询。
获取完整位置列表
GET
/v3/serp/google/locationscurl -X GET "https://api.seermartech.cn/v3/serp/google/locations" \
-H "Authorization: Bearer smt_live_YOUR_KEY"Python
import requests
resp = requests.get(
"https://api.seermartech.cn/v3/serp/google/locations",
headers={"Authorization": "Bearer smt_live_YOUR_KEY"},
timeout=30,
)
locations = resp.json()["tasks"][0]["result"]
china = [l for l in locations if "China" in l.get("location_name", "")]
print(china[:5])TypeScript
const resp = await fetch("https://api.seermartech.cn/v3/serp/google/locations", {
headers: { Authorization: "Bearer smt_live_YOUR_KEY" },
});
const data = await resp.json();
const locations = data.tasks[0].result;
console.log(locations.filter((l: { location_name: string }) => l.location_name.includes("China")));语言代码
多数端点配合 language_code 使用,常见值:
| language_code | 语言 |
|---|---|
| zh | 中文 |
| en | 英语 |
| ja | 日语 |
| ko | 韩语 |
| de | 德语 |
| fr | 法语 |
完整语言列表:
GET
/v3/serp/google/languagescurl -X GET "https://api.seermartech.cn/v3/serp/google/languages" \
-H "Authorization: Bearer smt_live_YOUR_KEY"使用建议
- 国内 SEO 监控:
location_code: 2156+language_code: "zh" - 北美 B2B:
location_code: 2840+language_code: "en" - 出海多市场:按地区分别跑,不要混用 location_code