Piloterr

Google Images

GET
/v2/google/images

Google Images Scraper API – bringing the power of visual search to your fingertips.

Credit cost: 1 credit per call

Authentification

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Paramètres de requête

query*string

The image search query to execute on Google Images.

Example:

mountain landscape
google_domain?string

Google domain to use for the search. Defaults to google.com.

Examples:

  • google.com
  • google.co.uk
  • google.fr

Example:

google.com
Default"google.com"
gl?string

Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France).

Example:

us
Default"us"
hl?string

Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419).

Example:

en
Default"en"
cr?string

Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE).

Example:

countryUS
lr?string

Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de).

Example:

lang_en
page?number

Page number for pagination. Images are returned in batches of 100 per page.

  • 1: First 100 images (default)
  • 2: Next 100 images
  • 3: Next 100 images, etc.

Note: To retrieve additional images, increment this parameter with the same query.

Default"1"
safe?string

Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default.

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Corps de la réponse

Successful response

application/json
  1. response
images?array<>
search_parameters?
Example Request
curl -X GET 'https://api.piloterr.com/v2/google/images?query=string'
Example Response
{  "images": [    {      "url": "https://thumbs.dreamstime.com/b/stunning-mountain-landscape-crystal-clear-flowing-stream-breathtaking-photo-realistic-scene-majestic-lush-358650506.jpg",      "link": "https://www.dreamstime.com/stunning-mountain-landscape-crystal-clear-flowing-stream-breathtaking-photo-realistic-scene-majestic-lush-image358650506",      "title": "Stunning Mountain Landscape with a Crystal Clear Flowing Stream",      "domain": "www.dreamstime.com",      "source": "Dreamstime.com",      "position": 1,      "image_width": 800,      "image_height": 449    },    {      "url": "https://images.stockcake.com/public/8/8/9/889c1161-ac90-403a-b63f-23d708e67520_large/sunset-mountain-landscape-stockcake.jpg",      "link": "https://www.pexels.com/photo/mountain-landscape-with-forests-and-a-stream-18682254/",      "title": "Mountain Landscape with Forests and a Stream",      "domain": "www.pexels.com",      "source": "Pexels",      "position": 2,      "image_width": 728,      "image_height": 408    },    {      "url": "https://images.pexels.com/photos/18682254/pexels-photo-18682254/free-photo-of-mountain-landscape-with-forests-and-a-stream.jpeg",      "link": "https://www.dreamstime.com/photos-images/mountain-landscape-canada.html",      "title": "Mountain Landscape Canada Stock Photos",      "domain": "www.dreamstime.com",      "source": "Dreamstime.com",      "position": 3,      "image_width": 4032,      "image_height": 3024    }  ],  "search_parameters": {    "q": "mountain landscape",    "gl": "us",    "hl": "en",    "page": 1,    "engine": "google"  }}