# Photo Meta

Metadata of one Google Maps photo: the place the photo belongs to, the contributor who uploaded it, the upload date and the image URLs in several sizes. One request costs 1 credit; failed requests are never charged. Send the Google Maps photo reference token as data_id. The location block describes the place of the photo itself, not the business_id you pass in. photo.type is photo or video. photo.source is review for photos from reviews, owner for uploads by the business, user_upload for photos posted by visitors, street_view and other. user.local_guide_level is always null because Google does not include it in the photo payload.

- **Documentation:** [https://scrappa.co/docs/google-maps-api/google_maps_photo_meta](https://scrappa.co/docs/google-maps-api/google_maps_photo_meta)
- **API group:** Google Maps API
- **Endpoint:** `GET https://scrappa.co/api/maps/photo-meta`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `data_id` | string | Yes | Google Maps photo identifier, the reference token of one photo, for example the CIHM0og... or AF1Qip... token that Google Maps uses for the photo. Example: AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1 |
| `business_id` | string | No | Optional Google Maps business in google_id (0x...:0x...) or place_id (ChIJ...) format. The answer always describes the photo's own place, so you can leave it out. |
| `hl` | string | No | Language of place names and types. Lowercased before it is sent. Default: en |
| `gl` | string | No | Country/region code for the upstream payload. Default: us |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/maps/photo-meta?data_id=AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1&hl=en&gl=us"
```

## Example response

```json
{
    "data_id": "AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1",
    "photo": {
        "id": "AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1",
        "type": "photo",
        "width": 2268,
        "height": 4032,
        "image": "https://lh3.googleusercontent.com/p/AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1=w2268-h4032-k-no",
        "sizes": [
            {
                "width": 56,
                "height": 100,
                "url": "https://lh3.googleusercontent.com/p/AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1=w56-h100-k-no"
            },
            {
                "width": 225,
                "height": 400,
                "url": "https://lh3.googleusercontent.com/p/AF1QipM6vCx1fWKoyaAEmCprTigHENoJXKYA8Zja1Ti1=w225-h400-k-no"
            }
        ],
        "source": "review",
        "uploaded_at": "2024-02-17",
        "date": "Feb 17, 2024"
    },
    "user": {
        "name": "Test Reviewer One",
        "link": "https://maps.google.com/maps/contrib/100000000000000000001",
        "image": "https://lh3.googleusercontent.com/a/TESTAVATAR=s48-p-k-no-mo",
        "user_id": "100000000000000000001",
        "local_guide_level": null
    },
    "location": {
        "name": "The Rameshwaram Cafe @ Indiranagar",
        "type": "South Indian restaurant",
        "latitude": 12.98167963657049,
        "longitude": 77.64091802480735,
        "google_id": "0x3bae179ad3b6da99:0xd823b05add6a7fae"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The data_id, business_id, hl or gl parameter failed validation, or Google rejected the ids. This response is not billed. |
| 404 | Photo Not Found | Google Maps has no photo for this data_id. This response is not billed. |
| 503 | Photo Meta Temporarily Unavailable | Google Maps did not return a usable payload. Retry after the Retry-After interval; this response is not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
