OCR Text Extraction With Handwriting Detection

FREEMIUM
By Vibhu Goel | Updated 22 days ago | Visual Recognition
Popularity

8.1 / 10

Latency

3,897ms

Service Level

100%

Health Check

N/A

README

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"
}
  • ocr_type (string, required): Specify the OCR type, should be either “detect_text” or “detect_handwriting”. detect_text is for printed text and detect_handwriting is for handwritten text
  • url (string, optional): The URL of the image from which text needs to be extracted. Provide a valid URL starting with “http”. If this is not provided, the file parameter must be used.

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"
}
  • detected_text (string): Extracted text content from the image.
  • language_code (string): Language code of the detected text.

Validations

  • The ocr_type must be a string and should be either “detect_text” or “detect_handwriting”.
  • If using the url parameter, it should be a string starting with “http”.
  • file shoudl be an image
  • The API enforces a rate limit of 2 requests per second.

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)

Followers: 0
API Creator:
Rapid account: Vibhu Goel
Vibhu Goel
vibhugoel001
Log In to Rate API
Rating: 5 - Votes: 1