GST Certificate OCR API
The GST Certificate OCR API allows users to extract GST registration certificate details automatically from uploaded certificate images or documents using OCR technology. It retrieves structured information such as GST number, business name, trade name, registration date, address, taxpayer type, and other available GST details quickly and accurately in JSON format.
API Details
Request URL
Request Body Parameters
| Type | Name | Optional | Description |
|---|---|---|---|
| File | file | Required | Upload the GST Certificate image. |
Request Header Parameters
| Type | Name | Value / Description | Optional |
|---|---|---|---|
| String | Content-Type | multipart/form-data | Required |
Sample Code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://g99.in/api/ocr/gstocr',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('file'=> new CURLFILE(' --Uploaded File Path-- ')),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://g99.in/api/ocr/gstocr"
payload = {}
files=[
('file',('Screenshot 2026-03-27 171219.png',open(' --Uploaded File Path-- ','rb'),'image/png'))
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://g99.in/api/ocr/gstocr");
var content = new MultipartFormDataContent();
content.Add(new StreamContent(File.OpenRead(" --Uploaded File Path-- ")), "file", " --Uploaded File Path-- ");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
HTTP status code 200
| Key | Type | Description |
|---|---|---|
| gstin | String | GST Identification Number of the registered business. |
| legalName | String | Official legal name of the business or entity. |
| tradeName | String | Trade or business name used publicly. |
| constitution | String | Type of business entity such as Proprietorship, Company, LLP, etc. |
| address | String | Registered business address mentioned in the GST certificate. |
| type | String | Category or type of GST registration. |
| registered | String | GST registration date of the business. |
| expiry | String | Expiry date of the GST registration, if available. |
| issued | String | Date on which the GST certificate was issued. |
| approvingAuthority | String | Authority or officer who approved the GST registration. |
| jurisdiction | String | GST jurisdiction area assigned to the business. |
| provisional | String | Provisional GST registration or provisional ID details. |
| pan | String | PAN number linked with the GST registration. |
| tin | String | Taxpayer Identification Number associated with the business. |
| slr | String | Serial or reference number available in the GST certificate. |
Sample Response
Sample response for valid document
{
"valid": true,
"message": null,
"data": {
"gstin": "12AABCD1111D1ZM",
"legalName": "Guru Infotek Kerala",
"tradeName": "Guru Infotek Kerala.",
"constitution": "Private Limited Company",
"address": "2nd Floor, 2nd cross street, kochi, Kerala",
"type": "Regular",
"registered": "30/03/2021",
"expiry": null,
"issued": "30/03/2021",
"approvingAuthority": "Kerala",
"jurisdiction": null,
"provisional": true,
"pan": "ABCDS1111D",
"tin": "125xxxxxx016v",
"slr": "125xxxxxxx16c"
}
}
Error Response
| Parameter | Type | Description |
|---|---|---|
| status | Number | Unique error codes for different errors. Always available. |
| message | String | Error message describing the error. Always Available. |
| error | Boolean | True / False for different errors. Always available. |
Error Codes
| HTTP Status | Error Code | Error Message |
|---|---|---|
| 400 | 4001 | Malformed data or missing required parameter values. |
| 400 | 4002 | File size exceeds 10MB limit. |
| 400 | 4003 | Only JPEG and PNG images are supported. |
| 400 | 4004 | Invalid or corrupted image. |
| 400 | 4005 | Minimum image size should be 200 X 200 pixels. |
| 500 | 5001 | Document processing service is currently unavailable. Please try again later. |
Sample Error Response
{
"message": "Invalid or corrupted image.",
"status": 4004,
"error": True
}
Constraints
-
Only JPEG, PNG images are supported.
-
Minimum image size is 200x200 png for better identification and parsing.
-
Maximum allowed image size is 10 MB.