Scan a web page
scan_pageOpen a web page in a browser on Iminify's servers, collect every image it loads (scrolling to the bottom), and compress each one with the settings given; the finished scan also reports how the page shows its images (get_scan, in audit). It answers straight away with the scan queued; a scan takes from a few seconds to a few minutes, so call get_scan until its status is no longer queued or scanning and images_in_progress is 0. Each scan counts one against the account's daily page scans; the images it finds do not count against its daily images. Pages on private networks are refused, and a page behind a login usually comes back with no images. The page scans reference: https://www.iminify.com/docs/page-scans
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "scan_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page to scan. https:// can be left out. | |
| level | No | How hard to compress. "smart" (the default) finds the lowest quality that still looks like the original; "ultra" goes further and softens fine texture a little; "lossless" changes no pixel unless a size_limit needs it to; "none" only converts, resizes, fits a size limit and strips metadata. | |
| scale | No | Resize to this percentage of the original, 1 to 100. Not together with width or height. Like width, it is refused for an animated WebP or PNG. | |
| width | No | Resize to this width in pixels. Alone, the height follows the aspect ratio; with height too, the image is resized to exactly that size. An animated WebP or PNG cannot be resized and is refused with animation_not_resizable; an animated GIF can. | |
| format | No | Convert to this format. "auto" encodes every format that can hold the image and keeps the smallest. Leave it out to keep each image's own format (a HEIC or TIFF always comes back in another one). | |
| height | No | Resize to this height in pixels, the same way as width. | |
| alt_text | No | Write an AI alt text for each image the page shows with no alt attribute, for the audit's suggested_alt. On by default; false leaves it out. Each counts against the account's daily AI alt texts. | |
| keep_metadata | No | Keep the EXIF metadata (camera, date, location). Off by default, which strips it; the orientation is applied to the pixels first. | |
| alt_text_language | No | The language to write the alt text in, as a language tag. English ("en") by default. The suggested file name follows it for languages written in the Latin alphabet and is in English otherwise. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The scan's id. | |
| url | No | The page scanned. | |
| hint | No | What to do next: poll again while the scan or its images are still running, then where to read its images. | |
| note | No | What the scan found, or why it stopped. | |
| audit | No | The page audit: oversized images, missing dimensions and alt text, lazy loading in the wrong place, the largest contentful paint. Null until the scan has finished. | |
| status | No | ||
| skipped | No | The images the scan found and did not compress, each with why. | |
| crawl_id | No | The site crawl this scan is a page of, for get_crawl, or null. | |
| settings | No | ||
| share_url | No | The page report's public link while it is shared; it answers only while the account is on a paid plan. | |
| created_at | No | ||
| updated_at | No | ||
| saved_bytes | No | ||
| images_count | No | ||
| original_size | No | Bytes, over the finished images. | |
| saved_percent | No | ||
| optimized_size | No | Bytes, over the finished images. | |
| images_finished | No | ||
| images_in_progress | No | ||
| alt_texts_in_progress | No | Finished images whose AI alt text for the audit's suggested_alt is still being written. |