Skip to content

APIs

Amazon Comprehend

In shortAWS's pre-trained NLP API that extracts entities, key phrases, sentiment, language and personal data from text, with a confidence score for each result.

Updated 24 Oct 2026· 2 min read

Amazon Comprehend is the managed natural language processing service from Amazon Web Services (AWS). You send it text and it returns structured data: the entities mentioned, key phrases, sentiment, the dominant language, personal information and syntax. On MLforSEO it is one of the three purpose-built NLP APIs, alongside the Google Natural Language API and IBM Watson NLU, that we compare against generative chatbots for text analysis.

How it works

Comprehend bundles several pre-trained models behind one service, and each task is its own API operation. Entity detection labels names with a type from a fixed list (such as PERSON, ORGANIZATION, LOCATION, COMMERCIAL_ITEM, EVENT, DATE, QUANTITY and TITLE) and gives every entity a confidence score and its character position in the text. Separate operations handle key phrases, document-level sentiment, targeted (entity-level) sentiment, language detection and PII (personally identifiable information) detection. You can call it from the AWS console demo for a single text, from the SDKs for a script, or as asynchronous batch jobs for large volumes. If the standard entity types do not fit your domain, you can train custom classifiers and custom entity recognisers on your own labelled data.

One design choice matters for SEOs. Concepts that Google’s API labels as entities of type OTHER (machine learning, marketing, big tech) are treated by Comprehend as key phrases, a separate module. So a fair comparison runs both modules.

How it’s used in SEO and marketing

  • Entity extraction from page copy for content audits and internal linking.
  • Key-phrase extraction from reviews, forums or support tickets to find the language customers use.
  • Sentiment and entity-level sentiment for review and social comment analysis.
  • PII detection to strip names, emails or phone numbers before customer text is shared with other tools.
  • Language detection when auditing multilingual sites or mixed-language user content.

Example

In the MLforSEO benchmark of NLP APIs and generative AI, the same 221-word bio was run through each tool. Comprehend returned 21 entity rows (15 unique) across five types and found 12 of the 13 core named entities. It missed “Women in Marketing – Bulgaria” as an organisation, returning “Bulgaria” as a location instead, and typed MLforSEO as a TITLE, a type Amazon reserves for creative works. Most confidence scores were above 0.9. Running the key-phrase module on the same text added more than 50 further phrases, which explains much of the gap in raw counts against Google.

Limitations and things to watch

  • No salience score and no knowledge-base link, so you cannot rank entities by importance or check which real-world thing a name resolves to.
  • A high confidence score is the model’s certainty, not proof the type is right (the TITLE error above came with high confidence).
  • Billing is per 100-character unit with a three-unit minimum per request, so many very short texts (such as queries) cost more than their length suggests. Check the current pricing page before budgeting.
  • Feature and language support differ between operations, so confirm your language is covered for each module you plan to use.
  • Like every sentiment API, its labels need a human review step: an independent test cited on MLforSEO found each major API matched human labels only around 67 to 72% of the time.

Learn it on MLforSEO

Where Amazon Comprehend shows up on MLforSEO

Sources and further reading

Other terms from APIs

See all 15 APIs terms →