Google Maps Photos API

/ Home / Google Search API / 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 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.

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 full size images, thumbnails, and user data.
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.

Example for "Peet's Coffee" photos

Example for "Peet's Coffee" photos

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": {
        "link": "https://maps.google.com/maps/contrib/106706723945968683827",
        "user_id": "106706723945968683827",
        "name": "ervin mile"
      }
    },
    {
      "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": {
        "link": "https://maps.google.com/maps/contrib/108726483640304832662",
        "user_id": "108726483640304832662"
      }
    },
    {
      "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": {
        "link": "https://maps.google.com/maps/contrib/103630351319564047960",
        "user_id": "103630351319564047960"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNGZY9yFY8iEGSobkCA_xsNtvhH17sUthKCIMkO=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNGZY9yFY8iEGSobkCA_xsNtvhH17sUthKCIMkO=w3024-h4032-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/106062209026060400630",
        "user_id": "106062209026060400630",
        "name": "Jerry Lin"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipODT9QPomLoxoY7zmeY4Uet4eipxoKcOoBX4ev_=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipODT9QPomLoxoY7zmeY4Uet4eipxoKcOoBX4ev_=w3468-h4624-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/110018855320070847426",
        "user_id": "110018855320070847426",
        "name": "Jason Wu"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipO1y5odtn6IyTN2rwe90BcC95mI1S3BEb_yjQ2G=w203-h264-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipO1y5odtn6IyTN2rwe90BcC95mI1S3BEb_yjQ2G=w2407-h3131-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/117808460219123378764",
        "user_id": "117808460219123378764",
        "name": "Ruwan J."
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNIuL08tufktkvYrH-eEtYyqcMsm9KS8LQCJC5e=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNIuL08tufktkvYrH-eEtYyqcMsm9KS8LQCJC5e=w4032-h3024-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/103630351319564047960",
        "user_id": "103630351319564047960"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipPvr33PIbVdY6mbziZnm4qNoSeZg7BGVyeMwhS3=w203-h287-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipPvr33PIbVdY6mbziZnm4qNoSeZg7BGVyeMwhS3=w1816-h2572-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/109700758921395133324",
        "user_id": "109700758921395133324",
        "name": "Christian Frazier"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNoWBPhrx1vFR1_Q-Zur8e6N4d17m9rRVM32nIC=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNoWBPhrx1vFR1_Q-Zur8e6N4d17m9rRVM32nIC=w3468-h4624-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/110018855320070847426",
        "user_id": "110018855320070847426",
        "name": "Jason Wu"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipPWf1M-0FEO3ihk9IhFLrEPgADSVcjfiIvPHBQz=w203-h203-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipPWf1M-0FEO3ihk9IhFLrEPgADSVcjfiIvPHBQz=w2000-h2000-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/108726483640304832662",
        "user_id": "108726483640304832662"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMUxTMsGiL3yNLdVxVkNKvdo3FHgPjINZjguo-N=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipMUxTMsGiL3yNLdVxVkNKvdo3FHgPjINZjguo-N=w4032-h3024-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/103630351319564047960",
        "user_id": "103630351319564047960"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipN0PS3DYSC_BILNmpDdu08r4Nn5hKge8MtpfHYn=w203-h205-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipN0PS3DYSC_BILNmpDdu08r4Nn5hKge8MtpfHYn=w2009-h2033-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/103771895827656793515",
        "user_id": "103771895827656793515",
        "name": "Ceci"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipPSvm473Cn0I94pshoLP3hciEihmy7JgcLkXuA=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipPSvm473Cn0I94pshoLP3hciEihmy7JgcLkXuA=w2160-h2880-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/101236092263469538545",
        "user_id": "101236092263469538545",
        "name": "Ivaylo Kudinov"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNboY_3eWFs1d1AbFEn_svyJl_91djtwv0H0sIU=w203-h203-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNboY_3eWFs1d1AbFEn_svyJl_91djtwv0H0sIU=w2000-h2000-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/108726483640304832662",
        "user_id": "108726483640304832662"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipMKZd1O0nBulq6pS4mGfT47_U6BFUcAgsvkLHzn=w205-h100-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipMKZd1O0nBulq6pS4mGfT47_U6BFUcAgsvkLHzn=w4032-h1960-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/113949008227338815336",
        "user_id": "113949008227338815336",
        "name": "Cell 78"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipOeIQawfl6aOz7-Igzji4lbLE8N9uUCZAk0rRh6=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipOeIQawfl6aOz7-Igzji4lbLE8N9uUCZAk0rRh6=w3036-h4048-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/115408789636340199236",
        "user_id": "115408789636340199236",
        "name": "Paul Shin"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipN1GtmhoUhl8C6ncxezEYLERMUGO8RYyk8zWvjw=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipN1GtmhoUhl8C6ncxezEYLERMUGO8RYyk8zWvjw=w3264-h2448-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/114895159548617286881",
        "user_id": "114895159548617286881",
        "name": "Joanna Kim"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipOM76Vjh0fEOyfI1Oqs9Yju0xzAITm7jxqEyXMD=w203-h259-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipOM76Vjh0fEOyfI1Oqs9Yju0xzAITm7jxqEyXMD=w2462-h3142-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/106603376135731034383",
        "user_id": "106603376135731034383",
        "name": "Constance A"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipOMXyJkiP2N3uXd0li4IvRwc60rCXY85vRMaw0L=w203-h270-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipOMXyJkiP2N3uXd0li4IvRwc60rCXY85vRMaw0L=w3024-h4032-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/111485542878753707585",
        "user_id": "111485542878753707585",
        "name": "Hudi Kowalsky"
      }
    },
    {
      "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipNFVymrse8QXpj3FZB_snSZiCRYkLK0Rv2cQW2W=w203-h152-k-no",
      "image": "https://lh5.googleusercontent.com/p/AF1QipNFVymrse8QXpj3FZB_snSZiCRYkLK0Rv2cQW2W=w4032-h3024-k-no",
      "user": {
        "link": "https://maps.google.com/maps/contrib/103630351319564047960",
        "user_id": "103630351319564047960"
      }
    }
  ],
  "serpapi_pagination": {
    "next": "https://serpapi.com/search.json?data_id=0x89c25998e556791b%3A0xbdcd67f46e37b16d&engine=google_maps_photos&hl=en&next_page_token=EvgDKYQi49-NlUMIDwAAAAEAAAMAAAAQAAAAAAAAAAAAAAAAAAIgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBAAAAAAAgAAAAAAAQAAAAIgAAAAAAAAAABAAAAAAAAAAEAQAAAAAAAAQAAAAAAIAAAAAAAAABAAAAAAAAAACAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAABAQAAAAAAAAAAAACAAAAAIAAAAAAAAAAgAEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAEAAAAAAAAAAAAAAAAAAAAACAAAAAAAAASQAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAIAAAAAAAAAACAAAAACAgAAIAAABAAACAAAAAACAAIAAADAAAAAAAAAAAAAAAAAAAAAAAIAAAAgAAAAAA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