OCR Text Extraction With Handwriting Detection

फ्रीमियम
द्वारा Vibhu Goel | अपडेट किया गया 1ヶ月前 | Visual Recognition
लोकप्रियता

8.1 / 10

लेटेंसी

3,685ms

सेवा का स्तर

100%

Health Check

N/A

रीडमी

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)

फॉलोवर: 0
API निर्माता:
Rapid account: Vibhu Goel
Vibhu Goel
vibhugoel001
API को रेट करने के लिए लॉग इन करें
रेटिंग: 5 - वोट: 1