Semantria API

Text Analysis / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

Semantria is a powerful text analytics API by Lexalytics that provides sentiment analysis, entity extraction, and content categorization. It processes documents and returns structured insights about the emotional tone and key topics in your text. Businesses use it to analyze customer feedback, social media posts, and support tickets at scale.

💡

Beginner Tip

Semantria uses a queue-based model: you first submit documents, then poll for results after a few seconds. Start with the sandbox environment to understand the async workflow before going to production.

Available Data

Semantria data via REST API
JSON-formatted response data
Requires OAuth authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Semantria",
    "description": "Text Analytics with sentiment analysis, categorization & named entity extraction",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

id The unique identifier you provided when submitting the document
sentiment_score Numeric sentiment score ranging from -1.0 (negative) to 1.0 (positive)
sentiment_polarity Human-readable sentiment label: "positive", "negative", or "neutral"
entities List of named entities (people, places, organizations) detected in the text
themes Key topics and themes extracted from the document content
categories Content categories assigned to the document based on its subject matter

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://semantria.readme.io/docs";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Invalid or missing OAuth credentials in the request header
Generate a valid OAuth 1.0a signature using your consumer key and secret from the Lexalytics dashboard
Empty results after polling Documents are still being processed when you check for results
Wait at least 2-5 seconds after submission before polling; implement a retry loop with backoff
400 Bad Request on document submission Document ID is not unique or the text field is empty
Ensure each document has a unique "id" field and a non-empty "text" field in the request array

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Text Analysis
Difficulty Advanced
Verified: 2026-04-07

Similar APIs

View All →