About this endpoint
What it does
Downloads images or other files from direct links and web pages, stores each file, and returns a JSON object with one row per file and a public download link. It can also resize, convert and deduplicate the images.
Request Body
| Parameter | Type | Description |
|---|---|---|
| urls | String Array | Direct image or file links. Max 100 items. Send urls, pageUrls, or both. Direct links run first, in input order, and each one returns a row. |
| pageUrls | String Array | Web pages to scan for images: <img> src, lazy data-src, the largest srcset size, og:image, twitter:image and links to image files. Max 100 items. Page images are stored only while room remains under maxFiles. |
| fileTypes | ENUM | Allowed values: images, all. Default: images. images rejects links that are not real images. all stores any file type. |
| outputFormat | ENUM | Allowed values: original, jpg, webp, png. Default: original. original keeps the file as it is. The other values convert every image. Transparent images get a white background in JPG. SVG and HEIC files stay as they are. |
| quality | Integer | Quality for converted JPG and WebP images. Range: 30 to 100. Default: 85. |
| maxWidth | Integer | Images wider than this are scaled down, keeping the aspect ratio. 0 means no resize. Range: 0 to 10000. Default: 0. |
| minWidth | Integer | Raster images narrower than this are skipped. The check uses the source image, before any resize. Minimum: 0. Default: 50. SVG files ignore it. |
| minHeight | Integer | Raster images shorter than this are skipped. The check uses the source image, before any resize. Minimum: 0. Default: 50. SVG files ignore it. |
| maxFileMb | Integer | Files bigger than this many megabytes are skipped. Range: 1 to 200. Default: 25. |
| maxFiles | Integer | Max files stored per call. Range: 1 to 100. Default: 50. Links over the limit return a row with found set to false. |
| dedupeByContent | Boolean | When true, the same picture under different URLs is stored once, detected by the SHA-256 of the content. The first URL in input order is kept. Default: true. |
Response
Returns a JSON object with a count and an items array. Each item describes one input link or one image found on a page.
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Number of rows in items. |
| items[].found | Boolean | true when the file was stored. false when it was skipped or failed. See reason. |
| items[].reason | String | Why the row was not stored, for example HTTP 404, image too small (550x368 < 5000x50) or duplicate content (dedupeByContent:true). Only on rows where found is false. |
| items[].key | String | File key. |
| items[].name | String | Always null. |
| items[].sourceUrl | String | The link the file came from. |
| items[].foundOn | String | input for a link from urls, or the page address for an image found on a page. |
| items[].position | Integer | Position of the link in urls, starting at 1. null for images found on pages. |
| items[].fileUrl | String | Public download link for the stored file. Valid for at least 7 days. |
| items[].fileName | String | Name of the stored file. |
| items[].format | String | File format, for example jpg, png, webp, gif or svg. |
| items[].contentType | String | MIME type of the stored file. |
| items[].bytes | Integer | Size of the stored file in bytes. |
| items[].originalBytes | Integer | Size of the source file in bytes. |
| items[].width | Integer | Width in pixels. null for files without pixel size, such as SVG or JSON. |
| items[].height | Integer | Height in pixels. null for files without pixel size, such as SVG or JSON. |
| items[].sha256 | String | SHA-256 hash of the stored file. |
| items[].downloadedAt | String | UTC time the file was downloaded, in ISO 8601 format. |
| items[].cached | Boolean | true when the row comes from an earlier identical request. Only present on cached rows. |
| items[].cacheAgeSeconds | Integer | Age of the cached row in seconds. Only present on cached rows. |
Notes
- Send at least one of
urlsorpageUrls. Otherwise the call returns400withinvalid_input. - Wrong types, unknown fields, null values, empty strings in lists and values outside a range return
400withinvalid_inputand a message that names the field. - A link that cannot be stored does not fail the call. The call returns
200and the row hasfoundset tofalseand areason. Reasons include source errors (HTTP 404,download failed after retries (503)),not a valid image,image too small,file bigger than maxFileMb,empty file (0 bytes),duplicate contentandskipped: maxFiles limit reached. - Identical requests can return cached rows (
cachedistrue). - Private and internal network addresses are blocked.



