This guide offers a detailed walkthrough on utilizing the Extracta.ai API to pull information from documents.
Step 1: Environment Configuration
Before starting, make sure you have a REST client like Postman at hand, or configure your coding environment for making HTTP requests in the language of your choice.
Step 2: Gaining API Access
- Sign up or sign in on the RapidAPI platform.
- Opt into the Extracta.ai API subscription.
Step 3: Request Preparation
- Select the document from which you wish to extract information.
- Formulate the
extractionDetails
JSON object including essential attributes (name
, language
, fields
).
- Encode your document into a
base64String
or ensure its URL is accessible if it’s stored online.
Step 4: Executing the API Request
Example request body:
{
"extractionDetails": {
"name": "Name of Extraction",
"language": "English",
"fields": [
{
"key": "name",
"description": "Name of the person",
"example": "John Doe"
}
// Insert additional fields as needed
]
},
"file": "Your Document as base64String or URL"
}
Step 5: Response Management
- Upon successful data extraction, the API will send back the data in a structured JSON format.
- Should there be any issues (for instance, incorrect language or incomplete fields), an error notification will be provided.
Step 6: Post-Extraction Processing (Optional)
- After obtaining the data, you may incorporate it into your application or leverage it for further analysis.
Additional Recommendations
- Experiment with various types of documents to gauge the API’s adaptability to different formats.
- Check the ‘Supported Languages’ list to verify your language choice is supported.