Skip to content

APIs

Google Cloud Natural Language API (Google NLP API)

In shortGoogle Cloud's pre-trained NLP API for entity analysis, sentiment, syntax, text classification and content moderation, usable without training a model.

Updated 24 Oct 2026· 2 min read

The Google Cloud Natural Language API is a pre-trained natural language processing service on Google Cloud. You send it text (or HTML) and it returns structured analysis: entities, sentiment, grammatical structure, content categories and moderation flags. Because the models are already trained, it is one of the most beginner-friendly ways to bring machine learning into SEO work, and it runs from Google Sheets via Apps Script with no coding.

How it works

The API has separate methods (modules), each returning its own fields:

  • Entity analysis: entities with type, salience, number of mentions and metadata such as a Knowledge Graph ID (mid) and Wikipedia URL.
  • Sentiment analysis: a score from -1 to 1 and a magnitude from 0 upwards, for the document and each sentence.
  • Entity sentiment: sentiment for each entity (entity sentiment analysis).
  • Syntax analysis: tokens, parts of speech, lemmas and a dependency tree (syntax analysis).
  • Text classification: content categories from a large, hierarchical taxonomy, each with a confidence score.
  • Content moderation: confidence scores across 16 safety categories (content moderation).

There are two versions. v2 offers entities, sentiment, classification and moderation but drops the entity sentiment and syntax methods, which remain in v1. The versions score the same text differently, so choose one and keep it for anything you track over time.

How it’s used in SEO and marketing

  • Entity audits: check which entities Google-style NLP finds on your key pages, how salient your brand is and whether navigation text outranks it.
  • Keyword research: extract entities from queries and cluster them.
  • Customer review analysis: combine document sentiment, entity sentiment and moderation for a thousand reviews in minutes.
  • Content categorisation and tagging at scale with text classification.
  • SERP analysis: score the sentiment of ranking titles and descriptions.

Example

In MLforSEO’s comparison of NLP APIs, Google’s API returned the most entities by far (59 unique) for the same text that was sent to Amazon Comprehend, IBM Watson NLU and four chatbots, along with salience, sentiment and Knowledge Graph links for each. Volume is not accuracy, which is why the post also scores the core named entities.

Limitations and things to watch

  • It is a paid API after a free monthly allowance, and it needs a Google Cloud project with billing enabled.
  • Pre-trained models label niche brands and jargon as OTHER and cannot be custom-trained; use AutoML or spaCy for custom entities.
  • It is separate from the systems Google Search uses to rank pages, so treat its output as a useful proxy for how machines read your text.
  • Language support differs by method; check before running non-English text.

Learn it on MLforSEO

Where Google Cloud Natural Language API (Google NLP API) shows up on MLforSEO

Sources and further reading

Other terms from APIs

See all 15 APIs terms →