API Hop 文档
Yelp 接口参考
搜索 Yelp 商户,查询商户详情、菜单和评论。
并发上限
AI 与 Data 分别共享账户级并发槽位,默认 5 AI / 2 Data,订阅套餐可调整上限。接口单独配置仍受分类总上限约束。达到任一上限返回 HTTP 429;异步任务执行结束前占用槽位。
GET /v1/yelp/search GET /v1/yelp/place GET /v1/yelp/reviews 搜索 Yelp 商户,查询商户详情、菜单和评论。
认证与计费
默认每次成功请求 $0.0003(300 credits)。 使用 API Hop API Key。可用性取决于已启用网关和密钥权限。每次成功请求的价格以当前目录和账户显示为准,账户专属价格优先。成功的空结果也计费,失败请求释放预占额度。超时为 60 秒,不自动重试或翻页,结算失败不会重复调用上游。
Authorization: Bearer YOUR_API_KEYYelp: 搜索地点
GET https://api.apihop.ai/v1/yelp/search
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
query | string | 搜索词; query: optional; UTF-8 bytes: 8192 | coffee shop |
language | string | 语言; language: optional | - |
location | string | 搜索起点; location: optional | Austin, TX |
latitude | number | 纬度; latitude: optional; min: -90; max: 90 | -90 |
longitude | number | 经度; longitude: optional; min: -180; max: 180 | -180 |
page | integer | 页码(从 1 开始); (page - 1) × limit < 200; 示例: limit=20 → page=1..10; page: optional; min: 1; max: 200 | 1 |
limit | integer | 结果上限; limit: optional; min: 1; max: 100 | 1 |
sort_by | string | 排序; sort_by: optional; recommended | recommended |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
start | integer | 结果偏移量; start: optional; min: 0; max: 199 | 0 |
l | string | 区域边界或社区; l: optional; UTF-8 bytes: 750 | - |
cflt | string | 分类别名; cflt: optional; UTF-8 bytes: 2000 | - |
attrs | string | 属性过滤; attrs: optional; UTF-8 bytes: 2000 | - |
yelp_domain | string | Yelp 地区域名; yelp_domain: optional; yelp.at, yelp.be, yelp.ca, yelp.ch, yelp.cl, yelp.co.jp, yelp.co.nz, yelp.co.uk, yelp.com, yelp.com.ar, yelp.com.au, yelp.com.br, yelp.com.hk, yelp.com.mx, yelp.com.ph, yelp.com.sg, yelp.com.tr, yelp.com.tw, yelp.cz, yelp.de, yelp.dk, yelp.es, yelp.fi, yelp.fr, yelp.ie, yelp.it, yelp.my, yelp.nl, yelp.no, yelp.pl, yelp.pt | yelp.at |
校验规则
仅接受查询参数,不接受请求体。拒绝未知、重复、空值或无效参数。仅支持 JSON 响应,不自动翻页或重试。下列规则中 AND 表示同时提供,OR 表示任一,XOR 表示二选一,NOT 表示不能提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/latitude => longitude; longitude => latitudelocation XOR (latitude AND longitude): required; query optionalNOT (page AND start); (page - 1) * limit < 200; omitted page = 1, limit = 20; start <= 199l => NOT latitude AND NOT longitude; l = g:west,south,east,north OR p:region:city::neighborhood; neighborhood => locationg: -180 <= west < east <= 180; -90 <= south < north <= 90
示例
curl --get "https://api.apihop.ai/v1/yelp/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee shop" \
--data-urlencode "location=Austin, TX"Yelp: 查询地点详情
GET https://api.apihop.ai/v1/yelp/place
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
id | string | 地点标识; id: REQUIRED | halcyon-austin-2 |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
yelp_domain | string | Yelp 地区域名; yelp_domain: optional; yelp.at, yelp.be, yelp.ca, yelp.ch, yelp.cl, yelp.co.jp, yelp.co.nz, yelp.co.uk, yelp.com, yelp.com.ar, yelp.com.au, yelp.com.br, yelp.com.hk, yelp.com.mx, yelp.com.ph, yelp.com.sg, yelp.com.tr, yelp.com.tw, yelp.cz, yelp.de, yelp.dk, yelp.es, yelp.fi, yelp.fr, yelp.ie, yelp.it, yelp.my, yelp.nl, yelp.no, yelp.pl, yelp.pt | yelp.at |
full_menu | boolean | 完整菜单; full_menu: optional | true |
menu_name | string | 菜单名称; menu_name: optional; UTF-8 bytes: 128; ^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$ | - |
business_alert | boolean | 营业状态提示; business_alert: optional | true |
校验规则
仅接受查询参数,不接受请求体。拒绝未知、重复、空值或无效参数。仅支持 JSON 响应,不自动翻页或重试。下列规则中 AND 表示同时提供,OR 表示任一,XOR 表示二选一,NOT 表示不能提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/id: /^[A-Za-z0-9][A-Za-z0-9_-]{0,255}$/; menu_name => full_menu = true
示例
curl --get "https://api.apihop.ai/v1/yelp/place" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=halcyon-austin-2"Yelp: 查询评论
GET https://api.apihop.ai/v1/yelp/reviews
请求参数
| 字段 | 类型 | 约束 | 示例 |
|---|---|---|---|
id | string | 地点标识; id: REQUIRED | halcyon-austin-2 |
language | string | 语言; language: optional | - |
page | integer | 页码(从 1 开始); page: optional; min: 1; max: 1000 | 1 |
limit | integer | 结果上限; limit: optional; min: 1; max: 100 | 1 |
sort_by | string | 排序; sort_by: optional; recommended, newest, oldest, highest_rating, lowest_rating, elites | recommended |
device | string | 设备; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不归档响应产物; zero_trace: optional | true |
query | string | 搜索词; query: optional | - |
yelp_domain | string | Yelp 地区域名; yelp_domain: optional; yelp.at, yelp.be, yelp.ca, yelp.ch, yelp.cl, yelp.co.jp, yelp.co.nz, yelp.co.uk, yelp.com, yelp.com.ar, yelp.com.au, yelp.com.br, yelp.com.hk, yelp.com.mx, yelp.com.ph, yelp.com.sg, yelp.com.tr, yelp.com.tw, yelp.cz, yelp.de, yelp.dk, yelp.es, yelp.fi, yelp.fr, yelp.ie, yelp.it, yelp.my, yelp.nl, yelp.no, yelp.pl, yelp.pt | yelp.at |
rating | string | 星级(逗号分隔); rating: optional; UTF-8 bytes: 9; ^[1-5](,[1-5]){0,4}$ | - |
start | integer | 结果偏移量; start: optional; min: 0; max: 100000 | 0 |
not_recommended | boolean | 未推荐评论; not_recommended: optional | true |
not_recommended_start | integer | 未推荐评论偏移量; not_recommended_start: optional; min: 0; max: 100000 | 0 |
校验规则
仅接受查询参数,不接受请求体。拒绝未知、重复、空值或无效参数。仅支持 JSON 响应,不自动翻页或重试。下列规则中 AND 表示同时提供,OR 表示任一,XOR 表示二选一,NOT 表示不能提供,=> 表示需要。
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/id: /^[A-Za-z0-9][A-Za-z0-9_-]{0,255}$/; page => NOT start AND NOT not_recommended_startnot_recommended_start => not_recommended = true; not_recommended = true => NOT start; rating: distinct 1..5, comma-separated
示例
curl --get "https://api.apihop.ai/v1/yelp/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=halcyon-austin-2"响应与错误
保留原生 JSON 响应和数字精度。下方仅为空成功结果示例,不是真实调用。HTTP 400 表示输入无效;401 需要认证;402 余额不足;403 不可用或无权限;405 方法不支持;429 限流;5xx 服务或上游故障。请保留 X-Request-Id 以便排查。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}