PDF OCR Search API

Start building for free today – no credit card required.

Search for specific text within scanned PDF documents using our intelligent OCR Search API. Locate words, phrases, or patterns in image-based PDFs with advanced text recognition. Ideal for document discovery, compliance checking, and automated content verification across digitized archives.


Benefits of our PDF OCR Search API

Instantly find specific information within scanned documents using our powerful OCR Search API. Search image-based PDFs for keywords, phrases, or regex patterns with high accuracy text recognition. Whether you're conducting compliance audits, locating specific clauses in contracts, or building document search systems, our API delivers precise results while handling scanned documents that would otherwise be unsearchable.

Read our API documentation to learn how to search text in scanned PDFs.

Multi-language Code Example

curl -X POST https://apdf.io/api/pdf/ocr/search \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d text="SEARCH_TEXT"
const data = new FormData();
data.append('file', 'FILE_URL');
data.append('text', 'SEARCH_TEXT');

fetch('https://apdf.io/api/pdf/ocr/search', {
    headers: {'Authorization': 'Bearer TOKEN'},
    method: 'POST',
    body: data
})
.then(response => response.json())
.then(json => console.log(json));
use GuzzleHttp\Client;

$client = new Client();
$response = $client->post(
    'https://apdf.io/api/pdf/ocr/search', [
    'headers' => [
        'Authorization' => 'Bearer TOKEN'
    ],
    'form_params' => [
        'file' => 'FILE_URL',
        'text' => 'SEARCH_TEXT'
    ]
]);

$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'

response = RestClient.post(
  'https://apdf.io/api/pdf/ocr/search',
  {
    'file' => 'FILE_URL',
    'text' => 'SEARCH_TEXT'
  },
  {
    Authorization: "Bearer TOKEN"
  }
)

puts response.body
import requests

response = requests.post(
    'https://apdf.io/api/pdf/ocr/search',
    headers = {
        'Authorization': 'Bearer TOKEN'
    },
    data = {
        'file': 'FILE_URL',
        'text': 'SEARCH_TEXT'
    }
)

print(response.text)
import (
  "fmt"
  "github.com/go-resty/resty/v2"
)

func main() {
  client := resty.New()
  data := map[string]string{
    "file": "FILE_URL",
    "text": "SEARCH_TEXT"
  }

  resp, _ := client.R().
    SetFormData(data).
    SetHeader("Authorization", "Bearer TOKEN").
    Post("https://apdf.io/api/pdf/ocr/search")

  fmt.Println(resp.String())
}
import okhttp3.*;

class Pdf {
  public static void main(String[] args) throws Exception {
    OkHttpClient client = new OkHttpClient();
    FormBody formBody = new FormBody.Builder()
      .add("file", "FILE_URL")
      .add("text", "SEARCH_TEXT")
      .build();

    Request request = new Request.Builder()
      .url("https://apdf.io/api/pdf/ocr/search")
      .addHeader("Authorization", "Bearer TOKEN")
      .post(formBody)
      .build();

    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}

No-Code OCR PDF Searching

Integrate our PDF API with Zapier Webhooks to automate your OCR search workflows effortlessly. Whether you're scanning scanned invoices for order numbers, searching contracts for specific terms, or verifying compliance across archived documents, you can trigger OCR search from hundreds of apps supported by Zapier. Automatically locate information within image-based PDFs, streamlining document processing and reducing manual review time.


Start using our API today — no trial needed!
Get Started for Free