दस्तावेज़ फ़ील्ड का स्वचालित पता लगाना

हमारे विश्लेषक अपलोड किए गए दस्तावेज़ों से अद्वितीय फ़ील्ड मानों को बुद्धिमानी से पहचानते हैं और स्वचालित रूप से पता लगाते हैं।

दस्तावेज़ भाषा पहचान

स्कैन किए गए या मुद्रित दस्तावेज़ों, छवियों और पीडीएफ फाइलों की भाषा का पता लगाएं।

ऑप्टिकल कैरेक्टर रिकग्निशन (ओसीआर)

छवियों और पीडीएफ फाइलों सहित स्कैन किए गए या मुद्रित दस्तावेजों को मशीन-पठनीय पाठ में बदलें।

एकीकरण और स्वचालन

हमारे दस्तावेज़ विश्लेषकों को मौजूदा सॉफ़्टवेयर सिस्टम या कार्य प्रक्रियाओं में एकीकृत किया जा सकता है।

ऑप्टिकल कैरेक्टर रिकग्निशन (ओसीआर) एपीआई

Parse Documents सभी दस्तावेज़ विश्लेषण आवश्यकताओं को पूरा करने के लिए डिज़ाइन किया गया एपीआई का एक मजबूत सेट है। हमारा लक्ष्य दस्तावेज़ों को प्रबंधित करने की जटिल प्रक्रिया को सरल बनाना है, चाहे वह खोज करना हो, विश्लेषण करना हो या त्रुटियों को संभालना हो। इनमें आसान पेज सॉर्टिंग, समर्थित दस्तावेज़ प्रकारों की एक विस्तृत श्रृंखला और संपूर्ण त्रुटि रिपोर्टिंग शामिल है।

बहुमुखी प्रतिभा और लचीलापन

हमारे विभिन्न एपीआई का उपयोग करके, आप न केवल अपलोड किए गए दस्तावेज़ों को पढ़ सकते हैं, बल्कि सीधे अपलोड या बाहरी लिंक द्वारा विश्लेषण के लिए दस्तावेज़ों को कतारबद्ध भी कर सकते हैं। हमारे एपीआई को व्यवसाय की गतिशील प्रकृति को ध्यान में रखकर डिज़ाइन किया गया है, जो उन्हें विभिन्न प्रकार की व्यावसायिक आवश्यकताओं और कॉन्फ़िगरेशन को सहजता से समायोजित करने की अनुमति देता है।

स्वैगर विन्यास

एपीआई को ओपनएपीआई विशिष्टता (ओएएस) के अनुसार कोडित किया जाता है, जिससे एकीकरण प्रक्रिया परेशानी मुक्त और सरल हो जाती है। हम स्वैगर उपयोगकर्ता इंटरफ़ेस पर आधारित व्यापक दस्तावेज़ीकरण प्रदान करते हैं जो संभावित प्रतिक्रियाओं और संभावित स्थिति और त्रुटि कोड का विवरण देता है।

आपकी सुरक्षा हमारी प्राथमिकता है

अधिकतम सुरक्षा के लिए सभी एपीआई अनुरोधों को जेडब्ल्यूटी हेडर का उपयोग करके प्रमाणित किया जाता है। यह सुनिश्चित करता है कि आपका संवेदनशील दस्तावेज़ डेटा हमेशा सुरक्षित रहेगा।

आएँ शुरू करें

हम आपको अपने साथ पाकर उत्साहित हैं और यह देखने के लिए इंतजार नहीं कर सकते कि आप अपने दस्तावेज़ प्रबंधन कार्यों में Parse Documents को कैसे एकीकृत करते हैं और उसके लाभों को अधिकतम करते हैं!

"YourAuthTokenHere" को वास्तविक वाहक टोकन से बदलना सुनिश्चित करें।
OCR Document via URL
POST /v1/documents/ocr/url

A POST method that performs Optical Character Recognition (OCR) on a document using its URL.

Example Request
POST /v1/documents/ocr/url HTTP/1.1
Content-Type: application/json
Authorization: Bearer YourAuthTokenHere

{
    "filename": "sample.pdf",
    "url": "https://example.com/sample.pdf"
}
Request Headers
  • Content-Type: application/json
  • Authorization: Bearer YourAuthTokenHere
Request Body

The request body should be a JSON object with the following properties:

  • filename (optional): The identification of the file (filename).
  • url: The URL of the document to download and parse.
  • password (optional): Password of encrypted file.
Responses
  • 200 Success: Returns the OCR text of the document.
  • 404 Not Found: The requested document is not found.
  • 400 Bad Request: The request was made incorrectly.
