ohmywrap
Get an API key

§ Read and verify

PDF Info API

Returns the page count and byte size of a document. It parses the cross-reference table and page tree rather than the content streams, which makes it the cheapest call in the API — cheap enough to run on every upload before you commit to anything else.

Endpoint
POST /pdf/info
Inputs
Exactly 1 PDF
Returns
application/json
Limits
20 MB per file. Reads the trailer, not every page.
Price
$0.001

§ 01 The request

One POST, and the file comes back.

POST /pdf/info
curl -sS --fail-with-body \
  -H "Authorization: Bearer $OHMYWRAP_KEY" \
  -F "file=@contract.pdf" \
  https://api.ohmywrap.com/pdf/info

Options

None. Send the file and nothing else. An options object is still accepted, but any key inside it is 422 invalid_options.

Worth knowing

An encrypted document without a password is 422 password_required here too, which is a cheap way to find out a file is protected.

Your first /pdf/info call takes one line of curl.

Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.

10,000 calls for $10. No subscription, no expiry.