# DuckDuckGo 地图 关键词搜索 API (duckduckgo_maps.search)

- Canonical page: https://everyinfra.com/duckduckgo-maps-api/search
- Endpoint: POST /api/v1/social with {"platform": "duckduckgo_maps", "action": "search", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 50 per call
- 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=duckduckgo_maps&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 在地图上搜什么，地点名或品类（如 coffee、museum）。 |
| latitude | not declared | yes | not declared | 地图中心纬度（-90 到 90），必填；结果是这个中心周围一屏里的地点。 |
| longitude | not declared | yes | not declared | 地图中心经度（-180 到 180），必填。 |
| limit | integer (1–50) | no | 20 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 该地点在这次结果里的名次，从 1 开始。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| apple_maps_id | 这个地点的 Apple 地图 ID（纯数字），可作为 apple_maps.places 的 place_ids 读营业时间、设施等详情；没有就不出现。 |
| yelp_id | 这个地点在 Yelp 上的商家短名；评分和点评摘录来自 Yelp。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| address | 详细地址，原文透传。 |
| city | 城市名，用原平台的语言书写，未做中英归一。 |
| country_code | 两位国家代码。 |
| timezone | 地点所在时区（IANA 名，如 America/New_York）。 |
| lat | 纬度。 |
| lng | 经度。 |
| phone | 联系电话，原文透传，未做号码格式归一。 |
| website | 账号或商家填写的外链网址。 |
| url | 该记录在原平台上的可访问链接。 |
| menu_url | 菜单页面链接（餐饮类地点常有）。 |
| rating | Yelp 评分，1–5。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| review_count | Yelp 上的点评数。 |
| price | 价位，用 $ 个数表示（$ 到 $$$$）；没有就不出现。 |
| open_state | 搜索时的营业状态原文，按地点当地时间。 |
| opening_hours | 每周营业时间，键是星期（monday…sunday），值是「开始 - 结束」原文；当天不营业的那天不出现。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| top_reviews | 几条点评摘录（rating 评分、text 摘录、date 日期 YYYY-MM-DD），不带点评人信息。 |
| 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": "duckduckgo_maps",
  "action": "search",
  "params": {
    "keyword": "coffee",
    "latitude": 40.7128,
    "longitude": -74.006
  }
}'
```

```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": "duckduckgo_maps",
        "action": "search",
        "params": {
            "keyword": "coffee",
            "latitude": 40.7128,
            "longitude": -74.006,
        },
    },
    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": "duckduckgo_maps",
  "action": "search",
  "results": [
    {
      "rank": …,
      "name": …,
      "apple_maps_id": …,
      "yelp_id": …,
      "category": …,
      "address": …,
      "city": …,
      "country_code": …,
      "timezone": …,
      "lat": …,
      "lng": …,
      "phone": …,
      "website": …,
      "url": …,
      "menu_url": …,
      "rating": …,
      "rating_scale": …,
      "review_count": …,
      "price": …,
      "open_state": …,
      "opening_hours": …,
      "image_url": …,
      "top_reviews": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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