# Apple 地图 搜索联想词 API (apple_maps.search_suggest)

- Canonical page: [https://everyinfra.com/apple-maps-api/search_suggest](https://everyinfra.com/apple-maps-api/search_suggest?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "apple_maps", "action": "search_suggest", "params": {...}}
- Price: $0.001 per call ($1 per 1,000 requests); failed calls and empty results are not charged
- Returns: list
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=apple_maps&action=search_suggest

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 搜索框里打的字，可以只打一半（如 pizz、starbu）。 |
| latitude | not declared | no | not declared | 纬度（-90 到 90），和 longitude 一起给时按那个位置附近联想；不给按平台自己的默认位置。 |
| longitude | not declared | no | not declared | 经度（-180 到 180），和 latitude 一起给；只给一个会在扣费前被拒。 |
| limit | integer (1–) | no | not declared | 正整数（≥1），本次最多返回的条数：不传则返回本次取到的全部结果，传了只把结果截短到这个条数以内，不会多取，也不会变多。扣费不受 `limit` 影响。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| keyword | 联想出的词；type 是 place 时就是地点名。 |
| type | 联想项的类型：query 是推荐的搜索词，place 是推荐的地点（另带 place_id、apple_place_id、name、address、lat、lng、country_code）。 |
| rank | 这一项在这组联想里的位置，从 1 开始，按平台给的顺序。 |
| place_id | Apple 地图地点 ID（纯数字，即 auid），和 places 请求里的 place_ids 是同一种编号。 |
| apple_place_id | Apple 地图的另一种地点编号 place-id（I 开头的十六进制，如 IB8413D9DB465BF7E），也是 url 里 place-id= 后面那串。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| address | 详细地址，原文透传。 |
| lat | 纬度。 |
| lng | 经度。 |
| country_code | 两位国家代码。 |
| collected_at | 这条数据的抓取时刻（ISO 8601，UTC）。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "apple_maps",
  "action": "search_suggest",
  "params": {
    "keyword": "coffee"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "apple_maps",
        "action": "search_suggest",
        "params": {
            "keyword": "coffee",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "apple_maps",
  "action": "search_suggest",
  "results": [
    {
      "keyword": …,
      "type": …,
      "rank": …,
      "place_id": …,
      "apple_place_id": …,
      "name": …,
      "address": …,
      "lat": …,
      "lng": …,
      "country_code": …,
      "collected_at": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=apple_maps
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
