Google Maps Photos API

Our Google Maps Photos API allows you to scrape photos from Google Maps. The API is accessed through the following endpoint: /search?engine=google_maps_photos.

A user may query the following: https://serpapi.com/search?engine=google_maps_photos utilizing a GET request. Head to the playground for a live and interactive demo.

API Parameters

Search Query

data_id

Required

Parameter defines the Google Maps data ID. Find the data ID of a place using our Google Maps API.

Localization

hl

Optional

Parameter defines the language to use for the Google Maps Photos search. It's a two-letter language code, for example, en for English (default), es for Spanish, or fr for French). Head to the Google languages page for a full list of supported Google languages.

Advanced Google Maps Photos Parameters

category_id

Optional

Parameter defines the ID of a category. You can find the value of an ID inside the categories array, using our Google Maps Photos API. The number, and the type of categories can vary between places.

Pagination

next_page_token

Optional

Parameter defines the next page token. It is used for retrieving the next page results. 20 results are returned per page.

Serpapi Parameters

engine

Required

Set parameter to google_maps_photos to use the Google Maps Photos API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Maps Photos results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for place information, topics, and reviews results.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, the error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

This API does not have the HTML response, just a text. search_metadata.prettify_html_file contains prettified version of the result. It is displayed in the playground.

API Examples

JSON structure overview

{
  ...
  "categories": [
    {
      "title": "String - Title of the category",
      "id": "String - ID of the category"
    },
  ],
  "photos": [
    {
      "thumbnail": "String - Thumbnail URL",
      "image": "String - Orginal image URL",
      "user": { // @Deprecated - use `photo_meta_serpapi_link` instead, it provides more info to the photo, for example, user info, date and location
        "link": "String - Link to reviewer's Google profile",
        "user_id": "String - Google's user id of the reviewer",
        "name": "String - Reviewer name"
      }
      "photo_meta_serpapi_link": "String - SerpAPI Google Maps Photo Meta API link to get more info about the photo. https://serpapi.com/google-maps-photo-meta-api"
    },
  ],
  "serpapi_pagination": {
    "next": "String - SerpAPI link to get next page data",
    "next_page_token": "String - page token"
  }
  ...
}

Results for: Peet's Coffee

Results for: Peet's Coffee

JSON Example

{
  "search_metadata": {
    "id": "60ddc169de98340dd89a84b8",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/9f1fce5b2cacc7bc/60ddc169de98340dd89a84b8.json",
    "created_at": "2021-07-01 13:21:45 UTC",
    "processed_at": "2021-07-01 13:21:45 UTC",
    "google_maps_photos_url": "https://www.google.com/maps/preview/photo?hl=en&pb=!1e2!3m3!1s0x89c25998e556791b:0xbdcd67f46e37b16d!9e0!11s!5m58!2m2!1i203!2i100!3m2!2i20!5b1!7m50!1m3!1e1!2b0!3e3!1m3!1e2!2b1!3e2!1m3!1e2!2b0!3e3!1m3!1e3!2b0!3e3!1m3!1e8!2b0!3e3!1m3!1e3!2b1!3e2!1m3!1e10!2b0!3e3!1m3!1e10!2b1!3e2!1m3!1e9!2b1!3e2!1m3!1e10!2b0!3e3!1m3!1e10!2b1!3e2!1m3!1e10!2b0!3e4!2b1!4b1!9b0!6m3!1s!2z!7e81!16m4!1m1!1BCgIgAQ!2b1!4e1",
    "raw_html_file": "https://serpapi.com/searches/9f1fce5b2cacc7bc/60ddc169de98340dd89a84b8.html",
    "prettify_html_file": "https://serpapi.com/searches/9f1fce5b2cacc7bc/60ddc169de98340dd89a84b8.prettify",
    "total_time_taken": 2.1
  },
  "search_parameters": {
    "engine": "google_maps_photos",
    "data_id": "0x89c25998e556791b:0xbdcd67f46e37b16d",
    "hl": "en"
  },
  "categories": [
    {
      "title": "All",
      "id": "CgIgAQ"
    },
    {
      "title": "Latest",
      "id": "CgIgARICGAI"
    },
    {
      "title": "Menu",
      "id": "CgIYIQ"
    },
    {
      "title": "Food & drink",
      "id": "CgIYIA"
    },
    {
      "title": "Vibe",
      "id": "CgIYIg"
    },
    {
      "title": "By owner",
      "id": "CgIgARICEAE"
    },
    {
      "title": "Street View & 360°",
      "id": "CgIgARICCAI"
    },
    {
      "title": "Videos",
      "id": "CgIgARICCAQ"
    }
  ],
  "photos": [
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipO-x7F8bvkQYKoJalEfrJ2c-C4yYf5EC5ISXYlQ=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipO-x7F8bvkQYKoJalEfrJ2c-C4yYf5EC5ISXYlQ=w4032-h3024-k-no",
      "user": { // @Deprecated
        "link": "https://maps.google.com/maps/contrib/106706723945968683827",
        "user_id": "106706723945968683827",
        "name": "ervin mile"
      },
      "photo_meta_serpapi_link": "<SerpAPI Link>"
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNgF_nJ9tHvGMhfeEU95SCTaqwcGPovnwJuIuIj=w203-h203-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNgF_nJ9tHvGMhfeEU95SCTaqwcGPovnwJuIuIj=w2000-h2000-k-no",
      "user": { // @Deprecated
        "link": "https://maps.google.com/maps/contrib/108726483640304832662",
        "user_id": "108726483640304832662"
      },
      "photo_meta_serpapi_link": "<SerpAPI Link>"
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipPgif1oyAOtWXXGsjxeLln2FSo1_oCHjEvy8Tmk=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipPgif1oyAOtWXXGsjxeLln2FSo1_oCHjEvy8Tmk=w4032-h3024-k-no",
      "user": { // @Deprecated
        "link": "https://maps.google.com/maps/contrib/103630351319564047960",
        "user_id": "103630351319564047960"
      },
      "photo_meta_serpapi_link": "<SerpAPI Link>"
    },
    ...
  ],
  "serpapi_pagination": {
    "next": "https://serpapi.com/search.json?data_id=0x89c25998e556791b%3A0xbdcd67f46e37b16d&engine=google_maps_photos&hl=en&next_page_token=EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAQAAAAAAAAAAAAAAAAAAIgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBAAAAAAAgAAAAAAAQAAAAIgAAAAAAAAAABAAAAAAAAAAEAQAAAAAAAAQAAAAAAIAAAAAAAAABAAAAAAAAAACAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAABAQAAAAAAAAAAAACAAAAAIAAAAAAAAAAgAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAEAAAAAAAAAAAAAAAAAAAAACAAAAAAAAASQAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAIAAAAAAAAAACAAAAACAgAAIAAABAAACAAAAAACAAIAAADAAAAAAAAAAAAAAAAAAAAAAAIAAAAgAAAAAAAAAAAACAAIAAAAAIAAAAACAAAAABAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBRCVCmEIuPfjZVD6AEAACAAAAADAAAACQAQBCgCFAAAAAARAAKQAAAAAAAAALCGCACAQAgARBAECkAClCCAABAAAAAIgAGAEIBSBAAABQASIACSEAAAAA",
    "next_page_token": "EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAQAAAAAAA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