Crawl a site
crawl_sitePaid plans: scan several pages of one site at once, from its sitemap's address or a list of its pages, each as a page scan of its own, compressing every image they load with the settings given; an image the pages share is compressed once. It answers straight away with the crawl queued; a crawl takes a few minutes, so call get_crawl until it is done. Each crawl counts one against the account's daily site crawls, and takes up to the plan's pages per crawl (get_usage, limits.pages_per_crawl); its pages do not count against the daily page scans, nor their images against the daily images. A list longer than the plan takes, or one mixing two sites, is refused. Another plan is refused with pro_required: scan the pages one at a time with scan_page instead. The site crawls reference: https://www.iminify.com/docs/site-crawls
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| pages | No | The pages to crawl, all on one site. https:// can be left out. Send this or sitemap, not both. | |
| 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. | |
| sitemap | No | The address of the site's sitemap (XML, a sitemap index, or a text file with one address a line). The crawl takes its first pages on the sitemap's own site. Send this or pages, not both. | |
| 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 crawl's id. | |
| url | No | The sitemap read, or the first page listed. | |
| hint | No | What to do next: poll again while pages or images are at work, then where each page's images and report are. | |
| note | No | Why the crawl failed. | |
| audit | No | The site's report, an image the pages share counted once. Null until the crawl is done. | |
| pages | No | Each page, in the order the crawl took them. | |
| source | No | ||
| status | No | completed once every page and its images have finished. failed: the crawl could not start its pages; note says why. | |
| settings | No | ||
| created_at | No | ||
| monitor_id | No | The weekly site check this crawl is a run of, or null. | |
| updated_at | No | ||
| pages_count | No | ||
| saved_bytes | No | ||
| images_count | No | ||
| pages_failed | No | ||
| original_size | No | Bytes, over the finished images. | |
| saved_percent | No | ||
| optimized_size | No | Bytes, over the finished images. | |
| pages_left_out | No | Pages past the plan's pages per crawl, not scanned. | |
| images_finished | No | ||
| pages_in_progress | No | ||
| images_in_progress | No |