Google Images API
Google Images results: full-size image URL and dimensions, thumbnail, the page the image is on, site name and domain, up to 100 per call.
GET /v1/google/search/imagesBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/google/search/images?q=golden%20retriever",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "searchParameters": { "q": "golden retriever", "type": "images", "engine": "google", "gl": "us", "hl": "en", "num": 100, "page": 1 }, "images": [ { "title": "Golden Retriever: Pros, Cons & Diet Guide | Ollie", "imageUrl": "https://blog.ollie.com/wp-content/uploads/250506_Livingroom_SHOT-10_0173_FR-scaled.jpg", "imageWidth": 2560, "imageHeight": 1707, "thumbnailUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSe1mLcW_M8xRI0J5UcnG6soPw9kd8XQOgz7Y4sOLFZoA&s=10", "thumbnailWidth": 678, "thumbnailHeight": 452, "source": "Ollie Blog", "domain": "blog.ollie.com", "link": "https://blog.ollie.com/breed-deets-golden-retriever/", "position": 1 }, { "title": "Golden Retriever - Complete Breed Guide & Characteristics | PawChamp", "imageUrl": "https://cms.paw-champ.com/api/assets/dog-wiki/c04d1bd8-dbc9-41b2-b7e1-3df13c481116?cache=3600", "imageWidth": 1200, "imageHeight": 800, "thumbnailUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSz2Jo2ZHG4JFSzRXQhSwRlV1k3lwa8F0vLA5569Dt2ZA&s=10", "thumbnailWidth": 547, "thumbnailHeight": 365, "source": "PawChamp", "domain": "paw-champ.com", "link": "https://paw-champ.com/dog-wiki/breed/golden-retriever?lang=en", "position": 2 }, "… 98 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | The search, as typed into Google (operators work). Example: coffee. |
glquery | string | Country to search from, default us. Example: gb. |
hlquery | string | Interface language, default en. Example: de. |
locationquery | string | Where the search happens, as a canonical place name ("Austin,Texas,United States"). Example: Austin,Texas,United States. |
numquery | integer | Results per page (default 100, at most 100). |
tbsquery | string | Time filter: qdr:h (past hour), qdr:d, qdr:w, qdr:m, qdr:y, or a cdr:1,cd_min:…,cd_max:… range. Example: qdr:w. |
safequery | "active" | "off" | SafeSearch, default off. One of active, off. |
Status codes
| Status | Meaning |
|---|---|
200 | The images. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Google Maps place matches that reference. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Google is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
How many?
Up to 100, as Google’s first images page loads them.
Google is a trademark of Google LLC. We are not affiliated with or endorsed by Google.