Google Maps API

Google Maps 搜索附近地点 API

在 Google Maps 上围绕精确的经纬度搜索,每次调用最多返回 20 个标准化地点,每个地点的地址都拆分为街道、城市、州、邮政编码和国家。当你有坐标并希望地图视口以其为中心时使用此接口;如果只有地点名称,请使用 maps.search。将返回的 nextCursor 作为 cursor 传回,即可获取接下来的 20 个地点。

US$1.30/千次请求,按请求付费,无需订阅。

coffee shop - Google Maps
google.com/maps/search/coffee%20shop/@30.2672, -97.7431,15z
coffee shop
ResultsShare

Mañana Coffee House

4.6(1,284)

Coffee shop · 612 W 6th St, Austin, TX 78701, USA

Cozy cafe serving pour-over coffee and pastries a few blocks from the Capitol.

Update results when map moves
Mañana Coffee House
Google Maps
API 返回的内容items[0]
{
"placeId": "ChIJrX7cX9C1RIYR2LFEjaLyeuY",
"cid": "8234917364550128200",
"name": "Mañana Coffee House",
"url": "https://www.google.com/maps/place/?q=place_id:ChIJrX7cX9C1RIYR2LFEjaLyeuY",
"category": "Coffee shop",
"categories": [...],
"address": "612 W 6th St, Austin, TX 78701, USA",
"street": "612 W 6th St",
... 还有 15 个字段
}
可用率
99.76%
30d · 4,158 次调用
请求数
4,161
30d · 按周,近 12 周
响应时间
6.1s
中位数 · 30d

价格

Google Maps 搜索附近地点 API 价格

你需支付
US$13.00
US$1.30/千次请求,只为实际用量付费。没有月度套餐。
有了 US$0.10 的初始余额,你的前 76 次请求免费。

试一试

一个请求获取 Google Maps 搜索附近地点

打开于
获取免费密钥
示例响应
免费运行只返回前 3 条结果。为密钥充值即可获得完整响应。

这个示例展示了 28 个字段中的 27 个。查看全部字段

{
  "found": true,
  "data": {
    "nextCursor": "eyJvZmZzZXQiOjMsInEiOiJjb2ZmZWUgc2hvcCJ9",
    "items": [
      {
        "placeId": "ChIJrX7cX9C1RIYR2LFEjaLyeuY",
        "cid": "8234917364550128200",
        "name": "Mañana Coffee House",
        "url": "https://www.google.com/maps/place/?q=place_id:ChIJrX7cX9C1RIYR2LFEjaLyeuY",
        "category": "Coffee shop",
        "categories": [
          "Coffee shop",
          "Breakfast restaurant"
        ],
        "address": "612 W 6th St, Austin, TX 78701, USA",
        "street": "612 W 6th St",
        "city": "Austin",
        "state": "Texas",
        "postalCode": "78701",
        "countryCode": "US",
        "latitude": 30.2687,
        "longitude": -97.7469,
        "phone": "+1 512-555-0142",
        "website": "https://mananacoffeeaustin.com",
        "rating": 4.6,
        "reviewCount": 1284,
        "image": "https://lh3.googleusercontent.com/places/ANXAkqHmananaCoffee6thSt=w200-h150-k-no",
        "neighborhood": "Downtown",
        "domain": "mananacoffeeaustin.com",
        "description": "Cozy cafe serving pour-over coffee and pastries a few blocks from the Capitol.",
        "rank": 1
      },
      {
        "placeId": "ChIJTUxDowe1RIYRy5j2Vd8HwKg",
        "name": "Cuvee Coffee Roastery",
        "url": "https://www.google.com/maps/place/?q=place_id:ChIJTUxDowe1RIYRy5j2Vd8HwKg",
        "category": "Coffee roasters",
        "categories": [
          "Coffee roasters",
          "Coffee shop"
        ],
        "address": "2000 Justin Ln, Austin, TX 78757, USA",
        "street": "2000 Justin Ln",
        "city": "Austin",
        "state": "Texas",
        "postalCode": "78757",
        "countryCode": "US",
        "latitude": 30.3335,
        "longitude": -97.7231,
        "website": "https://cuveecoffee.com",
        "rating": 4.4,
        "reviewCount": 511,
        "image": "https://lh3.googleusercontent.com/places/ANXAkqHCuveeRoastery=w200-h150-k-no",
        "neighborhood": "Crestview",
        "domain": "cuveecoffee.com",
        "rank": 2
      },
      {
        "placeId": "ChIJgUbEo8cKRIYRZ4h8dQ3jL2s",
        "name": "Summer Moon Coffee",
        "url": "https://www.google.com/maps/place/?q=place_id:ChIJgUbEo8cKRIYRZ4h8dQ3jL2s",
        "category": "Coffee shop",
        "categories": [
          "Coffee shop"
        ],
        "address": "1900 Aldrich St Ste 100, Austin, TX 78723, USA",
        "street": "1900 Aldrich St Ste 100",
        "city": "Austin",
        "state": "Texas",
        "postalCode": "78723",
        "countryCode": "US",
        "latitude": 30.296,
        "longitude": -97.7028,
        "website": "https://summermooncoffee.com",
        "rating": 4.5,
        "reviewCount": 642,
        "image": "https://lh3.googleusercontent.com/places/ANXAkqHSummerMoonAldrich=w200-h150-k-no",
        "neighborhood": "Mueller",
        "domain": "summermooncoffee.com",
        "rank": 3
      }
    ]
  }
}

