PSPDFKit API is an HTTP API that enables you to extract text from images and convert scanned documents into searchable PDFs. Use the PDF OCR API to input your scanned documents and images and get an interactive PDF via a single API call.

Try It Out

This example will run English language OCR on your uploaded document, making any text in the document selectable and searchable.


Use Your Free Credits

Sign up to get 100 free credits, or log in to automatically add your API key to sample code.

Add a File

Add a scanned PDF named document.pdf to your project folder. You can also use our sample file.

Run a Command

Copy the curl command and run it in that same folder via the terminal or your editor’s terminal.

View the Results

Open result.pdf in your project folder to view the results.

    curl -X POST https://api.pspdfkit.com/build \
        -H "Authorization: Bearer your_api_key_here" \
        -o result.pdf \
        -F scanned=@document.pdf \
        -F instructions='{
            "parts": [
              { "file": "scanned" }
            "actions": [
              { "type": "ocr", "language": "english" }

Using Postman? Download our official collection and start using the API with a single click. Read more 

Your API Key