Migrate from Outscraper (photos)

Move Outscraper Google Maps Photos calls, including owner photos with tag=by_owner, to /v1/business/google/photos.
Open as Markdown
On this page

GET /v1/business/google/photos accepts Outscraper's Google Maps Photos parameters and returns its response body. It runs synchronously: the photos come back in the same response.

Note:

Beta: the photos parser was written from public documentation and hasn't been checked against a live response yet.

1. Change the request

OutscraperDataForGAIO
URLOutscraper's Google Maps Photos endpointhttps://api.dataforgaio.com/v1/business/google/photos
AuthYour Outscraper API keyYour dg_ key in X-API-Key, a Bearer header or Basic auth
Async modeOptionalNot used: every call is synchronous, so there's no request id to poll
cURL
curl -G "https://api.dataforgaio.com/v1/business/google/photos" \
  -H "X-API-Key: $DATAFORGAIO_API_KEY" \
  --data-urlencode "query=Blue Bottle Coffee, 1 Ferry Building, San Francisco" \
  --data-urlencode "tag=by_owner" \
  --data-urlencode "photosLimit=20"

2. Parameters

ParameterDefaultNotes
queryrequiredA name and address, a place_id, a google_id (0x...:0x...) or a CID. Up to 25 queries, newline-separated in one query parameter. Repeating the parameter keeps only the last value.
photosLimit100Photos per place, 1 to 1,000. photos_limit also works.
tagallall, latest, menu, by_owner or videos.
languageen
regionus2-letter country.
limitAccepted for compatibility; one place is returned per query.
auto_upgrade, max_level, max_cost, max_ageOur request controls. max_cost caps the number of images: max_cost=0.018 returns at most 20.

3. Response

{
  "id": "5b1f0d9c-...",
  "status": "Success",
  "receipt_id": "9a2e...",
  "cost": 0.018,
  "fetch_level": "standard",
  "upgraded": false,
  "upgrade_reason": null,
  "cache_hit": false,
  "data": [
    [
      {
        "query": "Blue Bottle Coffee, 1 Ferry Building, San Francisco",
        "name": "Blue Bottle Coffee",
        "place_id": "ChIJ...",
        "google_id": "0x808f...:0x2c1d...",
        "full_address": "1 Ferry Building #7, San Francisco, CA 94111",
        "photos_data": [
          {
            "photo_id": "AF1Qip...",
            "photo_url": "https://...=w1024-h768-k-no",
            "photo_url_big": "https://...=w2048-h1536-k-no",
            "original_photo_url": "https://...=s0",
            "latitude": null,
            "longitude": null,
            "photo_date": null,
            "photo_upload_source": "owner",
            "photo_source_video": null,
            "photo_tags": ["by_owner"]
          }
        ]
      }
    ]
  ]
}

data has one list per query, each holding one place. Differences from Outscraper:

  • receipt_id, cost, fetch_level, upgraded, upgrade_reason and cache_hit are ours.
  • latitude, longitude, photo_date and photo_source_video are null; we return photo URLs, not their metadata.
  • photo_upload_source is "owner" when you asked for tag=by_owner, otherwise null.

4. Pricing and errors

  • $0.0009 per image returned ($0.90 per 1,000). A query that finds no place, or a place with no photos for the tag, costs $0.
  • Results are cached for 24 hours per query, tag, language and region.
  • Errors return {"id", "status": "Error", "error": true, "errorMessage", "receipt_id"} with HTTP 400 (invalid input, or no places found), 401, 402, 429 or 500. None are billed.

See GETGoogle Business Photos for every field.