GET /business_photo_details

Business Photo Details

Get one Google Maps photo or video with its upload date and hour, the date it was taken, coordinates, uploader and upload source (owner, Maps app, web).

Google Maps Scraper API

Get the full record of one photo or video of a business: when it was uploaded (to the hour), when it was taken, where, by whom, and how it reached Google Maps (the owner’s Business Profile, the Maps app on Android or iOS, Maps on the web, Google Search). Take the photo_id from Business Photos . To get these fields for a whole page of photos in one call, use details=true on Business Photos instead.

HTTP Request

1
GET /business_photo_details

Parameters

ParameterTypeRequiredDefaultDescription
business_idstringYes—Google ID (0x...:0x...), place ID (ChIJ...) or numeric CID of the business the photo belongs to
photo_idstringYes—The id of a photo from Business Photos
langstringNo"en"Language code for the response
countrystringNo"us"Country code for regional context

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  "status": true,
  "request_id": "91ef8e9e-981a-2d2a-0249-9c61d65d",
  "data": {
    "id": "CIHM0ogKEICAgIDynbm0_gE",
    "url": "https://lh3.googleusercontent.com/gpms-cs-s/AM4Q-U8xy9UnbdU6Yuvo0W-7miS2nsUB...=k-no",
    "type": "photo",
    "max_size": [5004, 3507],
    "aspect_ratio": 1.4269,
    "date": "2018-2-15",
    "timestamp": 1518721200,
    "taken_date": "2014-10-30",
    "taken_timestamp": 1414627200,
    "latitude": 34.03383380791417,
    "longitude": -118.2293286680481,
    "user_name": "Bestia",
    "user_id": "114405245811654264852",
    "user_profile_url": "https://www.google.com/maps/contrib/114405245811654264852",
    "user_avatar": "https://lh3.googleusercontent.com/a/ACg8ocLtp4DoIJB7dsTGSTvmF20_svdCT06697lKSkLftdczYZYTNQ=s48-p-k-no-mo",
    "video_url": null,
    "video_duration_ms": null,
    "uploaded_by_owner": true,
    "upload_source": "business_profile",
    "from_review": false
  },
  "request_params": {
    "business_id": "0x80c2c621d7d91b49:0x5e3e80cfbddfba70",
    "photo_id": "CIHM0ogKEICAgIDynbm0_gE"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique identifier for this request
dataobjectThe photo
data.idstringPhoto id
data.urlstringPhoto URL. Add a size suffix such as =w1600-h1200-k-no to resize
data.typestringphoto or video
data.max_sizearray[width, height] of the original in pixels
data.aspect_rationumberWidth divided by height
data.datestringUpload date as YYYY-M-D (not zero-padded)
data.timestampintegerUpload time as Unix epoch seconds, to the hour, UTC
data.taken_datestring/nullDate the photo was taken, YYYY-M-D. Same day as date or earlier
data.taken_timestampinteger/nulltaken_date at midnight UTC (Google gives no hour for it)
data.latitudenumberLatitude Google attaches to the photo, usually the business’s own position
data.longitudenumberLongitude Google attaches to the photo
data.user_namestringWho uploaded it. For owner photos this is the business name
data.user_idstringUploader’s Google Maps contributor id
data.user_profile_urlstringUploader’s contributor page
data.user_avatarstringUploader’s avatar URL
data.video_urlstring/nullMP4 link (largest rendition), videos only
data.video_duration_msinteger/nullVideo length in milliseconds, videos only
data.uploaded_by_ownerboolean/nulltrue when the business uploaded it, false for a customer
data.upload_sourcestring/nullHow the photo reached Google Maps (values below)
data.from_reviewboolean/nulltrue when the photo was posted with a review
request_paramsobjectThe parameters you sent

upload_source values

ValueMeaning
business_profileThe owner, through Google Business Profile
maps_androidGoogle Maps app on Android
maps_iosGoogle Maps app on iOS
maps_webGoogle Maps on the web
google_searchThe business panel on Google Search
otherAny other source

Notes

  • timestamp carries the upload hour (UTC). taken_timestamp has no hour, so it is always midnight UTC.
  • In the example the owner took the photo in October 2014 and uploaded it in February 2018. For customer photos posted from the Maps app the two dates are often the same day.
  • Street View panoramas listed by Business Photos (type: null) have no details entry.
  • Calling this endpoint for every photo of a page costs as much as details=true on Business Photos, which does it in one call.

Error Responses

1
2
3
4
5
6
7
8
9
{
  "status": false,
  "request_id": "66d3e83f-2044-6764-2dcd-836d634f",
  "error": "Invalid photo_id: NOTAREALPHOTOID",
  "request_params": {
    "business_id": "0x80c2c621d7d91b49:0x5e3e80cfbddfba70",
    "photo_id": "NOTAREALPHOTOID"
  }
}
Status CodeCauseDescription
400Unknown photo_idThe photo does not belong to that business, or the id is wrong
400Missing parameter"Invalid parameter 'photo_id': Field required"
503Upstream failureGoogle did not answer. Retry the call

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests
from datetime import datetime, timezone

url = "https://google-maps-extractor2.p.rapidapi.com/business_photo_details"

querystring = {
    "business_id": "0x80c2c621d7d91b49:0x5e3e80cfbddfba70",
    "photo_id": "CIHM0ogKEICAgIDynbm0_gE",
    "lang": "en",
    "country": "us"
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "google-maps-extractor2.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)
photo = response.json()["data"]

uploaded = datetime.fromtimestamp(photo["timestamp"], tz=timezone.utc)
who = "owner" if photo["uploaded_by_owner"] else "customer"
print(f"Uploaded {uploaded:%Y-%m-%d %H:00} UTC by {photo['user_name']} ({who}, {photo['upload_source']})")
print(f"Taken {photo['taken_date']} at {photo['latitude']}, {photo['longitude']}")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
const url = "https://google-maps-extractor2.p.rapidapi.com/business_photo_details";

const params = new URLSearchParams({
  business_id: "0x80c2c621d7d91b49:0x5e3e80cfbddfba70",
  photo_id: "CIHM0ogKEICAgIDynbm0_gE",
  lang: "en",
  country: "us",
});

const response = await fetch(`${url}?${params}`, {
  method: "GET",
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "google-maps-extractor2.p.rapidapi.com",
  },
});

const { data: photo } = await response.json();

console.log(`Uploaded ${new Date(photo.timestamp * 1000).toISOString()} via ${photo.upload_source}`);
console.log(`Taken ${photo.taken_date} at ${photo.latitude}, ${photo.longitude}`);
1
2
3
4
5
6
7
curl -G "https://google-maps-extractor2.p.rapidapi.com/business_photo_details" \
  --data-urlencode "business_id=0x80c2c621d7d91b49:0x5e3e80cfbddfba70" \
  --data-urlencode "photo_id=CIHM0ogKEICAgIDynbm0_gE" \
  --data-urlencode "lang=en" \
  --data-urlencode "country=us" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: google-maps-extractor2.p.rapidapi.com"
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI