For Agents
Run sentiment, entity, syntax, classification, and moderation analysis on text or HTML documents using Google's pretrained NLP models. Useful for content tagging and review pipelines.
Use for: Analyze the sentiment of a customer review, Extract company and person names from a news article, Classify a blog post into Google's content taxonomy, I want to moderate user-submitted text for harmful content
Not supported: Does not generate text, translate languages, transcribe audio, or train custom models — use only for sentiment, entity, syntax, classification, and moderation analysis on existing text.
The Cloud Natural Language API applies Google's pretrained NLP models to plain text and HTML documents and returns structured analysis: named entities, document and sentence-level sentiment, syntactic annotation, content classification into a 1000+ category taxonomy, and content moderation labels. It is callable on text up to 1 MB per request and supports multiple languages depending on the feature. The v2 endpoints replace the older analyzeEntitySentiment and analyzeSyntax features with a streamlined annotateText combination call.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Cloud Natural Language API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Cloud Natural Language API.
Extract named entities such as people, places, and organizations from a document
Score document- and sentence-level sentiment from -1 to +1 with magnitude
Classify a document into Google's content taxonomy of over 1000 topics
Detect harmful content categories such as violence and harassment in user text
Run combined entity, sentiment, and classification annotation in a single call
Process plain text or HTML up to 1 MB per request
Patterns agents use Cloud Natural Language API for, with concrete tasks.
★ Customer feedback sentiment analysis
Support and product teams pipe inbound feedback — reviews, survey responses, support tickets — into POST /v2/documents:analyzeSentiment to score overall and per-sentence sentiment. The score and magnitude let an agent prioritise strongly negative messages and route them to the right team without keyword rules.
Send a 500-word product review to /v2/documents:analyzeSentiment with type=PLAIN_TEXT and return documentSentiment.score and per-sentence sentiment.
Entity tagging for content systems
Newsrooms and CMS platforms tag articles by the people, places, and organizations mentioned in them. POST /v2/documents:analyzeEntities returns each entity with type, salience, and mentions, which an agent can use to build topic pages and recommendation links without manual tagging.
Send an article body to /v2/documents:analyzeEntities and return the top 10 entities by salience with their types.
User-generated content moderation
Community platforms call POST /v2/documents:moderateText on each new post to score it across categories such as Toxic, Insult, Sexual, Violent, and Public Safety. The agent can auto-hide content above a threshold and queue borderline cases for human review.
Pass a forum post to /v2/documents:moderateText and block the post if any moderationCategory.confidence exceeds 0.7.
Topic classification for editorial routing
Editorial and ad-targeting systems route content based on what it is about. POST /v2/documents:classifyText returns categories from a 1000+ topic taxonomy with confidence scores, so an agent can decide that a post belongs to /Sports/Soccer/MLS rather than /Business.
Send an article to /v2/documents:classifyText and return the top 3 categories with confidence.
Multi-feature analysis through Jentic
An agent inspecting user content can call POST /v2/documents:annotateText through Jentic to run entity extraction, sentiment, and classification in a single request. Jentic surfaces the features object so the agent can toggle which annotations to run without reading the full v2 reference.
Run google_language_annotate_text on a comment with features.extractEntities=true, extractDocumentSentiment=true, classifyText=true and return the combined result.
5 endpoints — the cloud natural language api applies google's pretrained nlp models to plain text and html documents and returns structured analysis: named entities, document and sentence-level sentiment, syntactic annotation, content classification into a 1000+ category taxonomy, and content moderation labels.
METHOD
PATH
DESCRIPTION
/v2/documents:analyzeSentiment
Score document and per-sentence sentiment
/v2/documents:analyzeEntities
Extract named entities with type and salience
/v2/documents:classifyText
Classify a document into Google's content taxonomy
/v2/documents:moderateText
Score harmful content categories on a document
/v2/documents:annotateText
Run multiple analysis features in one call
/v2/documents:analyzeSentiment
Score document and per-sentence sentiment
/v2/documents:analyzeEntities
Extract named entities with type and salience
/v2/documents:classifyText
Classify a document into Google's content taxonomy
/v2/documents:moderateText
Score harmful content categories on a document
/v2/documents:annotateText
Run multiple analysis features in one call
Three things that make agents converge on Jentic-routed access.
Credential isolation
Google Cloud service account keys are stored encrypted in the Jentic vault. Agents receive a short-lived OAuth 2.0 access token scoped to cloud-language at call time, and the private key never enters the agent context.
Intent-based discovery
Agents search Jentic for intents like 'analyze sentiment of text' or 'classify content into topics' and Jentic returns the matching /v2/documents operation with the document and features schema already filled in.
Time to first call
Direct integration: 2-4 hours to set up auth, build the document payload, and parse each feature's response shape. Through Jentic: under 15 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Specific to using Cloud Natural Language API through Jentic.
What authentication does the Cloud Natural Language API use?
OAuth 2.0 with the https://www.googleapis.com/auth/cloud-language or cloud-platform scope. A Google Cloud service account is the typical credential. Through Jentic the service account JSON sits in the encrypted vault and a short-lived access token is injected at request time.
What languages does the Natural Language API support?
Sentiment and entity analysis support English, Spanish, French, German, Italian, Japanese, Korean, Portuguese, Chinese (simplified and traditional), and Russian. Classification supports English, French, German, Italian, Japanese, Korean, Portuguese, and Spanish. Moderation currently supports English only.
What are the rate limits for the Natural Language API?
Default quota is 600 requests per minute per project, with each request limited to 1 MB of text. Pricing is per 1,000 characters and varies by feature — analyzeEntities and analyzeSentiment are billed separately even when combined in annotateText.
How do I run sentiment analysis through Jentic?
Run jentic search 'analyze sentiment of text' to find POST /v2/documents:analyzeSentiment, jentic load for the document schema, then jentic execute with body {"document": {"type": "PLAIN_TEXT", "content": "..."}} and read documentSentiment.score from the response.
Can I run multiple features in one call?
Yes. POST /v2/documents:annotateText accepts a features object — set extractEntities, extractDocumentSentiment, classifyText, and moderateText to true and the response includes each section. Each feature is billed independently.
Is the Cloud Natural Language API free?
There is a free tier of 5,000 units per feature per month. Beyond that, pricing is roughly $1-$2 per 1,000 units for sentiment, entities, and syntax, with classification and moderation slightly higher. Each unit is 1,000 characters.
GET STARTED