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
    data_id
    Required
    Required
    Description

    This parameter serves as a unique identifier for Google Maps locations, such as businesses and landmarks. You can retrieve it through the Google Maps API. For example, a data_id look like 0x89c25a21fb011c85:0x33df10e49762f8e4.

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

Full Response

Full Response
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"
  }
}