完整的参数与响应参考:这个接口的每个字段、类型和示例。

参考

一个请求,一种响应结构。

你发送的每个字段和收到的每个字段,都附有真实示例。

最近验证于 2026-11-14 · 可用率和延迟按 30d 统计

请求体

JSON,POST 到这个接口。

  • coordinatesobject

    {"latitude":30.2672,"longitude":-97.7431}

    搜索所围绕的精确地图中心点。如果只有地点名称,请改用 maps.search。

  • querystring

    coffee shop

    你会在 Google Maps 搜索栏中输入的内容(例如 coffee shop)。

  • cursorstring

    来自上一次响应中 nextCursor 的不透明游标。传回它以获取下一页地点。

  • languagestring

    结果使用的两字母语言代码(例如 en)。

  • limitinteger

    3

    Accepted but does not change the page: every call returns one full Google Maps viewport of about 20 places, never trimmed, so nextCursor continues exactly where this response ended. Price is flat per request.

  • zoomnumber

    Google Maps 视口缩放级别。数值越低覆盖范围越大,越高则越集中在坐标周围。

你发送。 一个简短的 JSON 请求体。显示的值只是示例,请换成你自己的。

响应

JSON,每个字段一个示例值。

each itemdata.items[]

Matching Google Maps place records, nearest the requested coordinates first. Populated whenever the provider has data for the entity.

  • addressstring

    612 W 6th St, Austin, TX 78701, USA

    Full formatted street address.

  • categoriesstring[]

    Every Google Maps category listed for the place.

  • categorystring

    Coffee shop

    Primary place category (e.g. Coffee shop).

  • cidstring

    8234917364550128200

    Google customer/place id (cid).

  • citystring

    Austin

    City the place is in.

  • countryCodestring

    US

    Two-letter country code.

  • descriptionstring

    Cozy cafe serving pour-over coffee and pastries a few blocks from the Capitol.

    Google's one-line description of the place.

  • domainstring

    mananacoffeeaustin.com

    Registrable domain of the place website.

  • imagestring

    https://lh3.googleusercontent.com/places/ANXAkqHmananaCoffee6thSt=w200-h150-k-no

    Thumbnail photo URL for the place.

  • latitudenumber

    30.2687

    Latitude of the place in decimal degrees.

  • longitudenumber

    -97.7469

    Longitude of the place in decimal degrees.

  • namestring

    Mañana Coffee House

    Place name. Populated whenever the provider has data for the entity.

  • neighborhoodstring

    Downtown

    Neighborhood the place is in.

  • phonestring

    +1 512-555-0142

    Business phone number, when listed.

  • placeIdstring

    ChIJrX7cX9C1RIYR2LFEjaLyeuY

    Google Maps place id (stable identifier for the place). Populated whenever the provider has data for the entity.

  • postalCodestring

    78701

    Postal code of the place.

  • rankinteger

    1

    One-based position of the place in the Google Maps result order.

  • ratingnumber

    4.6

    Average Google rating out of 5.

  • reviewCountinteger

    1284

    Number of Google reviews the place has.

  • statestring

    Texas

    State or region the place is in, spelled in full (e.g. Texas).

  • streetstring

    612 W 6th St

    Street line of the address.

  • urlstring

    https://www.google.com/maps/place/?q=place_id:ChIJrX7cX9C1RIYR2LFEjaLyeuY

    Canonical Google Maps URL for the place. Populated whenever the provider has data for the entity.

  • websitestring

    https://mananacoffeeaustin.com

    The place's own website URL, when listed.

datadata

The result wrapper, or null when nothing matched.

  • nextCursorstring

    eyJvZmZzZXQiOjMsInEiOiJjb2ZmZWUgc2hvcCJ9

    Opaque cursor for the next page of places, or null when this search is complete. Pass it back as cursor to continue.

top level
  • foundboolean

    true

    True when the search returned at least one matching place.

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

你收到。 字段有名称、有类型,无论哪个数据源响应,结构都一样。

常见问题

关于 Google Maps 搜索附近地点 API

AnyAPI 的 Google Maps 搜索附近地点 API 只需一次 POST 请求 /v1/run/maps.search_nearby,就以统一格式的 JSON 返回 Google Maps 数据。在 Google Maps 上围绕精确的经纬度搜索,每次调用最多返回 20 个标准化地点,每个地点的地址都拆分为街道、城市、州、邮政编码和国家。当你有坐标并希望地图视口以其为中心时使用此接口;如果只有地点名称,请使用 maps.search。将返回的 nextCursor 作为 cursor 传回,即可获取接下来的 20 个地点。无论哪个数据源提供服务,AnyAPI 都返回同一套统一的 schema。费用:每千次请求 US$1.30 起,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 Google Maps 搜索附近地点 API 调用中有 99.8% 成功,响应时间中位数为 6.1 秒,共测量 4,158 次调用。

费用:每千次请求 US$1.30 起,以美元计价,无需订阅,也没有每月最低消费。你只需为一个美元钱包充值,每次调用从中扣费。部分由钱包付费的失败请求会产生处理费用,我们按成本原价转嫁,不加价;错误响应会显示收取的金额。

在 Google Maps 上围绕精确的经纬度搜索,每次调用最多返回 20 个标准化地点,每个地点的地址都拆分为街道、城市、州、邮政编码和国家。当你有坐标并希望地图视口以其为中心时使用此接口;如果只有地点名称,请使用 maps.search。将返回的 nextCursor 作为 cursor 传回,即可获取接下来的 20 个地点。响应是统一格式的 JSON,外层结构与每个 AnyAPI 接口相同,所以解析另一个接口只需换一个 URL,别的都不用改。

过去 30 天,通过 AnyAPI 发起的 Google Maps 搜索附近地点 API 调用中有 99.8% 成功,响应时间中位数为 6.1 秒,共测量 4,158 次调用。这些是 AnyAPI 对经过网关的流量的自有测量,持续重新计算,并非公开承诺的服务等级目标。

可以。新的 AnyAPI 账户自带 US$0.10 免费余额,无需绑卡,足够调用 76 次 Google Maps 搜索附近地点,每次 US$0.0013。

向 https://api.getanyapi.com/v1/run/maps.search_nearby 发送 POST 请求,在 “Authorization: Bearer” 请求头中放入你的 AnyAPI 密钥,并以 JSON 请求体传入参数。同一个密钥和同一个钱包适用于所有 AnyAPI 接口。

不需要。你向一个预付费的 AnyAPI 余额充值美元,每个请求从中扣费。没有月度套餐,也没有最低消费,同一个余额可用于所有 AnyAPI 接口。

有。TypeScript 用 npm 安装 @getanyapi/sdk,Python 用 pip 安装 getanyapi。两者都用同一个密钥调用所有 AnyAPI 接口,任何 HTTP 客户端也都可以。

可以。智能体可以连接 https://api.getanyapi.com/mcp 上的 AnyAPI MCP 服务器,或者向 https://api.getanyapi.com/agent/signup 发送一次无需认证的 POST 来创建自己的免费试用密钥,再通过 HTTP 调用这个接口。