import requests
import json

def ocr_document_by_url():
    try:
        headers = {
            "Authorization": "Bearer YourAuthTokenHere"
        }

        url = "https://.parsedocument.com/v1/documents/ocr/url"

        payload = {
            "filename": "sample.pdf",
            "url": "https://example.com/sample.pdf",
            "password": "YourPasswordHere"
        }

        response = requests.post(url, data=json.dumps(payload), headers=headers)
        response.raise_for_status()

        responseBody = response.text

        print(responseBody)
    except requests.exceptions.HTTPError as e:
        print(f"Error: {e}")

ocr_document_by_url()
package main

import (
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
    "strings"
)

func main() {
    ocrDocumentByUrl()
}

func ocrDocumentByUrl() {
    client := &http.Client{}

    reqBody := strings.NewReader(`{
        "filename": "sample.pdf",
        "url": "https://example.com/sample.pdf",
        "password": "YourPasswordHere"
    }`)

    req, err := http.NewRequest("POST", "https://.parsedocument.com/v1/documents/ocr/url", reqBody)
    if err != nil {
        log.Fatalln(err)
    }

    req.Header.Add("Authorization", "Bearer YourAuthTokenHere")
    req.Header.Add("Content-Type", "application/json")

    resp, err := client.Do(req)
    if err != nil {
        log.Fatalln(err)
    }
    defer resp.Body.Close()

    bodyBytes, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        log.Fatalln(err)
    }

    bodyString := string(bodyBytes)
    fmt.Println(bodyString)
}
<?php

function ocrDocumentByUrl() {
    try {
        $baseUrl = ".parsedocument.com";
        $token = "YourAuthTokenHere";

        $url = "https://{$baseUrl}/v1/documents/ocr/url";

        $headers = array(
            "Content-Type: application/json",
            "Authorization: Bearer {$token}"
        );

        $payload = array(
            "filename" => "sample.pdf",
            "url" => "https://example.com/sample.pdf",
            "password" => "YourPasswordHere"
        );

        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        curl_close($ch);

        if ($httpCode === 200) {
            echo $response;
        } else {
            echo "Error: {$response}";
        }
    } catch (Exception $e) {
        echo "Error: {$e->getMessage()}";
    }
}

ocrDocumentByUrl();
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;

class Program
{
    private static readonly HttpClient client = new HttpClient();

    static void Main(string[] args)
    {
        OcrDocumentByUrl().Wait();
    }

    private static async Task OcrDocumentByUrl()
    {
        try
        {
            client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YourAuthTokenHere");

            var requestUri = new UriBuilder("https://.parsedocument.com/v1/documents/ocr/url");

            var requestBody = new
            {
                filename = "sample.pdf",
                url = "https://example.com/sample.pdf",
                password = "YourPasswordHere"
            };
            var jsonBody = JsonConvert.SerializeObject(requestBody);

            var response = await client.PostAsync(requestUri.ToString(), new StringContent(jsonBody, System.Text.Encoding.UTF8, "application/json"));
            response.EnsureSuccessStatusCode();

            string responseBody = await response.Content.ReadAsStringAsync();

            Console.WriteLine(responseBody);
        }
        catch (HttpRequestException e)
        {
            Console.WriteLine($"Error: {e.Message}");
        }
    }
}

In this code, we define a simple program with a single method `OcrDocumentByUrl`.

This method first sets up the authentication header by adding the bearer token to the HttpClient's default headers.

Then, it constructs the request URL using a `System.Net.UriBuilder`.

It creates an anonymous object `requestBody` with the desired request parameters and converts it to a JSON string using Newtonsoft.Json.JsonConvert.SerializeObject method.

Finally, it sends a POST request to the API by passing the request URL, request body as a `StringContent` and the "application/json" media type to the `PostAsync` method of the HttpClient.

If the request fails for any reason, an HttpRequestException will be thrown and the method will catch it and print the error message to the console.

If the request is successful, the method will read the response body as a string and print it to the console.

Request Body:

  • filename (optional): The identification of the file (filename).
  • url: The URL of the document to download and parse.
  • password (optional): Password of encrypted file.
OCR Document via Base64 Encoded Binary Representation
POST /v1/documents/ocr/base64

A POST method that performs Optical Character Recognition (OCR) on a document using a base64 encoded binary representation of the document. The results will be returned as a string.

Example Request
POST /v1/documents/ocr/base64
Request Headers
  • Content-Type: application/json
  • Authorization: Bearer YourAuthTokenHere
Query Parameters
  • filename (optional): The identification of the file (filename).
  • password (optional): Password of encrypted file.
