Content Analysis API
Keyword sentiment breakdown
Positive / neutral / negative split for a keyword with mean, median and a score histogram, plus the most positive and most negative mentions. Lexicon-based and fully deterministic — the method, its thresholds and its limits are returned with every response.
Endpoint
/v1/content_analysis/sentimentlive · proven3 creditsParameters
Query parameters
| Name | Required | Description | Example |
|---|---|---|---|
keyword | yes | Phrase to score | kubernetes |
page_type | no | all, news, forum, social or discussion | all |
positive_connotation_threshold | no | Score in (0,1] at or above which a mention is positive | 0.25 |
sentiments_connotation_threshold | no | Score magnitude at or below which a mention is negative | 0.25 |
depth | no | Items fetched PER SOURCE before aggregating (max 100) | 50 |
filters | no | field:op:value segments joined by ; — see /v1/content_analysis/filters | source:eq:hackernews |
dry_run | no | Read a zero-credit estimate without fetching sources, running AI, or reserving credits. Cache status is a snapshot, not a guarantee at execution. | 1 |
Examples
Make the request
curl "https://www.monocrawl.com/v1/content_analysis/sentiment?keyword=kubernetes" \ -H "x-api-key: mn_your_key_here"
TypeScript
const key = process.env.MONOCRAWL_API_KEY;
if (!key) throw new Error('Set MONOCRAWL_API_KEY on your server.');
const res = await fetch(
"https://www.monocrawl.com/v1/content_analysis/sentiment?keyword=kubernetes",
{ headers: { "x-api-key": key } },
);
const body = await res.json();
if (!body.success) {
// one error shape for every endpoint — see /docs/errors
throw new Error(`${body.error.type}: ${body.error.message}`);
}
console.log(body.data, "credits left:", body.credits_remaining);Python
import os
import requests
res = requests.get(
"https://www.monocrawl.com/v1/content_analysis/sentiment?keyword=kubernetes",
headers={"x-api-key": os.environ["MONOCRAWL_API_KEY"]},
timeout=60,
)
body = res.json()
if not body["success"]:
# one error shape for every endpoint — see /docs/errors
raise RuntimeError(f"{body['error']['type']}: {body['error']['message']}")
print(body["data"], "credits left:", body["credits_remaining"])Response
Response fields and example
This example is illustrative, not a captured live response. Variable-cost operations may settle a charge different from the list price below. A successful response puts the platform payload in data and reports the exact credits used, remaining balance, request id and cache status beside it.
{
"success": true,
"platform": "content_analysis",
"endpoint": "/v1/content_analysis/sentiment",
"data": {
"_warnings": [
"example"
],
"by_source": [
{
"max_score": 0,
"mean_score": 0,
"median_score": 0,
"min_score": 0,
"negative": 0,
"neutral": 0,
"positive": 0,
"source": "example",
"total": 0
}
],
"counts": {
"negative": 0,
"neutral": 0,
"positive": 0,
"total": 0
},
"filters_applied": [],
"keyword": "example",
"max_score": 0,
"mean_score": 0,
"median_score": 0,
"min_score": 0,
"most_negative": [
{
"matched_terms": [
{}
],
"published_at": "2026-09-01T12:00:00Z",
"sentiment": {
"label": "example",
"score": 0
},
"source": "example",
"title": "example",
"url": "https://example.com/example"
}
],
"most_positive": [
{
"matched_terms": [
{}
],
"published_at": "2026-09-01T12:00:00Z",
"sentiment": {
"label": "example",
"score": 0
},
"source": "example",
"title": "example",
"url": "https://example.com/example"
}
],
"score_histogram": [
{
"from": 0,
"mentions": 0,
"to": 0
}
],
"sentiment_method": {
"ai_used": false,
"kind": "example",
"known_limits": [
"example"
],
"lexicon": {
"diminishers": 0,
"intensifiers": 0,
"negative_terms": 0,
"negators": 0,
"positive_terms": 0,
"total_terms": 0
},
"modifiers": {
"diminisher": "example",
"intensifier": "example",
"matching": "example",
"negation": "example"
},
"scoring": "example",
"thresholds": {
"negative": 0,
"positive": 0
}
},
"share": {
"negative": 0,
"neutral": 0,
"positive": 0
},
"sources": [
{
"endpoint": "example",
"error": "example",
"kept": 0,
"ok": false,
"returned": 0,
"source": "example",
"status": 0
}
],
"sources_unavailable": [
{
"reason": "example",
"source": "example"
}
],
"unscored_mentions": 0,
"volume": {
"duplicates_removed": 0,
"gathered_before_filters": 0,
"mentions": 0
}
},
"credits_used": 3,
"credits_remaining": 99,
"request_id": "req_…",
"cached": false
}The example is illustrative and shows a documented subset of data. The fields below are optional across supported sources; nullable fields can also be absent. Preserve unknown values and accept additional fields.
Schema basis: observed response shapes, not an exhaustive field specification. See schema coverage and validation limits.
Download the data JSON Schema. Validate response.data, not the whole envelope. A valid shape does not establish that every field or source record was returned.
| Field inside data | Type | Meaning |
|---|---|---|
_warnings | array | null | Optional warnings supplied by this operation. Null means unknown. |
by_source | array | null | Optional by source supplied by this operation. Null means unknown. |
by_source[].max_score | number | null | Optional max score supplied by this operation. Null means unknown. |
by_source[].mean_score | number | null | Optional mean score supplied by this operation. Null means unknown. |
by_source[].median_score | number | null | Optional median score supplied by this operation. Null means unknown. |
by_source[].min_score | number | null | Optional min score supplied by this operation. Null means unknown. |
by_source[].negative | number | null | Optional negative supplied by this operation. Null means unknown. |
by_source[].neutral | number | null | Optional neutral supplied by this operation. Null means unknown. |
by_source[].positive | number | null | Optional positive supplied by this operation. Null means unknown. |
by_source[].source | string | null | Optional source supplied by this operation. Null means unknown. |
by_source[].total | number | null | Source-reported total; null is unknown. |
counts | object | null | Optional counts supplied by this operation. Null means unknown. |
counts.negative | number | null | Optional negative supplied by this operation. Null means unknown. |
counts.neutral | number | null | Optional neutral supplied by this operation. Null means unknown. |
counts.positive | number | null | Optional positive supplied by this operation. Null means unknown. |
counts.total | number | null | Source-reported total; null is unknown. |
filters_applied | array | null | Source array was empty in the reviewed captures; item fields remain unspecified. |
keyword | string | null | Optional keyword supplied by this operation. Null means unknown. |
max_score | number | null | Optional max score supplied by this operation. Null means unknown. |
mean_score | number | null | Optional mean score supplied by this operation. Null means unknown. |
median_score | number | null | Optional median score supplied by this operation. Null means unknown. |
min_score | number | null | Optional min score supplied by this operation. Null means unknown. |
most_negative | array | null | Optional most negative supplied by this operation. Null means unknown. |
most_negative[].matched_terms | array | null | Optional matched terms supplied by this operation. Null means unknown. |
most_negative[].published_at | string | null | Source publication time when available. |
most_negative[].sentiment | object | null | Optional sentiment supplied by this operation. Null means unknown. |
most_negative[].sentiment.label | string | null | Optional label supplied by this operation. Null means unknown. |
most_negative[].sentiment.score | number | null | Optional score supplied by this operation. Null means unknown. |
most_negative[].source | string | null | Optional source supplied by this operation. Null means unknown. |
most_negative[].title | string | null | Source title when supplied. |
most_negative[].url | string | null | Original source URL when supplied. |
most_positive | array | null | Optional most positive supplied by this operation. Null means unknown. |
most_positive[].matched_terms | array | null | Optional matched terms supplied by this operation. Null means unknown. |
most_positive[].published_at | string | null | Source publication time when available. |
most_positive[].sentiment | object | null | Optional sentiment supplied by this operation. Null means unknown. |
most_positive[].sentiment.label | string | null | Optional label supplied by this operation. Null means unknown. |
most_positive[].sentiment.score | number | null | Optional score supplied by this operation. Null means unknown. |
most_positive[].source | string | null | Optional source supplied by this operation. Null means unknown. |
most_positive[].title | string | null | Source title when supplied. |
most_positive[].url | string | null | Original source URL when supplied. |
score_histogram | array | null | Optional score histogram supplied by this operation. Null means unknown. |
score_histogram[].from | number | null | Optional from supplied by this operation. Null means unknown. |
score_histogram[].mentions | number | null | Optional mentions supplied by this operation. Null means unknown. |
score_histogram[].to | number | null | Optional to supplied by this operation. Null means unknown. |
sentiment_method | object | null | Optional sentiment method supplied by this operation. Null means unknown. |
sentiment_method.ai_used | boolean | null | Optional ai used supplied by this operation. Null means unknown. |
sentiment_method.kind | string | null | Optional kind supplied by this operation. Null means unknown. |
sentiment_method.known_limits | array | null | Optional known limits supplied by this operation. Null means unknown. |
sentiment_method.lexicon | object | null | Optional lexicon supplied by this operation. Null means unknown. |
sentiment_method.lexicon.diminishers | number | null | Optional diminishers supplied by this operation. Null means unknown. |
sentiment_method.lexicon.intensifiers | number | null | Optional intensifiers supplied by this operation. Null means unknown. |
sentiment_method.lexicon.negative_terms | number | null | Optional negative terms supplied by this operation. Null means unknown. |
sentiment_method.lexicon.negators | number | null | Optional negators supplied by this operation. Null means unknown. |
sentiment_method.lexicon.positive_terms | number | null | Optional positive terms supplied by this operation. Null means unknown. |
sentiment_method.lexicon.total_terms | number | null | Optional total terms supplied by this operation. Null means unknown. |
sentiment_method.modifiers | object | null | Optional modifiers supplied by this operation. Null means unknown. |
sentiment_method.modifiers.diminisher | string | null | Optional diminisher supplied by this operation. Null means unknown. |
sentiment_method.modifiers.intensifier | string | null | Optional intensifier supplied by this operation. Null means unknown. |
sentiment_method.modifiers.matching | string | null | Optional matching supplied by this operation. Null means unknown. |
sentiment_method.modifiers.negation | string | null | Optional negation supplied by this operation. Null means unknown. |
sentiment_method.scoring | string | null | Optional scoring supplied by this operation. Null means unknown. |
sentiment_method.thresholds | object | null | Optional thresholds supplied by this operation. Null means unknown. |
sentiment_method.thresholds.negative | number | null | Optional negative supplied by this operation. Null means unknown. |
sentiment_method.thresholds.positive | number | null | Optional positive supplied by this operation. Null means unknown. |
share | object | null | Optional share supplied by this operation. Null means unknown. |
share.negative | number | null | Optional negative supplied by this operation. Null means unknown. |
share.neutral | number | null | Optional neutral supplied by this operation. Null means unknown. |
share.positive | number | null | Optional positive supplied by this operation. Null means unknown. |
sources | array | null | Optional sources supplied by this operation. Null means unknown. |
sources[].endpoint | string | null | Optional endpoint supplied by this operation. Null means unknown. |
sources[].error | string | null | Optional error supplied by this operation. Null means unknown. |
sources[].kept | number | null | Optional kept supplied by this operation. Null means unknown. |
sources[].ok | boolean | null | Optional ok supplied by this operation. Null means unknown. |
sources[].returned | number | null | Optional returned supplied by this operation. Null means unknown. |
sources[].source | string | null | Optional source supplied by this operation. Null means unknown. |
sources[].status | number | null | Optional status supplied by this operation. Null means unknown. |
sources_unavailable | array | null | Optional sources unavailable supplied by this operation. Null means unknown. |
sources_unavailable[].reason | string | null | Optional reason supplied by this operation. Null means unknown. |
sources_unavailable[].source | string | null | Optional source supplied by this operation. Null means unknown. |
unscored_mentions | number | null | Optional unscored mentions supplied by this operation. Null means unknown. |
volume | object | null | Optional volume supplied by this operation. Null means unknown. |
volume.duplicates_removed | number | null | Optional duplicates removed supplied by this operation. Null means unknown. |
volume.gathered_before_filters | number | null | Optional gathered before filters supplied by this operation. Null means unknown. |
volume.mentions | number | null | Optional mentions supplied by this operation. Null means unknown. |
Optional fields reviewed from preserved successful responses. Additive fields and source variations remain allowed; validate the fields your workflow requires.
The example is invented and illustrates types only; zero and empty values are not claims about a real result.
Failures use the typed error envelope. A confirmed uncharged or refunded failure reports zero; a pending reconciliation can report an unknown charge. Read credits_used and error.details.billing_status, and keep request_id for recovery. Response contract · Error reference