Comprehensive text analysis API for pattern detection and NLP analysis with support for raw text, file uploads, and URL content extraction.
The Text Analysis API provides powerful text analysis capabilities through a simple REST interface. It combines pattern detection (emails, phone numbers, credit cards, etc.) with advanced NLP analysis powered by OpenAI technology.
Choose the right plan for your text analysis needs with flexible pricing options
https://text-analysis-api2.p.rapidapi.com
All API requests require authentication using RapidAPI headers:
{
'x-rapidapi-host': 'text-analysis-api2.p.rapidapi.com',
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY'
}
Endpoint: POST /v1/analyze/text
Description: Analyze raw text input for patterns and perform NLP analysis.
curl --request POST \
--url https://text-analysis-api2.p.rapidapi.com/v1/analyze/text \
--header 'content-type: application/json' \
--header 'x-rapidapi-host: text-analysis-api2.p.rapidapi.com' \
--header 'x-rapidapi-key: RAPIDAPI_KEY' \
--data '{
"text": "Hello! Contact me at [email protected] or call +1 (555) 123-4567. My website is https://example.com and I work at Example Corp located in New York."
}'
Endpoint: POST /v1/analyze/upload
Description: Upload and analyze a file (PDF, DOCX, TXT, HTML).
curl --request POST \
--url https://text-analysis-api2.p.rapidapi.com/v1/analyze/upload \
--header 'content-type: multipart/form-data' \
--header 'x-rapidapi-host: text-analysis-api2.p.rapidapi.com' \
--header 'x-rapidapi-key: RAPIDAPI_KEY' \
--form 'file=@/path/to/your/document.pdf'
{
"success": true,
"analyzed_at": "2025-05-04T08:20:53.933Z",
"detections": {
"languages": [
{
"value": "English"
}
],
"entities": {
"people": [
{
"value": "John Smith"
},
{
"value": "Maria Garcia"
}
],
"organizations": [
{
"value": "TechCorp"
}
],
"locations": [
{
"value": "San Francisco"
},
{
"value": "New York"
}
]
},
"topics": [
{
"value": "Contact Information"
},
{
"value": "Technical Information"
}
],
"categories": [
{
"value": "business"
},
{
"value": "technical"
}
],
"keywords": [
{
"value": "contact"
},
{
"value": "location"
}
],
"patterns": {
"email": [
{
"value": "[email protected]",
"index": 20,
"length": 19
}
],
"phone": [
{
"value": "+1 (555) 123-4567",
"index": 50,
"length": 17
}
],
"url": [
{
"value": "https://example.com",
"index": 86,
"length": 19
}
]
}
},
"count": 12
}
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
429 | Too Many Requests |
500 | Internal Server Error |
The Text Analysis API can detect a wide range of patterns including email addresses, phone numbers, URLs, IP addresses, dates, credit card numbers, social security numbers, GPS coordinates, and more. The API combines pattern matching with NLP capabilities to provide comprehensive text analysis.
The API supports multiple file formats for analysis, including PDF, DOCX, TXT, and HTML files. When you upload a file, the API will automatically extract the text content and perform the requested analysis. File size limitations may apply depending on your subscription plan.
The entity recognition capabilities are powered by advanced NLP models including OpenAI technology. While accuracy varies depending on context, the API typically achieves over 90% accuracy for identifying people, organizations, and locations in clearly written text. Results may vary for ambiguous content, specialized technical terminology, or uncommon names.
Yes, the Text Analysis API supports multiple languages for basic pattern detection. However, the depth and accuracy of NLP analysis (entity recognition, sentiment analysis, etc.) is highest for English content. The API can detect the language of the provided text and will return this information in the response.
The API offers several pricing tiers with different usage limits. The Basic free plan includes 10 requests per month. The Pro plan ($9.99/month) provides 100 requests per month, the Ultra plan ($79.99/month) allows 1,000 requests per month, and the Mega plan ($499.99/month) supports up to 10,000 requests per month. Choose the plan that best fits your expected usage volume. If you need higher limits or custom pricing, contact the API provider for enterprise solutions.