Request Body
"Base64EncodedBinaryRepresentationOfTheDocument"
                
import requests
import base64

def ocr_document():
    url = "https://.parsedocument.com/v1/documents/ocr/base64"
    headers = {"Authorization": "Bearer [API_KEY]"}
    params = {
        "filename": "document.pdf",
        "password": "secretpassword"
    }
    with open("document.pdf", "rb") as file:
        file_data = file.read()
        encoded_data = base64.b64encode(file_data).decode("utf-8")
        payload = {"base64": encoded_data}

        response = requests.post(url, headers=headers, params=params, json=payload)
        response.raise_for_status()

        print(response.text)

ocr_document()
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "net/url"
    "strings"
)

func main() {
    ocrDocument()
}

func ocrDocument() {
    baseURL := "https://.parsedocument.com/v1/documents/ocr/base64"
    apiKey := "[API_KEY]"
    filename := "document.pdf"
    password := "secretpassword"

    fileData, err := ioutil.ReadFile(filename)
    if err != nil {
        fmt.Println("Error reading file:", err)
        return
    }

    encodedData := base64.StdEncoding.EncodeToString(fileData)

    params := url.Values{}
    params.Set("filename", filename)
    params.Set("password", password)

    payload := strings.NewReader(fmt.Sprintf(`{"base64": "%s"}`, encodedData))

    client := &http.Client{}
    req, err := http.NewRequest("POST", baseURL, payload)
    if err != nil {
        fmt.Println("Error creating request:", err)
        return
    }

    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.URL.RawQuery = params.Encode()

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Error making request:", err)
        return
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println("Error reading response:", err)
        return
    }

    fmt.Println(string(body))
}
<?php

function ocrDocument() {
    $baseUrl = "https://.parsedocument.com/v1/documents/ocr/base64";
    $apiKey = "[API_KEY]";
    $filename = "document.pdf";
    $password = "secretpassword";

    $fileData = file_get_contents($filename);
    $encodedData = base64_encode($fileData);

    $params = array(
        "filename" => $filename,
        "password" => $password
    );

    $query = http_build_query($params);
    $url = $baseUrl . '?' . $query;

    $headers = array(
        "Authorization: Bearer " . $apiKey,
        "Content-Type: application/json"
    );

    $payload = json_encode(array("base64" => $encodedData));

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);

    if ($response === false) {
        echo "Error: " . curl_error($ch);
    } else {
        echo $response;
    }

    curl_close($ch);
}

ocrDocument();
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    private static readonly HttpClient client = new HttpClient();

    static void Main(string[] args)
    {
        OcrDocument().Wait();
    }

    private static async Task OcrDocument()
    {
        try
        {
            client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "[API_KEY]");

            var queryParams = new System.Collections.Specialized.NameValueCollection
            {
                { "filename", "document.pdf" },
                { "password", "secretpassword" }
            };

            var query = new System.Net.Http.FormUrlEncodedContent(queryParams);

            using (var fileStream = new System.IO.FileStream("document.pdf", System.IO.FileMode.Open))
            using (var content = new System.Net.Http.StreamContent(fileStream))
            {
                content.Headers.Add("Content-Type", "application/pdf");

                var response = await client.PostAsync("https://.parsedocument.com/v1/documents/ocr/base64" + query.ReadAsStringAsync().Result, content);
                response.EnsureSuccessStatusCode();

                string responseBody = await response.Content.ReadAsStringAsync();

                Console.WriteLine(responseBody);
            }
        }
        catch (HttpRequestException e)
        {
            Console.WriteLine($"Error: {e.Message}");
        }
    }
}

In this code, we define a simple program with a single method `OcrDocument`.

This method first sets up the authentication header by adding the bearer token to the HttpClient's default headers.

Then, it constructs the query parameters using a `System.Collections.Specialized.NameValueCollection` object.

It converts the query parameters to a `System.Net.Http.FormUrlEncodedContent` object and appends it to the request URL.

The method also constructs the request body as a string and creates a `System.Net.Http.StringContent` object with UTF8 encoding and "application/json" media type.

If the request fails for any reason, an HttpRequestException will be thrown and the method will catch it and print the error message to the console.

If the request is successful, the method will read the response body as a string and print it to the console.

Query Parameters:

  • filename (optional): The identification of the file (filename).
  • password (optional): Password of encrypted file.

Parse Documents

अपनी दस्तावेज़ प्रसंस्करण प्रक्रिया को एक उन्नत, एआई-संचालित डेटा निष्कर्षण प्रणाली के साथ बदलें जो आपको बेहतर निर्णय लेने में मदद करती है।