NLP Cloud API

⭐ Beginner's Pick Machine Learning / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

NLP Cloud is an API that provides a wide range of natural language processing features including named entity recognition, sentiment analysis, text classification, and summarization using state-of-the-art models like spaCy and Hugging Face transformers. You send text to a model endpoint and receive structured NLP analysis results. It removes the need to host ML models yourself, making advanced NLP accessible with just a few lines of code.

💡

Beginner Tip

Start with the sentiment analysis endpoint as it is the simplest to understand—you send text and get back a positive/negative/neutral label with a score. The free tier includes 10,000 API calls per month to experiment with different models.

Available Data

NLP Cloud data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from NLP Cloud",
    "description": "NLP API using spaCy and transformers for NER, sentiments, classification, summarization, and more",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

scored_labels List of sentiment labels with their confidence scores.
scored_labels[].label Sentiment category (e.g., 'POSITIVE', 'NEGATIVE', 'NEUTRAL').
scored_labels[].score Confidence score from 0 to 1 for this sentiment label.
entities For NER endpoints, list of named entities found in the text (e.g., people, places, organizations).
entities[].type Entity type label such as PERSON, ORG, GPE (geopolitical entity), or DATE.

Implementation Example

const url = "https://nlpcloud.io/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "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 Missing or malformed Authorization header—must use 'Token' prefix not 'Bearer'
Set the Authorization header to 'Token YOUR_API_KEY' (with capital T) as shown in the NLP Cloud docs, not 'Bearer YOUR_API_KEY'.
404 Not Found: model not found The model name in the URL path is incorrect or not available in your plan
Check the NLP Cloud model list in the documentation and ensure you are using a model name available in your subscription tier.
413 Request Entity Too Large Input text exceeds the maximum character limit for the selected model
Split long texts into smaller chunks (typically under 5,000 characters) and process them in separate API calls, then combine results.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 0/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Machine Learning
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →