DEV Community

2x lazymac
2x lazymac

Posted on • Originally published at api.lazy-mac.com

How to Use the Text Analysis API — Free REST + MCP Server

Sentiment analysis, readability scoring, keyword extraction, language detection — all the NLP basics you need, in a single API. No ML models to host, no Python dependencies to manage.

Try It Right Now

curl -s -X POST https://api.lazy-mac.com/text-analysis/api/v1/sentiment \
  -H "Content-Type: application/json" \
  -d '{"text": "I love this API, it works great!"}' | jq
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "success": true,
  "data": {
    "score": 2.53,
    "comparative": 0.361,
    "label": "positive",
    "confidence": 1,
    "positive": ["love", "great"],
    "negative": [],
    "tokens": 7
  }
}
Enter fullscreen mode Exit fullscreen mode

All Endpoints

Endpoint Description
POST /api/v1/sentiment Sentiment score and label
POST /api/v1/readability Flesch-Kincaid, Gunning Fog, etc.
POST /api/v1/keywords Extract top keywords
POST /api/v1/language Detect language
POST /api/v1/stats Word count, sentences, paragraphs
POST /api/v1/analyze All of the above in one call

Full Analysis in One Call

curl -s -X POST https://api.lazy-mac.com/text-analysis/api/v1/analyze \
  -H "Content-Type: application/json" \
  -d '{"text": "Your blog post or article text here..."}' | jq
Enter fullscreen mode Exit fullscreen mode

Readability Check

curl -s -X POST https://api.lazy-mac.com/text-analysis/api/v1/readability \
  -H "Content-Type: application/json" \
  -d '{"text": "The quick brown fox jumps over the lazy dog. Simple sentences are easier to read."}' | jq
Enter fullscreen mode Exit fullscreen mode

Use as an MCP Server

{
  "mcpServers": {
    "text-analysis": {
      "url": "https://api.lazy-mac.com/text-analysis/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Ask Claude: "Analyze the sentiment and readability of this text"

Python Example — Content Quality Gate

import requests

text = open("blog_post.md").read()
analysis = requests.post(
    "https://api.lazy-mac.com/text-analysis/api/v1/analyze",
    json={"text": text}
).json()

readability = analysis["data"]["readability"]
if readability["fleschKincaid"]["gradeLevel"] > 12:
    print("Content too complex! Simplify for wider audience.")
Enter fullscreen mode Exit fullscreen mode

Pricing

Tier Requests/mo Price
Free 100 $0
Pro 10,000 $9/mo
Business Unlimited $49/mo

Get Pro Access on Gumroad →


Browse all 22 APIs at api.lazy-mac.com →

More from the lazymac API Toolkit:

Top comments (0)