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

find_images

Find a page’s images, best first: the largest, most prominent content images, each at its largest known original URL, with its size when known. Leaves out SVGs, images in the site’s header, nav or footer, and images known to be under 100 pixels on a side, such as icons and tracking pixels. Use when you need a page’s main image or its photos. Do not use to find pictures of a subject across the web (use search_images), or for where an image appears (use search_by_image). Defaults to kernel. Set provider to choose another supported provider; Fieldwork never switches providers after an error.

POST/api/v1/tools/find_images
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:kernel
timeoutinteger

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

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

The page's full URL, including https://.

limitinteger

The most images to return. Leave out for every image found.

min 1
renderstring

auto (the default) reads the page's HTML and renders it in a browser only when that leaves no image or no clear best one; never only reads the HTML; always renders, which finds images JavaScript loads and measures real sizes, and is slower.

Allowed:autoneveralways
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
urlstring<uri>required

The page's full URL, including https://.

limitinteger

The most images to return. Leave out for every image found.

min 1
renderstring

auto (the default) reads the page's HTML and renders it in a browser only when that leaves no image or no clear best one; never only reads the HTML; always renders, which finds images JavaScript loads and measures real sizes, and is slower.

Allowed:autoneveralways
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:kernel
requestIdstringrequired
resultobjectrequired
Show properties
imagesobject[]required

The page's images, best first.

Show properties
Array of object
heightnumber
measuredbooleanrequired

True when width and height were measured from loaded pixels; false when the page declared them or the CDN's URL names them.

scorenumberrequired

How good the image is; higher is better.

sourcesstring[]required

Where the page names the image, such as og:image, img or srcset, and lcp when it was the rendered page's largest contentful paint.

urlstringrequired
variantsstring[]required

The image's other URLs, such as the page's own and smaller sizes.

verifiedbooleanrequired

False when a CDN pattern built url and nothing loaded it; the page's own URL is then first in variants.

widthnumber
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[]
renderErrorobject

Why the render failed, when render was auto and the images are the read's instead.

Show properties
codestringrequired
messagestringrequired
renderedbooleanrequired

Whether the page was rendered in a browser.

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/find_images' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "kernel",
  "timeout": 1,
  "url": "http://example.com",
  "limit": 1,
  "render": "auto",
  "maxCharacters": 1
}'
Response
{
  "provider": "kernel",
  "requestId": "string",
  "result": {
    "images": [
      {
        "height": 0,
        "measured": true,
        "score": 0,
        "sources": [
          "string"
        ],
        "url": "string",
        "variants": [
          "string"
        ],
        "verified": true,
        "width": 0
      }
    ],
    "meta": {
      "requestId": "string",
      "usage": {
        "costUsd": 0,
        "credits": 0,
        "units": {
          "property1": 0,
          "property2": 0
        }
      },
      "warnings": [
        "string"
      ]
    },
    "renderError": {
      "code": "string",
      "message": "string"
    },
    "rendered": true,
    "truncated": [
      {
        "length": 0,
        "path": "string",
        "shown": 0
      }
    ]
  }
}

Was this page helpful?