JPG to Excel API Documentation

The JPG to Excel API allows you to convert images containing tables into Excel Files. This documentation provides details on how to make requests to the API and the expected responses.

Base URL

The base URL for making API requests is:

https://www.imagetotext.info/api/jpg-to-excel

Authentication

To access the JPG to Excel API, you need to include an API key in the request header.

Header:

Authorization: Bearer YOUR_API_KEY

Replace 'YOUR_API_KEY' with your actual API key obtained from the service provider.

API Endpoints

1. Image File Upload

This endpoint allows you to directly upload an image file for conversion.

Send a POST request to the base URL with the following headers and form data:

Header: Content-Type: multipart/form-data Form Data: image: (file) The image file to be converted.

2. Image URL

This endpoint allows you to provide the URL of the image to be processed for text extraction.

Send a POST request to the base URL with the following headers and JSON body:

Header: Content-Type: application/json JSON Body: image_url: (string) The URL of the image to be converted.

3. Base64 Image Data

This endpoint allows you to provide the image data as a Base64-encoded string.

Send a POST request to the base URL with the following headers and JSON body:

Header: Content-Type: application/json JSON Body: base64: (string) The base64-encoded image data (including the data URI prefix).

Curl Request Example

Place YOUR_API_KEY with your original API Key

curl -X POST 'https://www.imagetotext.info/api/jpg-to-excel' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'base64=base64 data-URI encoded string'

Response Format

The API response will be in JSON format. The structure of the response depends on the success or failure of the request.

Success Response

{ "error": false, "result": "file URL" }
  • error: Indicates whether an error occurred (false for success).
  • result: The converted text or response message.

Error Response

{ "error": true, "message": "Authorization or Validation error" }
  • error: Indicates whether an error occurred (true for error).
  • message: A descriptive error message explaining the cause of the error.