TextLens API
Text analysis in one API call. Readability, sentiment, keywords, SEO scoring.
curl -X POST https://api.ckmtools.dev/v1/analyze \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"text": "Your text here..."}'
What you get
8 Readability Formulas
Flesch, Flesch-Kincaid, Coleman-Liau, ARI, Gunning Fog, SMOG, Dale-Chall, Linsear Write.
Sentiment Analysis
Positive, negative, or neutral with confidence score.
Keyword Extraction
Top keywords ranked by TF and length weighting.
Keyword Density
Unigram, bigram, and trigram frequency analysis.
SEO Scoring
Composite score with actionable suggestions.
Fast
Sub-50ms response times. Pure algorithmic, no ML cold starts.
Code examples
curl -X POST https://api.ckmtools.dev/v1/analyze \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "The quick brown fox jumps over the lazy dog."}'
import requests
response = requests.post(
'https://api.ckmtools.dev/v1/analyze',
headers={'X-API-Key': 'your_api_key'},
json={'text': 'Your text here...'}
)
result = response.json()
print(f"Readability grade: {result['readability']['consensusGrade']}")
print(f"Sentiment: {result['sentiment']['label']}")
const response = await fetch('https://api.ckmtools.dev/v1/analyze', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: 'Your text here...' }),
});
const result = await response.json();
console.log(`Readability grade: ${result.readability.consensusGrade}`);
require 'net/http'
require 'json'
uri = URI('https://api.ckmtools.dev/v1/analyze')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri, 'X-API-Key' => 'your_api_key', 'Content-Type' => 'application/json')
req.body = { text: 'Your text here...' }.to_json
res = http.request(req)
puts JSON.parse(res.body)
Sample response
{
"statistics": {
"words": 156,
"sentences": 8,
"paragraphs": 3
},
"readability": {
"fleschReadingEase": { "score": 65.2, "grade": 8, "interpretation": "Standard" },
"consensusGrade": 8
},
"sentiment": {
"score": 0.23,
"label": "positive",
"confidence": 0.67
},
"keywords": [
{ "word": "analysis", "score": 4.2, "count": 3, "density": 1.92 }
],
"meta": {
"characters": 892,
"processing_time_ms": 12
}
}
Switching from a Python library? See textstat vs TextLens API →
Also comparing: TextBlob vs TextLens API
Also comparing: VADER vs TextLens API
Also comparing: spaCy vs TextLens API
Also comparing: NLTK vs TextLens API
Switching from AWS? TextLens API vs AWS Comprehend →
See all Python library comparisons →
Using Ruby? See Ruby-specific examples →
Using Go? See Go-specific examples →
Using Python? See Python-specific examples →
Using PHP? See PHP-specific examples →
Join the Waitlist
TextLens API is in development. Join the waitlist to get notified at launch — no charge, cancel any time.
Get Early Access$0 — no credit card required
Pricing
Get a Free API Key
Email [email protected] with subject "Free API Key" to receive your key (1,000 requests/month).
API reference
Analyze text content. Auth: X-API-Key header. Body: {"text": "...", "options": {"modules": [...]}}
Available modules: readability, sentiment, keywords, density, seo. Omit modules to run all.
Current month usage and remaining quota. Auth: X-API-Key header.
Service health status. No authentication required.
Error codes
| Code | Description |
|---|---|
| 400 | Invalid request body or missing text field |
| 401 | Missing or invalid API key |
| 429 | Rate limit exceeded |
| 500 | Internal server error |