Amazon Comprehend API

Extract entities, sentiment, key phrases, language, and PII from text using AWS-managed NLP models, with support for custom classifiers and entity recognizers.

Evaluated Mar 06, 2026 (0d ago) vcurrent
Homepage ↗ Repo ↗ AI & Machine Learning aws boto3 nlp sentiment entity-recognition text-analysis pii classification
⚙ Agent Friendliness
61
/ 100
Can an agent use this?
🔒 Security
92
/ 100
Is it safe for agents?
⚡ Reliability
86
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
87
Error Messages
82
Auth Simplicity
74
Rate Limits
80

🔒 Security

TLS Enforcement
100
Auth Strength
92
Scope Granularity
89
Dep. Hygiene
88
Secret Handling
89

IAM action-level policies. KMS encryption for custom model training data and async job output in S3. VPC endpoints available. Comprehend does not retain submitted text after processing. HIPAA eligible for Protected Health Information use cases.

⚡ Reliability

Uptime/SLA
88
Version Stability
87
Breaking Changes
88
Error Recovery
83
AF Security Reliability

Best When

You need scalable, cost-effective NLP primitives (sentiment, entities, PII, classification) tightly integrated with AWS IAM, S3, and batch pipelines without managing ML infrastructure.

Avoid When

Your use case requires generative responses, complex reasoning over text, or accuracy levels that only large foundation models can achieve.

Use Cases

  • Classify incoming support tickets or emails by topic using a custom document classifier trained on historical data
  • Detect and redact PII (names, SSNs, credit card numbers) from user-submitted documents before storing them
  • Analyze customer review sentiment at scale by batching DetectSentiment calls across thousands of reviews
  • Extract named entities (organizations, locations, dates, quantities) from news articles or contracts for downstream indexing
  • Identify the dominant language of multilingual user content before routing to the appropriate processing pipeline

Not For

  • Real-time conversational NLP requiring sub-100ms latency — inference latency is in the hundreds of milliseconds
  • Tasks requiring deep semantic understanding, summarization, or generative text — use Amazon Bedrock instead
  • Highly specialized domain entity extraction where a fine-tuned LLM would outperform a custom Comprehend recognizer

Interface

REST API
Yes
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: aws_iam
OAuth: No Scopes: Yes

AWS SigV4 via IAM roles or access key credentials. IAM policies control individual actions such as comprehend:DetectSentiment, comprehend:BatchDetectEntities, comprehend:CreateDocumentClassifier. Async jobs require IAM role with S3 read/write permissions.

Pricing

Model: pay-as-you-go
Free tier: Yes
Requires CC: Yes

Pricing is per 100 characters with a 300-character minimum per API call. Custom classifier training and endpoint hosting add separate costs. Comprehend Medical is priced separately.

Agent Metadata

Pagination
page_token
Idempotent
Partial
Retry Guidance
Documented

Known Gotchas

  • Text input has a hard limit of 5,000 bytes (not characters) per real-time API call; agents must chunk longer documents before submitting, accounting for multi-byte UTF-8 characters
  • Async batch jobs write results to S3 in a non-deterministic subfolder path under the output prefix; agents must use ListDocumentClassificationJobs or the job response to find the exact output location
  • Custom classifier and entity recognizer endpoints must be explicitly started (CreateEndpoint) before real-time inference; the model ARN alone is insufficient and endpoints have hourly costs even when idle
  • DetectPiiEntities and ContainsPiiEntities are different APIs with different output formats; the former returns entity offsets while the latter returns only a boolean — mixing them up produces confusing results
  • Language must be specified explicitly for most APIs; Comprehend does not auto-detect language in the same call — call DetectDominantLanguage first if input language is unknown

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Amazon Comprehend API.

$99

Scores are editorial opinions as of 2026-03-06.

5173
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered