# Google Business Photos

> **Beta:** the parser for this endpoint has not yet been checked against a live response. Field shapes may change.

`GET /v1/business/google/photos`

Photo URLs for a place, filterable to owner uploads with `tag=by_owner`, in the Outscraper photos request and response shape.

Family: Business API · Mode: Live

## Price

Unit: image

| Mode | Price (USD) |
|---|---|
| Live | $0.0009 |

Per photo returned; not priced by fetch level.

## Description

Send the place in `query`. For several places, repeat `query` in the URL, separate them with newlines, or POST a JSON body with `query` as an array.

A query that matches no place returns HTTP 200 with an empty list for that query in `data`, at $0 (Outscraper's convention). Bad input is HTTP 400.

**Billing.** Per photo returned. A place with no photos for the tag, or no place found, costs $0. Results are cached for 24 h.

**Beta.** We read Google's place data with a parser written from public documentation that hasn't been checked against live responses yet. Field names and shapes are fixed; some values may be null more often than they should be until that check is done.

## Authentication

HTTP Basic auth: any login, with your `dg_` API key as the password. A `Bearer` token header with the key also works.

## Request

Send the fields as query parameters.

| Field | Type | Required | Description |
|---|---|---|---|
| `query` | string\|array<string> | yes | The place: name and address, place id, `0x…:0x…` feature id, or CID. Send up to 25 places by repeating `query` (`?query=a&query=b`), separating them with newlines, or as a JSON array (POST). max 25 |
| `photosLimit` | integer | no | Most photos to return per place. `photos_limit` and `limit` are accepted too. default `100`; min 1; max 1000 |
| `photos_limit` | integer | no | Same as `photosLimit`. |
| `limit` | integer | no | Same as `photosLimit`. |
| `tag` | string | no | Which photos: `all`, `latest`, `menu`, `by_owner` (owner uploads) or `videos`. default `all`; one of `all`, `latest`, `menu`, `by_owner`, `videos` |
| `language` | string | no | Language. default `en` |
| `region` | string | no | Two-letter country the place is in. default `us` |
| `auto_upgrade` | boolean | no | Lets the request move to a higher fetch level when the included level can't get the data, billed at the level that delivered it. `false` stops at the Standard level and returns the failure at $0. Also accepts `"true"`, `"false"`, `1` and `0`. default `true` |
| `max_level` | string | no | The highest fetch level Auto-upgrade may use. `rendered` never uses the Protected level. default `protected`; one of `standard`, `rendered`, `protected` |
| `max_cost` | number | no | The most this task may cost, in USD. The wallet check reserves this amount instead of the worst-case price, the request never upgrades past it, and the charge never exceeds it. Photos stop at the number this amount pays for. min 0 |
| `max_age` | integer | no | Accept a cached result up to this many seconds old, 0 to 86,400. `0` always fetches fresh. Default window: 24 h. Leave it out to use it. min 0; max 86400 |

### Example request

```bash
curl -X GET "https://api.dataforgaio.com/v1/business/google/photos" \
  -u "api:$DATAFORGAIO_API_KEY"
```

## Response

| Field | Type | Description |
|---|---|---|
| `id` | string | Request id. |
| `status` | string | `Success`. |
| `receipt_id` | string\|null | Id of the ledger receipt for this request. |
| `cost` | number | What this request was charged, in USD. |
| `fetch_level` | string\|null | The fetch level that delivered the data: `standard`, `rendered` or `protected`. Null when the route doesn't fetch pages or nothing was fetched. one of `standard`, `rendered`, `protected` |
| `upgraded` | boolean | True when Auto-upgrade moved the request past the included level (or, for SERP, to the live path) and the charge reflects that. |
| `upgrade_reason` | string\|null | Why the request upgraded, in our level names and HTTP facts, for example `403 at standard; challenge page at rendered`. Null when it didn't upgrade. |
| `cache_hit` | boolean | True when every place came from the shared result cache. |
| `data` | array<array<object>> | One list per query, in the order sent, holding the place; an empty list when no place matched that query. |
| `data.query` | string | The query this place answers. |
| `data.name` | string\|null | Place name. |
| `data.place_id` | string\|null | Google place id. |
| `data.google_id` | string\|null | Google feature id, `0x…:0x…`. |
| `data.full_address` | string\|null | Full address. |
| `data.photos_data` | array<object> | The photos. |
| `data.photos_data.photo_id` | string | Photo id. |
| `data.photos_data.photo_url` | string | Photo URL sized to 1024×768. |
| `data.photos_data.photo_url_big` | string | Photo URL sized to 2048×1536. |
| `data.photos_data.original_photo_url` | string | Photo URL at its original size. |
| `data.photos_data.latitude` | null | Not available. Always null. |
| `data.photos_data.longitude` | null | Not available. Always null. |
| `data.photos_data.photo_date` | null | Not available yet. Always null. |
| `data.photos_data.photo_upload_source` | string\|null | `owner` for `tag: by_owner`; null otherwise. |
| `data.photos_data.photo_source_video` | null | Not available. Always null. |
| `data.photos_data.photo_tags` | array<string> | The tag you asked for; empty for `all`. |

### Example response

```json
{
  "id": "8cbb5b5c-8e15-5c82-9959-45f93cdad009",
  "status": "Success",
  "receipt_id": "744695e7-dd8a-5016-bb2b-2d314ea9ef81",
  "cost": 0.0018,
  "fetch_level": "standard",
  "upgraded": false,
  "upgrade_reason": null,
  "cache_hit": false,
  "data": [
    [
      {
        "query": "0x876bec0d1a2b3c4d:0x112210f4a8c0b315",
        "name": "Summit Running Co.",
        "place_id": "ChIJexample-summit-0001",
        "google_id": "0x876bec0d1a2b3c4d:0x112210f4a8c0b315",
        "full_address": "120 Main St, Boulder, CO 80302",
        "photos_data": [
          {
            "photo_id": "AF1QipSummitStorefront",
            "photo_url": "https://lh5.googleusercontent.com/p/AF1QipSummitStorefront=w1024-h768-k-no",
            "photo_url_big": "https://lh5.googleusercontent.com/p/AF1QipSummitStorefront=w2048-h1536-k-no",
            "original_photo_url": "https://lh5.googleusercontent.com/p/AF1QipSummitStorefront=s0",
            "latitude": null,
            "longitude": null,
            "photo_date": null,
            "photo_upload_source": null,
            "photo_source_video": null,
            "photo_tags": []
          },
          {
            "photo_id": "AF1QipSummitShoeWall",
            "photo_url": "https://lh5.googleusercontent.com/p/AF1QipSummitShoeWall=w1024-h768-k-no",
            "photo_url_big": "https://lh5.googleusercontent.com/p/AF1QipSummitShoeWall=w2048-h1536-k-no",
            "original_photo_url": "https://lh5.googleusercontent.com/p/AF1QipSummitShoeWall=s0",
            "latitude": null,
            "longitude": null,
            "photo_date": null,
            "photo_upload_source": null,
            "photo_source_video": null,
            "photo_tags": []
          }
        ]
      }
    ]
  ]
}
```

## Errors

| Code | When |
|---|---|
| 400 | `query` missing, more than 25 places, an unknown `tag`, a `photosLimit` below 1, or `max_cost` below the price of one photo. Body: `{"status": "Error", "error": true, "errorMessage": ...}`. |
| 401 | No valid API key. |
| 402 | Wallet balance below the worst case for this request. |
| 429 | Too many requests. |

## Migrating

Replaces Outscraper `Google Maps Photos (query, photosLimit, tag)`. Same request body and response envelope; change the base URL and the key.
