Skip to content

最后更新

更新日志

Google Maps API

正常只读

来自 maps.google.com 的结构化数据。 来源: maps.google.com.

基础 URL
https://api.maviapi.com/v1/sites/maps-google
4
端点
9 min ago
最近验证
99.9%
可用率 / 7 天
922ms
p50 延迟
GET/search_places5 credits per call

搜索地点

在 Google Maps 上按文本查询搜索某个位置周边的地点(查询可以是地点名称、商家类型,或两者兼有,例如 "Archetype Coffee"、"pizza"、"hotels in Paris")。最多返回约 20 个地点,包含名称、place_id、地址、坐标、类别、评分、评论数、电话、网站、营业时间等(Google 未提供的字段为 null)。

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

what to search for; may contain a place name, a category, or an address/city

numberOptionalin query

latitude of the map centre used to bias results (default central London)

numberOptionalin query

longitude of the map centre used to bias results

numberOptionalin query

approximate search area radius in metres around lat/lng

integerOptionalin query

number of results to skip, for paging (20 per page: 0, 20, 40, ...)

stringOptionalin query

language code for the results, e.g. "en", "de"

stringOptionalin query

country code for the results, e.g. "us", "gb"

querystringe.g."coffee"
countintegere.g.20
placesobject[]20 fields
namestringe.g."Archetype Coffee"
place_idstringe.g."ChIJ32WYJnsbdkgR1FckbQTtMk8"
feature_idstringe.g."0x48761b7b269865df:0x4f32ed046d2457d4"
addressstringe.g."31 Riding House St, London W1W 7DY, United Kingdom"
address_partsstring[]
latnumbere.g.51.518557699999995
lngnumbere.g.-0.1409618
categoriesstring[]
ratingnumbere.g.4.9
reviews_countintegere.g.425
price_levelnull
phonenull
websitenull
descriptionnull
hoursobject7 fields
Fridaystringe.g."8:30 AM–4 PM"
Saturdaystringe.g."10 AM–4 PM"
Sundaystringe.g."10 AM–4 PM"
Mondaystringe.g."8 AM–4 PM"
Tuesdaystringe.g."8 AM–4 PM"
Wednesdaystringe.g."8 AM–4 PM"
Thursdaystringe.g."8 AM–4 PM"
open_statusstringe.g."Closed · Opens 10 AM Sat"
timezonestringe.g."Europe/London"
neighborhoodstringe.g."London, United Kingdom"
thumbnailstringe.g."https://lh3.googleusercontent.com/grass-cs/AABkmLdTXy00y2JYJaNoIyu5GUCxrVjA7NjlpnQgPY5QfJy02o1fOe6k_u3Mv2QHsStBIW-XO7L7To8JjHxaPgPOIUZSFnqiBgakCOwr9KR43JKXmAMV8ef7_gJn57xyXi9hZzvBvwV78Q=w80-h106-k-no"
google_maps_urlstringe.g."https://www.google.com/maps/place/?q=place_id:ChIJ32WYJnsbdkgR1FckbQTtMk8"
Try itLive
GET
https://api.maviapi.com/v1/sites/maps-google/search_places?query=coffee&lat=51.5072&lng=-0.1276&radius_m=5000&offset=0&hl=en&gl=us
Request
curl "https://api.maviapi.com/v1/sites/maps-google/search_places?query=coffee&lat=51.5072&lng=-0.1276&radius_m=5000&offset=0&hl=en&gl=us" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.3 KB
{
  "query": "coffee",
  "count": 20,
  "places": [
    {
      "name": "Archetype Coffee",
      "place_id": "ChIJ32WYJnsbdkgR1FckbQTtMk8",
      "feature_id": "0x48761b7b269865df:0x4f32ed046d2457d4",
      "address": "31 Riding House St, London W1W 7DY, United Kingdom",
      "address_parts": [
        "31 Riding House St"
      ],
      "lat": 51.518557699999995,
      "lng": -0.1409618,
      "categories": [
        "Coffee shop"
      ],
      "rating": 4.9,
      "reviews_count": 425,
      "price_level": null,
      "phone": null,
      "website": null,
      "description": null,
      "hours": {
        "Friday": "8:30 AM–4 PM",
        "Saturday": "10 AM–4 PM",
        "Sunday": "10 AM–4 PM",
        "Monday": "8 AM–4 PM",
        "Tuesday": "8 AM–4 PM",
        "Wednesday": "8 AM–4 PM",
        "Thursday": "8 AM–4 PM"
      },
      "open_status": "Closed · Opens 10 AM Sat",
      "timezone": "Europe/London",
      "neighborhood": "London, United Kingdom",
      "thumbnail": "https://lh3.googleusercontent.com/grass-cs/AABkmLdTXy00y2JYJaNoIyu5GUCxrVjA7NjlpnQgPY5QfJy02o1fOe6k_u3Mv2QHsStBIW-XO7L7To8JjHxaPgPOIUZSFnqiBgakCOwr9KR43JKXmAMV8ef7_gJn57xyXi9hZzvBvwV78Q=w80-h106-k-no",
      "google_maps_url": "https://www.google.com/maps/place/?q=place_id:ChIJ32WYJnsbdkgR1FckbQTtMk8"
    }
  ]
}

Get all the data, no code

Collect every page of GET /search_places into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.

Use Google Maps API from Claude, ChatGPT and your coding tools

Add this URL as a custom connector and sign in to maviapi. Nothing to install.

How to connect
https://mcp.maviapi.com/mcp

Or run it locally, with each endpoint of Google Maps API as its own tool:

claude mcp add maviapi -e MAVIAPI_TOOLS=maps-google -- npx -y '@maviapi/mcp'

Import Google Maps API into Postman and other tools

How to import

Paste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.

  • OpenAPI 3.1
    https://api.maviapi.com/v1/apis/maps-google/openapi.json
  • Postman
    https://api.maviapi.com/v1/apis/maps-google/postman.json

The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.

使用 Google Maps API 进行开发

选择一个端点开始

  • 搜索地点 GET /search_places

    在 Google Maps 上按文本查询搜索某个位置周边的地点(查询可以是地点名称、商家类型,或两者兼有,例如 "Archetype Coffee"、"pizza"、"hotels in Paris")。最多返回约 20 个地点,包含名称、place_id、地址、坐标、类别、评分、评论数、电话、网站、营业时间等(Google 未提供的字段为 null)。

    GET /search_places 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    querystring / query否what to search for; may contain a place name, a category, or an address/city
    latnumber / query否latitude of the map centre used to bias results (default central London)
    lngnumber / query否longitude of the map centre used to bias results
    radius_mnumber / query否approximate search area radius in metres around lat/lng
    offsetinteger / query否number of results to skip, for paging (20 per page: 0, 20, 40, ...)
    hlstring / query否language code for the results, e.g. "en", "de"
    glstring / query否country code for the results, e.g. "us", "gb"
    响应字段
    字段类型说明
    querystring
    countinteger
    placesobject[]
    places[].namestring
    places[].place_idstring
    places[].feature_idstring
    places[].addressstring
    places[].address_partsstring[]
    places[].latnumber
    places[].lngnumber
    places[].categoriesstring[]
    places[].ratingnumber
    places[].reviews_countinteger
    places[].price_levelnull
    places[].phonenull
    places[].websitenull
    places[].descriptionnull
    places[].hoursobject
    places[].hours.Fridaystring
    places[].hours.Saturdaystring
    places[].hours.Sundaystring
    places[].hours.Mondaystring
    places[].hours.Tuesdaystring
    places[].hours.Wednesdaystring
    places[].hours.Thursdaystring
    places[].open_statusstring
    places[].timezonestring
    places[].neighborhoodstring
    places[].thumbnailstring
    places[].google_maps_urlstring
  • 地点详情 V2 GET /place_details_v2

    Google Maps 上单个地点的完整详情:包含 place_details 的全部字段(名称、地址、坐标、类别、评分、评论数、电话、网站、营业时间、描述、属性、评论摘录、评论话题、照片 URL),另加 business_status:"OPERATIONAL"、"CLOSED_PERMANENTLY" 或 "CLOSED_TEMPORARILY"(仅在 Google 未显示状态时为 null)。Google 未提供的字段为 null。

    GET /place_details_v2 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    place_idstring / query否Google place ID (e.g. "ChIJ32WYJnsbdkgR1FckbQTtMk8"), as returned in `place_id` by search_places / nearby_places
    feature_idstring / query否Google Maps feature ID (e.g. "0x47c6098d7d832a0f:0x9d8f878939adfa9f"), as returned in `feature_id`; when given it is used instead of place_id and the call is faster
    hlstring / query否language code for the results, e.g. "en", "de"
    glstring / query否country code for the results, e.g. "us", "gb"
    响应字段
    字段类型说明
    namestring
    place_idstring
    feature_idstring
    addressstring
    address_partsstring[]
    latnumber
    lngnumber
    categoriesstring[]
    ratingnumber
    reviews_countinteger
    price_levelnull
    phonenull
    websitenull
    descriptionnull
    hoursobject
    hours.Fridaystring
    hours.Saturdaystring
    hours.Sundaystring
    hours.Mondaystring
    hours.Tuesdaystring
    hours.Wednesdaystring
    hours.Thursdaystring
    open_statusstring
    timezonestring
    neighborhoodstring
    thumbnailstring
    google_maps_urlstring
    owner_descriptionstring
    attributesobject
    attributes.Accessibilityobject[]
    attributes.Accessibility[].namestring
    attributes.Accessibility[].availableboolean
    review_snippetsobject[]
    review_snippets[].textstring
    review_snippets[].ratinginteger
    review_topicsobject[]
    review_topics[].topicstring
    review_topics[].mentionsinteger
    photosstring[]
    business_statusstring
  • 地点详情 GET /place_details

    Google Maps 上单个地点的完整详情:名称、地址、坐标、类别、评分、评论数、电话、网站、营业时间、描述、无障碍和设施属性、评论摘录、评论话题和照片 URL(Google 未提供的字段为 null)。

    GET /place_details 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    place_idstring / query否Google place ID (e.g. "ChIJ32WYJnsbdkgR1FckbQTtMk8"), as returned in `place_id` by search_places / nearby_places
    feature_idstring / query否Google Maps feature ID (e.g. "0x48761b7b269865df:0x4f32ed046d2457d4"), as returned in `feature_id`; when given it is used instead of place_id and the call is faster
    hlstring / query否language code for the results, e.g. "en", "de"
    glstring / query否country code for the results, e.g. "us", "gb"
    响应字段
    字段类型说明
    namestring
    place_idstring
    feature_idstring
    addressstring
    address_partsstring[]
    latnumber
    lngnumber
    categoriesstring[]
    ratingnumber
    reviews_countinteger
    price_levelnull
    phonenull
    websitenull
    descriptionnull
    hoursobject
    hours.Fridaystring
    hours.Saturdaystring
    hours.Sundaystring
    hours.Mondaystring
    hours.Tuesdaystring
    hours.Wednesdaystring
    hours.Thursdaystring
    open_statusstring
    timezonestring
    neighborhoodstring
    thumbnailstring
    google_maps_urlstring
    owner_descriptionstring
    attributesobject
    attributes.Accessibilityobject[]
    attributes.Accessibility[].namestring
    attributes.Accessibility[].availableboolean
    review_snippetsobject[]
    review_snippets[].textstring
    review_snippets[].ratinginteger
    review_topicsobject[]
    review_topics[].topicstring
    review_topics[].mentionsinteger
    photosstring[]
  • 附近地点 GET /nearby_places

    指定经纬度附近某一类型的地点,每页最多约 20 个,每个地点包含名称、place_id、地址、坐标、到给定点的距离 distance_m、类别、评分、评论数、电话、网站、营业时间等(Google 未提供的字段为 null)。

    GET /nearby_places 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    latnumber / query否latitude of the point to search around (default Times Square, New York)
    lngnumber / query否longitude of the point to search around
    categorystring / query否kind of place to look for, e.g. "restaurants", "coffee", "hotels", "pharmacy", "atm", "things to do", "gas station"; may also be a name such as "Starbucks"
    radius_mnumber / query否approximate radius in metres of the area searched around the point
    offsetinteger / query否number of results to skip, for paging (20 per page: 0, 20, 40, ...)
    sort_by_distanceboolean / query否true to order results nearest first instead of Google's relevance order
    hlstring / query否language code for the results, e.g. "en", "de"
    glstring / query否country code for the results, e.g. "us", "gb"
    响应字段
    字段类型说明
    latnumber
    lngnumber
    categorystring
    countinteger
    placesobject[]
    places[].namestring
    places[].place_idstring
    places[].feature_idstring
    places[].addressstring
    places[].address_partsstring[]
    places[].latnumber
    places[].lngnumber
    places[].categoriesstring[]
    places[].ratingnumber
    places[].reviews_countinteger
    places[].price_levelnull
    places[].phonenull
    places[].websitestring
    places[].descriptionstring
    places[].hoursobject
    places[].hours.Fridaystring
    places[].hours.Saturdaystring
    places[].hours.Sundaystring
    places[].hours.Mondaystring
    places[].hours.Tuesdaystring
    places[].hours.Wednesdaystring
    places[].hours.Thursdaystring
    places[].open_statusstring
    places[].timezonestring
    places[].neighborhoodstring
    places[].thumbnailstring
    places[].google_maps_urlstring
    places[].distance_minteger

