Google Maps Photos API Documentation

The Google Maps Photos API provides access to a collection of images related to specific locations. It offers various categories such as exterior, amenities, food & drink, and more. The API allows you to retrieve high-quality images and thumbnails for use in your applications.

API Parameters

Search Query

  • Name
    place_id
    Required
    Required
    Description

    This parameter is a unique identifier for locations on Google Maps, including businesses, landmarks, and more. It can be obtained using the Google Maps API and is used to access detailed information about a place. For example, a place_id look like ChIJhRwB-yFawokR5Phil-QQ3zM. More details about place_id can be found in the Google Maps Place ID documentation.

    Note: The place_id parameter is not required if data_id parameter is being used.

  • Name
    data_id
    Required
    Required
    Description

    This parameter is a unique identifier for locations on Google Maps, including businesses, landmarks, and more. It can be obtained using the Google Maps API and is used to access detailed information about a place. For example, a data_id look like 0x89c25a21fb011c85:0x33df10e49762f8e4.

    Note: The data_id parameter is not required if place_id parameter is being used.

Localization

  • Name
    hl
    Required
    Optional
    Description

    The default parameter en defines the interface language of the search. Check the full list of supported Google hl languages.

Filters

  • Name
    category_id
    Required
    Optional
    Description

    Parameter defines a category of photos that will be retrieved. You can obtain the category_id from the response of a request.

Pagination

  • Name
    next_page_token
    Required
    Optional
    Description

    Parameter defines the next page token that is used to retrieve the next page of photos. If there are no results for the given token, the response will include only search parameters, search metadata and categories.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to google_maps_photos.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

API Examples

Photos by data_id

Photos by data_id
GET
https://www.searchapi.io/api/v1/search?data_id=0x89c25a14803fb63d%3A0x966ff47d7080751b&engine=google_maps_photos
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "google_maps_photos",
  "data_id": "0x89c25a14803fb63d:0x966ff47d7080751b"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_Y80BKjxagxvjcml35nMQeWO6",
    "status": "Success",
    "created_at": "2024-03-17T21:54:06Z",
    "request_time_taken": 1.77,
    "parsing_time_taken": 0.01,
    "total_time_taken": 1.78,
    "request_url": "https://www.google.com/maps/place/data=!4m5!3m4!1s0x89c25a14803fb63d:0x966ff47d7080751b!8m2!3d21.1714392!4d-30.3258504?en",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_Y80BKjxagxvjcml35nMQeWO6.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_Y80BKjxagxvjcml35nMQeWO6"
  },
  "search_parameters": {
    "engine": "google_maps_photos",
    "data_id": "0x89c25a14803fb63d:0x966ff47d7080751b",
    "hl": "en"
  },
  "categories": [
    {
      "id": "CgIgAQ==",
      "title": "All"
    },
    {
      "id": "CgIgARICGAI=",
      "title": "Latest"
    },
    ...
  ],
  "photos": [
    {
      "image": "https://lh5.googleusercontent.com/p/AF1QipNjOZ28KdJnzcH5AY7Jwy3Hn3fbHDIT6L8M15A=w5616-h3744-k-no",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNjOZ28KdJnzcH5AY7Jwy3Hn3fbHDIT6L8M15A=w203-h100-k-no"
    },
    {
      "image": "https://lh5.googleusercontent.com/p/AF1QipPDxJWhiUmFPlOv6lpdee6Fy8Aswxzw0l9aRxZf=w4032-h3024-k-no",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipPDxJWhiUmFPlOv6lpdee6Fy8Aswxzw0l9aRxZf=w203-h100-k-no"
    },
    ...
  ],
  "pagination": {
    "next_page_token": "EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAAAEAAAAAgQIAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAQAAAABAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAQAAAAAAIAAAAAAABAAAAAAAAAAAIAGAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQAAAAAAAAAABAAAAAAAAAAAAAAAQIAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAiQCAAAAAAAAAABAAEAAAAAAAAAAAAAAAAgAABQAAAAAAAgAAAAAAAAAAAAAAAAAAAAGAAIAACAAAAAAABAAAAAAAAAAAAAAAARAAEAAAEADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAgAAAAAgAAAAAAAQAAAAAAAAAQAAAAAAAIAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAIAAAAAAAAAAAAAAAAAAAAAIAAAAGBRCVCmEIuPfjZVD6AEAACAAAAADAAAAKIAAjAAABAARAABAAEARYACWAAgAAIAAApABAAABQAEQAABEACQKEACAAECDAhAwgAAQgJBCAOAAABAAFAAAAA"
  }
}

Photos by place_id

Photos by place_id
GET
https://www.searchapi.io/api/v1/search?engine=google_maps_photos&place_id=ChIJOwg_06VPwokRYv534QaPC8g
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "google_maps_photos",
  "place_id": "ChIJOwg_06VPwokRYv534QaPC8g"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_ZD40AeqmorqVs6Aqgkyw25lR",
    "status": "Success",
    "created_at": "2024-07-02T16:49:01Z",
    "request_time_taken": 4.02,
    "parsing_time_taken": 0,
    "total_time_taken": 4.02,
    "request_url": "https://www.google.com/maps/place/data=!4m5!3m4!1s0x89c24fa5d33f083b:0xc80b8f06e177fe62!8m2!3d21.1714392!4d-30.3258504?en",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_ZD40AeqmorqVs6Aqgkyw25lR.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_ZD40AeqmorqVs6Aqgkyw25lR"
  },
  "search_parameters": {
    "engine": "google_maps_photos",
    "data_id": "0x89c24fa5d33f083b:0xc80b8f06e177fe62",
    "place_id": "ChIJOwg_06VPwokRYv534QaPC8g",
    "hl": "en"
  },
  "categories": [
    {
      "id": "CgIgAQ==",
      "title": "All"
    },
    {
      "id": "CgIgARICCAQ=",
      "title": "Videos"
    }
  ],
  "photos": [
    {
      "image": "https://lh5.googleusercontent.com/p/AF1QipMFKmsmkDbZOWhrtwH7Iuf2zNnukrs2eDvn1hSB=w4864-h3648-k-no",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMFKmsmkDbZOWhrtwH7Iuf2zNnukrs2eDvn1hSB=w203-h100-k-no"
    },
    {
      "image": "https://lh5.googleusercontent.com/p/AF1QipOuYWhXsFvaRx86QzhAPG4aaEkYw8zm7j5pB6h7=w730-h574-k-no",
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipOuYWhXsFvaRx86QzhAPG4aaEkYw8zm7j5pB6h7=w203-h100-k-no"
    },
    ...
  ],
  "pagination": {
    "next_page_token": "EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAQAAAAgAAAAAAAAEAAAAAEAgAAAAAAAAAAAAQAAAAAAAAAAABQAEAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAACAAgAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAQAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAgAAAAAABCAAAAAAAAAAAAAAAQAAAAAAAAAAAACAAAAAIAAAAAAAAAAAgAICAAAAAAAAAIAAAAAAAAEAAACAAAAAAAAAAAAAAAQAAAAAAAgAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAgAAAAAEAAAAAAAAACAAAAAAAAQAAAAAAAAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAQAAIAAAAEAAAAAAAAAAAAAAAAAAAgAAAgAAQAAAAIAAAAAAAAAAAAIAAAAAAAEAAABAQAAAAAAAAAEEAAIAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAGBRCVCmEIuPfjZVD6AEAACAAAAADAAAAAAKAgQAQAAEIAEAAgAQIAABQIAAAADAIQAAAAhGAAABAAQASGAEpAAUAAAgGCoDEAgADAEAEAECBAEIQEAAAAA"
  }
}