Google Lens API
Find image matches with Google Lens. Supply either a public HTTPS image URL in id or image_base64 for direct image upload. Optional query refines all or visual_matches searches.
Make a request
Use your existing PrismCrawl API key and credit balance. A completed request consumes one credit, including recognized empty or unavailable results and source changes found during a valid continuation. Validation and operational errors remain uncharged. Each completed continuation request is billed separately.
curl 'https://api.prismcrawl.com/v1/google/lens' \
--request POST \
--header 'content-type: application/json' \
--header 'x-api-key: <PRISMCRAWL_API_KEY>' \
--data '{
"id": "https://images.unsplash.com/photo-1546182990-dffeafbe841d"
}'Supported parameters
| Parameter | Usage |
|---|---|
id | The provider's identifier, as returned by its search results. |
country | Two-letter country or storefront code, such as us or gb. |
language | Provider-supported language code, such as en. |
device | Device presentation for the source request. desktop, mobile, tablet |
html | Return the encoded original response rather than parsed JSON. |
zero_trace | Do not archive source or parsed response artifacts. |
type | Lens result mode: all, exact_matches, or visual_matches (default). all, exact_matches, visual_matches |
query | Text to search for on the selected service. |
safe | Provider safe-search filtering. active, off |
auto_crop | Use the native detected area of interest when available. Defaults to false. |
image_base64 | Padded base64 JPEG, PNG, GIF or WebP image, at most 1 MiB decoded. Replaces the public image URL in id. Image bytes are not echoed in results or retained in request-history parameters. |
Structured results
Read items from data.content.results. The response also includes the search metadata, pagination state, and any extracted SERP features. Optional fields appear when supplied by the provider.
For image-URL lookups, when Google Lens confirms it cannot access an image at the supplied URL, the API returns HTTP 200 with empty results and search metadata image_unavailable: true, image_unavailable_reason: no_image_at_url, and matches_available: false. This completed lookup costs one credit and has no continuation. The native response status is recorded as source_status: 200; it does not describe the image host's status. Use an accessible image URL, or image_base64 on the Lens endpoint when you have the image bytes. This outcome does not classify the image's content.
addresscategorycoordinatesdescriptionheightidlatitudelongitudematch_typenameoriginalphonepositionrankratingrating_maxrating_sourcereview_countsnippetsourcethumbnailtitletypeurlwebsitewidthSDKs and guides
The official SDKs cover this endpoint with typed parameters, automatic retries, and pagination helpers.
- Python SDK:
pip install prismcrawl - Node.js SDK:
npm install prismcrawl