ForHosting KIT · Documents & PDF

Extract PDF pages

Extract PDF Pages API lets you carve a specific page range out of any PDF and get back a fresh, self-contained document. You send the source file and the pages you want; we return a new PDF that keeps the original layout, fonts, and vector quality intact. It is built for the moment when you need pages 12 through 18 of a 400-page report and nothing else.

● StablePer request + per page$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The problem it removes

Almost every document workflow eventually hits the same wall: a PDF is too big, too broad, or mixes several logical documents into one file. A contract packet holds the master agreement, three appendices, and a signature page. A scanned book arrives as one giant file when you only need a chapter. Splitting these by hand in a desktop editor is slow and does not scale. The extract pdf pages api turns that chore into a single call: name the range, receive a new PDF that contains exactly those pages and nothing more.

How the call works

You POST to /pdf/extract-pages with your source document and a page range such as 12-18, or a set of individual pages. Because extraction of large files should never block your request thread, the endpoint is asynchronous: it validates the input and immediately returns a task_id. Our global edge does the actual page carving, and when the new PDF is ready we notify you — no busy-loop polling, no connection held open while a 300-page file is processed.

What comes back, and how

The result is a real PDF, not an image dump — text stays selectable, embedded fonts travel with it, and vector graphics remain crisp at any zoom. We deliver it in one of two ways: a signed webhook pushed to your endpoint the instant the task finishes, which is the recommended path for automation, or a signed link valid for 24 hours that you can fetch on your own schedule. After the retention window your file and its output are deleted, and nothing you send is ever used to train any model.

A note on the format

PDF has carried a page-based model since Adobe published it in 1993, and that structure is what makes clean extraction possible: each page is an independent object with its own content stream and resource dictionary. Pulling a range is therefore a matter of copying the right page objects and their resources into a new document, rather than re-rendering anything. That is why extracted pages look identical to the source — no re-compression, no quality loss, no reflowed text.

Fitting it into automation

Because every call is a stateless REST request that returns a task_id, the endpoint drops naturally into queues, batch jobs, and event-driven pipelines. Trigger an extraction when a document lands in storage, when a user clicks download-chapter, or as one step in a larger split-and-route flow. Billing is predictable at $0.002 per request, charged per page, and a task that fails after three retries is never billed — you get a clear error, not a silent charge.

Deliver a single chapter

A publishing platform lets readers buy or preview one chapter of a longer title. When a reader requests chapter 4, the backend extracts pages 88-104 into a new PDF and serves only that, without exposing the full book.

Split a contract packet

A legal-ops tool ingests signed agreement bundles and needs each appendix as its own file for the document management system. It calls the API once per range to break the packet into clean, separately archivable PDFs.

Separate invoices from a batch

An accounts team receives a monthly statement where every vendor invoice is a two-page span inside one PDF. An automated job extracts each pair of pages and routes them to the matching supplier record.

Trim reports for stakeholders

A analytics pipeline generates a 200-page master report, then extracts the three-page executive summary to email to leadership, while the full document goes to the archive.

How do I extract pages from a PDF with an API?

Send a POST request to /pdf/extract-pages with your source file and the page range you want, for example 5-9. The extract pdf pages api returns a task_id immediately and delivers the finished PDF by signed webhook or a signed link once it is ready.

Is there a free tier or free trial?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How much does it cost to extract PDF pages?

It is $0.002 per request, billed per page. The price is published and flat — there are no tokens, hidden credits, or surprise multipliers, and a task that fails after three retries is never charged.

Can I extract non-consecutive pages, like 1, 4 and 9?

Yes. You can request a continuous range such as 10-20 or a set of individual pages, and they are assembled into a single new PDF in the order you specify.

Does extracting pages reduce quality or lose text?

No. Pages are copied as native PDF objects, so text stays selectable, fonts remain embedded, and vector graphics keep full resolution. There is no re-rendering and no re-compression.

How do I extract pages from many PDFs in bulk?

Send one call per document; each returns its own task_id and processes independently, so you can fan out thousands of extractions in parallel through a queue. The async design means no single large file blocks the rest.

How long is the download link valid?

A signed link is valid for 24 hours. For automation we recommend the signed webhook instead, which pushes the result to your endpoint the moment the task completes.

What happens to my file after processing?

Your source and the extracted output are deleted after the retention window, and nothing you upload is ever used to train any model. Delivery links and webhooks are signed so only you can retrieve the result.

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-pages

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, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/pdf/extract-pages \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf":"https://ejemplo.com/documento.pdf"}'
{
  "pdf": "https://ejemplo.com/documento.pdf"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.extract_pages",
  "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_mb25
max_pages200
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.
413input_too_largeThe file exceeds the size limit.

Read the full KIT documentation →