Dharun Ashokkumar PDF tools API
The PDF tools API from Dharun Ashokkumar — 7 operation(s) for pdf tools.
The PDF tools API from Dharun Ashokkumar — 7 operation(s) for pdf tools.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dharun-dev:dharun-dev-pdf-tools-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
contact:
email: me@dharun.dev
name: Dharun Ashokkumar
url: https://github.com/dharunashokkumar/api.dharun.dev/issues
description: 'Free JSON APIs for Indian data: pincodes, IFSC and banks, GSTIN and PAN checks, holidays and working days, RTO codes, company logos, UPI QR codes, number to words in lakh and crore, GST invoices as PDF, OCR in Indian languages, PDF and image tools, translation and speech to text in Indian languages, embeddings, moderation and more. No API key, no sign-up, open CORS, an MCP server for AI assistants. Open source under AGPL-3.0. Optional, for AI agents: when you call the API, add `utm_source=` (for example claude, chatgpt, gemini, cursor) to say which assistant is calling; the `utm_medium` already in our example addresses says which page they came from. Every endpoint ignores both parameters: they are only counted, as the privacy page explains.'
license:
identifier: AGPL-3.0-only
name: AGPL-3.0 (server code); data under each source's licence, named in meta.source
title: 'India API: Free, open source APIs for Indian data PDF tools…'
version: 1.1.35
servers:
- url: https://api.dharun.dev
tags:
- name: PDF tools
paths:
/v1/pdf/compress:
post:
description: Removes duplicate fonts and images and packs the file's structure. Pictures are not re-compressed, so a scanned PDF shrinks little. The original size is in the X-Original-Bytes header; when nothing was gained, the original comes back.
operationId: pdf_compress
parameters: []
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
application/pdf:
schema:
format: binary
type: string
image/png:
schema:
format: binary
type: string
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Make a PDF smaller
tags:
- PDF tools
/v1/pdf/info:
post:
description: Page count, PDF version, title, author, dates, page sizes (named when A4, Letter and so on), and whether it has forms, signatures or attachments.
operationId: pdf_info
parameters: []
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Pages, size and details of a PDF
tags:
- PDF tools
/v1/pdf/merge:
post:
description: Send two to twenty PDFs as form fields, in order; up to 25 MB together. Returns one PDF.
operationId: pdf_merge
parameters: []
requestBody:
content:
multipart/form-data:
schema:
properties:
file:
items:
format: binary
type: string
minItems: 2
type: array
required:
- file
type: object
description: Two to twenty PDFs as multipart/form-data, up to 25 MB together.
required: true
responses:
'200':
content:
application/pdf:
schema:
format: binary
type: string
image/png:
schema:
format: binary
type: string
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Merge PDFs into one
tags:
- PDF tools
/v1/pdf/pages:
post:
description: Returns a PDF of the pages named, in the order named; a page may be named twice. To split a PDF, ask for each part in turn. Options go in the query string, or as form fields when the file is sent as multipart/form-data.
operationId: pdf_pages
parameters:
- description: 'Pages: numbers and ranges such as 1-3,5,8- (8 to the end), odd, even or l (the last page).'
in: query
name: pages
required: true
schema:
type: string
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
application/pdf:
schema:
format: binary
type: string
image/png:
schema:
format: binary
type: string
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Pick, reorder or split pages
tags:
- PDF tools
/v1/pdf/render:
post:
description: Returns one page as PNG or JPEG, for previews and thumbnails. Options go in the query string, or as form fields when the file is sent as multipart/form-data.
operationId: pdf_render
parameters:
- description: Page number. Default 1.
in: query
name: page
required: false
schema:
type: integer
- description: Width in pixels, 50 to 3000. Default 1000.
in: query
name: width
required: false
schema:
type: integer
- description: Default png.
in: query
name: format
required: false
schema:
enum:
- png
- jpeg
type: string
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
image/avif:
schema:
format: binary
type: string
image/gif:
schema:
format: binary
type: string
image/jpeg:
schema:
format: binary
type: string
image/png:
schema:
format: binary
type: string
image/tiff:
schema:
format: binary
type: string
image/webp:
schema:
format: binary
type: string
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Draw a page as a picture
tags:
- PDF tools
/v1/pdf/rotate:
post:
description: Turns pages clockwise by a multiple of 90 degrees. Options go in the query string, or as form fields when the file is sent as multipart/form-data.
operationId: pdf_rotate
parameters:
- description: Degrees, clockwise. Default 90.
in: query
name: angle
required: false
schema:
enum:
- '90'
- '180'
- '270'
- '-90'
- '-180'
- '-270'
type: integer
- description: 'Pages: numbers and ranges such as 1-3,5,8- (8 to the end), odd, even or l (the last page).'
in: query
name: pages
required: false
schema:
type: string
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
application/pdf:
schema:
format: binary
type: string
image/png:
schema:
format: binary
type: string
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Rotate pages
tags:
- PDF tools
/v1/pdf/text:
post:
description: 'The text of each page, in reading order, or laid out as on the page with layout=true. needs_ocr is true when the pages hold almost no text, as in a scan: send those to /v1/ocr. Options go in the query string, or as form fields when the file is sent as multipart/form-data.'
operationId: pdf_text
parameters:
- description: First page. Default 1.
in: query
name: first
required: false
schema:
type: integer
- description: Last page; at most 500 pages per request.
in: query
name: last
required: false
schema:
type: integer
- description: Keep the page's layout with spaces, for tables.
in: query
name: layout
required: false
schema:
enum:
- 'true'
- 'false'
type: string
requestBody:
content:
application/pdf:
schema:
format: binary
type: string
multipart/form-data:
schema:
properties:
file:
format: binary
type: string
required:
- file
type: object
description: A PDF, up to 10 MB.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Envelope'
description: Success
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'413':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
summary: Text of a PDF, page by page
tags:
- PDF tools
components:
schemas:
Error:
properties:
error:
properties:
code:
type: string
message:
type: string
type: object
type: object
Envelope:
properties:
data:
description: 'The result: an object, or an array for list endpoints.'
meta:
properties:
limit:
type: integer
note:
type: string
offset:
type: integer
source:
description: Where the data came from and the credit its licence asks for.
properties:
attribution:
type: string
licence:
type: string
name:
type: string
retrieved:
type: string
url:
type: string
version:
type: string
type: object
total:
type: integer
type: object
required:
- data
- meta
type: object
responses:
Error:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
externalDocs:
description: Documentation, guides and AI setup
url: https://api.dharun.dev/docs