访问API
-
创建 API key
登录 shifter.io/panel,打开 SERP API > API Keys。Amazon 共用 SERP API key 池。复制一个有效的 key。
-
选择一个市场
默认值为
amazon.com。如需指定其他市场,传入domain=<host>。完整列表见:支持的域名。 -
发送你的第一个请求
Terminal window curl "https://ecom.shifter.io/v1?engine=amazon&api_key=YOUR_API_KEY&type=search&q=memory+card"import requestsparams = {"engine": "amazon","api_key": "YOUR_API_KEY","type": "search","q": "memory card",}r = requests.get("https://ecom.shifter.io/v1", params=params)print(r.json()["search_results"][:3])import fetch from 'node-fetch';const url = 'https://ecom.shifter.io/v1?' + new URLSearchParams({engine: 'amazon', api_key: 'YOUR_API_KEY',type: 'search', q: 'memory card',});const data = await (await fetch(url)).json();console.log(data.search_results.slice(0, 3)); -
切换 type
将
type=search改为其他任意支持的值(product、bestsellers、deals、category、seller_profile、seller_products、seller_feedback)。每种类型都有各自所需的参数,详见各端点页面。
基础 URL
Section titled “基础 URL” GET https://ecom.shifter.io/v1
在每个请求中将 api_key 作为查询参数传入。身份验证失败会返回 HTTP 401。