AI Textraction

FREEMIUM
Official
Official
Verified
By TextractionAI | Updated 18 days ago | Text Analysis
Popularity

9.8 / 10

Latency

409ms

Service Level

100%

Health Check

100%

Back to All Tutorials (1)

Textraction 101

Introduction
This quick tutorial will show you how to easily extract custom entities from free text using Textraction.ai with a simple HTTP request. I’ll walk you through a practical real estate listing example with Python, but you can use this tool with your own inputs and favorite programming language.

What is Textraction?
Textraction is a state-of-the-art AI model that can process unstructured text to extract custom entities. This service can be used to extract exact values (examples: prices, dates, names, emails, phone numbers), semantic answers (examples: main topic, diagnosis, summary), and much more. It’s a flexible tool limited only by your imagination.

Step 0: A Quick Demo
Let’s start from the end and quickly play with the API to see if it suits your needs.

  1. Open the Textraction Website and click on “Create New”.

  2. Enter your own input text, for example:

“For sale: Beautiful 3-bedroom, 2-bathroom house with a spacious backyard. Open concept living space with 1500 square feet. Asking price: $350,000.”

  1. Enter your own input entities, for example:

[
{“description”: “number of bedrooms”, “type”: “integer”, “var_name”: “num_bedrooms”},
{“description”: “square footage”, “type”: “integer”, “var_name”: “sq_footage”},
{“description”: “asking price”, “type”: “float”, “var_name”: “asking_price”}
]

  1. Press “Extract” and see the output values magically fill for you. In our example:

{“num_bedrooms”: 3, “sq_footage”: 1500, “asking_price”: 350000}

It is recommended to do some trial and error and see what descriptions produce the results that best match your requirements. You can review the examples on the website to get further inspiration for possible entities and formats.

If you like the results and want to proceed with integrating Textraction into your application, proceed to the next steps.

Step 1: Sign Up on the RapidAPI Platform
The API is made available via the RapidAPI platform which allows an easy access for many APIs. After signing up, you’ll automatically get your own API key. Sign up here

Step 2: A Python Example
Go to the Textraction RapidAPI listing. On the right, under code snippets, choose your favorite programming language. In this example we’ll use Python->Requests. An example snippet will will be automatically generated for you, just change it to your own inputs. In our example case:

import requests
url = "https://ai-textraction.p.rapidapi.com/textraction"
payload = {
“text”: “For sale: Beautiful 3-bedroom, 2-bathroom house with a spacious backyard. Open concept living space with 1500 square feet. Asking price: $350,000.”,
“entities”: [
{
“description”: “number of bedrooms”,
“type”: “integer”,
“var_name”: “num_bedrooms”
},
{
“description”: “square footage”,
“type”: “integer”,
“var_name”: “sq_footage”
},
{
“description”: “asking price”,
“type”: “float”,
“var_name”: “asking_price”
}
]
}
headers = {
“content-type”: “application/json”,
“X-RapidAPI-Key”: “YOUR_RAPIDAPI_KEY”,
“X-RapidAPI-Host”: “ai-textraction.p.rapidapi.com
}
response = requests.post(url, json=payload, headers=headers)

The API provides a freemium limited to 50 requests per month. If needed, go to the pricing page and purchase a plan that suits your needs, starting at 15$ a month.

See more detailed explanations, as well as usage tips, in the about page.

Good luck!