Skip to content
Fieldwork
Esc
↑↓navigate↵open⌘Jpreview

search_by_image

Find the web pages an image appears on, given the image’s URL. Returns each page’s URL (sourceUrl), the matched image when the provider gives one, a thumbnail, a title and whether the match is the same image or a similar one. Use when you have an image and need to know where it is published, who uses it or where a larger copy is. Do not use to find pictures of a subject (use search_images), to find pages by text (use search_web) or to learn what is in an image. Defaults to serpapi. Set provider to choose another supported provider; Fieldwork never switches providers after an error.

POST/api/v1/tools/search_by_image
Authorization
AuthorizationBearer token · headerrequired

A Fieldwork gateway key, issued per agent by the operator. Send it as Authorization: Bearer <key>.

Request body
requiredapplication/json
providerstring
Allowed:serpapi
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
One of:
object
imageUrlstring<uri>required

The image's full URL, including https://. It must be publicly reachable.

querystring

Words to refine the search with, such as the subject. SerpApi refuses it together with match "exact".

matchstring

exact for pages showing the same image, visual for pages showing a similar one. Leave out for the provider's default, which lists similar images.

Allowed:exactvisual
countrystring

Localize results to this country, as a two-letter ISO code such as GB.

matches ^[A-Za-z]{2}$
languagestring

Prefer pages in this language, as an ISO 639-1 code such as en.

maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
object
imageUrlstring<uri>required

The image's full URL, including https://. It must be publicly reachable.

querystring

Words to refine the search with, such as the subject. SerpApi refuses it together with match "exact".

matchstring

exact for pages showing the same image, visual for pages showing a similar one. Leave out for the provider's default, which lists similar images.

Allowed:exactvisual
countrystring

Localize results to this country, as a two-letter ISO code such as GB.

matches ^[A-Za-z]{2}$
languagestring

Prefer pages in this language, as an ISO 639-1 code such as en.

maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
Responses
200

The provider that ran the call and its normalized result.

providerstringrequired
Allowed:serpapi
requestIdstringrequired
resultobjectrequired
Show properties
metaobject

Request details from the provider: its request id, what it charged and any warnings.

Show properties
requestIdstring
usageobject
Show properties
costUsdnumber
creditsnumber
unitsobject
warningsstring[]
resultsobject[]required
Show properties
Array of object
descriptionstring
heightnumber
kindstring

exact for the same image, visual for a similar one; absent when the provider does not say.

Allowed:exactvisual
publishedAtstring
siteNamestring
sourceUrlstringrequired
thumbnailUrlstring
titlestring
urlstring
widthnumber
truncatedobject[]

One entry for each cut text field; absent when nothing was cut.

Show properties
Array of object
lengthintegerrequired

Original character length.

min 0
pathstringrequired
shownintegerrequired

Characters shown before the inline cut note.

min 0
default

A refusal or a failed call. Branch on error.code; never parse the message.

errorobjectrequired
Show properties
codestringrequired
Allowed:AbortedInvalidRequestJobFailedNotAFileNotFoundProviderErrorRateLimitedTimeoutTooLargeUnauthorizedUnsupported
jobIdstring

A job that was already started. Pass it as resume instead of repeating the call.

messagestringrequired
providerstring
retryAfternumber

Seconds to wait.

retryablebooleanrequired

Whether repeating the same call can succeed.

requestIdstring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST '/api/v1/tools/search_by_image' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "serpapi",
  "timeout": 1,
  "imageUrl": "http://example.com",
  "query": "string",
  "match": "exact",
  "country": "string",
  "language": "string",
  "maxCharacters": 1
}'
Response
{
  "provider": "serpapi",
  "requestId": "string",
  "result": {
    "meta": {
      "requestId": "string",
      "usage": {
        "costUsd": 0,
        "credits": 0,
        "units": {
          "property1": 0,
          "property2": 0
        }
      },
      "warnings": [
        "string"
      ]
    },
    "results": [
      {
        "description": "string",
        "height": 0,
        "kind": "exact",
        "publishedAt": "string",
        "siteName": "string",
        "sourceUrl": "string",
        "thumbnailUrl": "string",
        "title": "string",
        "url": "string",
        "width": 0
      }
    ],
    "truncated": [
      {
        "length": 0,
        "path": "string",
        "shown": 0
      }
    ]
  }
}

Was this page helpful?