ForHosting KIT · Documents & PDF

List images in a PDF

Turn nested PDF image metadata into a clean inventory that is easy to inspect, filter, and store.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

Provide the image descriptors for each page, including the page number and every image's pixel dimensions. The result is one flat list in source order, with a one-based index added for each image on its page. This is useful after a PDF parser has identified embedded images but before another system needs to audit, select, export, or report on them.

Prepare per-page image descriptors

Start with the metadata produced by your PDF reader or extraction pipeline. The input is a pages array, and every page entry contains a positive page number plus an images array. Each image needs a positive integer width and height in pixels. Keep images in the order reported by the parser because that order becomes the image index in the result. The index starts at one for every page, which makes it convenient for people to read and for reports to describe an item such as “page 4, image 2.” Pages may contain no images; include an empty images array when retaining that page is helpful to your workflow. Page numbers do not need to be consecutive, so metadata for selected pages can be processed without adding placeholders. They must, however, be unique within a request. This explicit structure prevents a missing page label from silently attaching an image to the wrong location and keeps the inventory tied to the PDF metadata that produced it.

Understand the flattened result

The response contains an images array with one record for every descriptor found across all supplied pages. Each record has exactly four useful fields: page, index, width, and height. Page is copied from the containing page entry. Index is calculated from the image's position within that page and restarts at one on the next page. Width and height are copied after validation, without resizing, rounding, rotation, or unit conversion. Records preserve the order of the page entries you submit and the order of images inside each entry. That stable traversal makes repeated runs deterministic and lets a downstream job compare inventories without an unexpected sort step. The capability does not open a PDF or extract binary image data; it normalizes descriptors already obtained from a PDF parser. As a result, duplicated dimensions remain separate records, because two images with the same size can still be distinct PDF resources or placements. Empty page image arrays simply contribute no records to the flat list.

Validate and use the inventory

Use the flat inventory wherever nested page metadata is inconvenient. A quality check can flag images below a minimum resolution, an extraction job can choose only records larger than a thumbnail, and an audit report can count images by page without repeatedly walking nested arrays. Store page and index together as the human-readable location of an image, while remembering that the index describes the supplied order rather than an internal PDF object identifier. Validation is deliberately strict. The request fails when pages is missing or empty, when page numbers are duplicated or invalid, when an images value is not an array, or when a width or height is not a positive integer. A failure is preferable to producing a partial inventory that looks complete. The operation is deterministic, uses no network access, and does not retain descriptors. You can run it in the browser for interactive work or call the API for $0.002 per request when the inventory belongs in an automated PDF processing pipeline.

Audit image resolution

Flatten parser metadata, then find images whose width or height falls below your document quality requirements.

Plan selective extraction

Create a page-and-index manifest that a later step can use to select full-size images and ignore small decorative assets.

Build a PDF asset report

Turn nested page results into straightforward rows for a spreadsheet, database table, or document processing log.

Does this capability read or upload the PDF itself?

No. It accepts per-page image descriptors that your PDF parser has already produced.

How are image indexes assigned?

Indexes are one-based, follow the supplied image order, and restart at one for each page.

Can a page have no images?

Yes. Supply that page with an empty images array; it contributes no records to the result.

Must page numbers be consecutive?

No. You may submit selected pages, but every page number in one request must be a unique positive integer.

What does an API request cost?

The API price is $0.002 per request. The browser runner is available for interactive use.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/pdf/extract-images-list

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/pdf/extract-images-list \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pages":[{"page":1,"images":[{"width":1200,"height":800},{"width":64,"height":64}]},{"page":2,"images":[{"width":1920,"height":1080}]}]}'
{
  "pages": [
    {
      "page": 1,
      "images": [
        {
          "width": 1200,
          "height": 800
        },
        {
          "width": 64,
          "height": 64
        }
      ]
    },
    {
      "page": 2,
      "images": [
        {
          "width": 1920,
          "height": 1080
        }
      ]
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.extract_images_list",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_pages10000
max_images_per_page10000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →