Introduction
Welcome to the OCR Text Extraction API, your ultimate solution for extracting text from images. This documentation provides a detailed guide on API usage, endpoints, input parameters, and expected responses.
API Base URL: https://ocr-text-extraction-with-handwriting-detection.p.rapidapi.com
Endpoint
POST /extract-text
Description
The extract-text endpoint processes input images, extracting text content with options for general text extraction and handwriting recognition…
Request Format
{
"ocr_type": "detect_text",
"url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/Povray_hello_world.png"
}
Headers
X-RapidAPI-Key (string, required): The API key for authorization.
X-RapidAPI-Host (string, required): The host address for the RapidAPI service.
Response Format
{
"detected_text": "Extracted text here",
"language_code": "en"
}
Validations
Code Snippet (python)
import requests
url = “https://ocr-text-extraction-with-handwriting-detection.p.rapidapi.com/extract-text”
params = {“ocr_type”:“detect_text”,“url”:“https://upload.wikimedia.org/wikipedia/commons/5/5a/Povray_hello_world.png”}
headers = {
“X-RapidAPI-Key”: “”,
“X-RapidAPI-Host”: “”
}
files = { “file”: open(‘image.png’, ‘rb’) }
response = requests.post(url, headers=headers, params=params,files=files)