将 Google Maps 数据导出为 CSV

下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。

列表CSV 列
搜索地点GET /search_placesname, place_id, feature_id, address, address_parts, lat, lng, categories, rating, reviews_count, price_level, phone, website, description, hours, open_status, timezone, neighborhood, thumbnail, google_maps_url
附近地点GET /nearby_placesname, place_id, feature_id, address, address_parts, lat, lng, categories, rating, reviews_count, price_level, phone, website, description, hours, open_status, timezone, neighborhood, thumbnail, google_maps_url, distance_m

嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作

Google Maps API 常见问题

能获取什么数据、费用多少、如何调用。

Google Maps 有官方 API 吗?

有,Google Maps 提供自己的 API:Places API (New)(核实日期:2026-11-25)。本页的 Google Maps API 与它无关,是非官方 API:它是 maviapi 针对 maps.google.com 上的公开数据提供的独立托管 API,并非由 Google Maps 开发、认可或支持。

Google Maps API 可以获取哪些数据?

Google Maps API 有 4 个端点。每个端点都返回 JSON,参数和字段见上方的文档:

  • GET /search_places: 在 Google Maps 上按文本查询搜索某个位置周边的地点(查询可以是地点名称、商家类型,或两者兼有,例如 "Archetype Coffee"、"pizza"、"hotels in Paris")。
  • GET /place_details_v2: Google Maps 上单个地点的完整详情:包含 place_details 的全部字段(名称、地址、坐标、类别、评分、评论数、电话、网站、营业时间、描述、属性、评论摘录、评论话题、照片 URL),另加 business_status:"OPERATIONAL"、"CLOSED_PERMANENTLY" 或…
  • GET /place_details: Google Maps 上单个地点的完整详情:名称、地址、坐标、类别、评分、评论数、电话、网站、营业时间、描述、无障碍和设施属性、评论摘录、评论话题和照片 URL(Google 未提供的字段为 null)。
  • GET /nearby_places: 指定经纬度附近某一类型的地点,每页最多约 20 个,每个地点包含名称、place_id、地址、坐标、到给定点的距离 distance_m、类别、评分、评论数、电话、网站、营业时间等(Google 未提供的字段为 null)。

Google Maps API 的价格是多少?

调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 5 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $0.98。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。

如何调用 Google Maps API?

向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /search_places:

cURL
curl 'https://api.maviapi.com/v1/sites/maps-google/search_places' \
  -H "Authorization: Bearer $MAVI_KEY"

在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。

以 JSON 获取 Google Maps 数据有哪些方式?

以 JSON 获取 Google Maps 数据的每种方式适合不同的需求:

  • Places API (New): 需要写入权限、账号数据或与 Google Maps 签订协议时更合适。
  • 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 maps.google.com 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
  • Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
  • RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
  • maviapi: 本页的 Google Maps API:4 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。

maps.google.com 改版后会怎样?

您的代码不需要改动。maps.google.com 修改页面时,maviapi 会让 Google Maps API 保持可用,您继续调用同样的端点,并得到本页文档所述结构的 JSON。它当前的运行状况见状态页,变更记录见它的更新日志。

更新会破坏我的 Google Maps API 集成吗?

不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。

  • Google API

    以 JSON 形式返回 Google 搜索结果:任意查询词的网页排名结果和新闻搜索。

  • Google Images API

    来自 images.google.com 的结构化数据。

  • Tripadvisor API

    来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…