GET /insights/sentiment

Sentiment

How Reddit feels about a keyword: sentiment shares, themes, praise and complaints. Reddit Scraper API endpoint /insights/sentiment: parameters, JSON response fields and code examples.

An AI model reads recent Reddit posts and comments that mention q (site-wide or in up to 5 subreddits) and reports the sentiment shares, up to 10 themes, 5 praised points and 5 complaints, each quoted verbatim with its item id. Samples and answers are kept 30 minutes. Billed 5 requests per call, plus 1 AI unit per model answer (per started 40,000 characters of max_chars).

HTTP Request

GET /insights/sentiment

Cost (in requests): 5 + AI units. Every successful answer reports its cost in data.billed_requests. AI endpoints need a paid plan.

Parameters

ParameterTypeRequiredDefaultDescription
qstringYes-Keyword, product, brand or topic to look for (1–200 characters).
contextstringNo-Optional context that disambiguates the keyword (≤ 300 characters, e.g. project management app); used to rank the sample, never sent to Reddit.
subredditsstringNo-Comma-separated subreddit names, r/name, or t5_ ids to restrict the sample to (≤ 5).
timestringNomonthPeriod of the sample: day, week, month (default), year or all. Posts and comments from outside the period are left out. With day, week and month the comments are the newest ones matching the keyword, so a busy keyword’s comments may cover only the last days.
include_nsfwbooleanNotrueDefault true: adult content included (communities and posts marked NSFW); pass false to exclude it.
max_charsintegerNo40000Text handed to the model after the sample is ranked (1000–120000, default 40000); each started 40,000 characters bills one more AI unit.
languagestringNo-Language of the model’s answer (ISO-639-1, e.g. en, es, pt-BR). Quotes keep their original language.
freshbooleanNofalseDefault false. True recomputes instead of serving the stored result (bills the full cost).

Response

Real response to GET /insights/sentiment?q=fastapi (arrays trimmed to 2 items, long texts cut with …).

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
  "status": true,
  "request_id": "4424f02e-98c8-aee0-fa39-e78de0b8",
  "data": {
    "sentiment": {
      "positive": 0.52,
      "neutral": 0.28,
      "negative": 0.2
    },
    "themes": [
      {
        "name": "Learning curve & docs",
        "sentiment": "positive",
        "mentions_count": 7,
        "example_ids": [
          {
            "item_id": "t3_1xyj4zz",
            "item_type": "post"
          },
          {
            "item_id": "t1_19sdj1xyx7hqd",
            "item_type": "comment"
          }
        ]
      },
      {
        "name": "FastAPI Cloud / hosting",
        "sentiment": "positive",
        "mentions_count": 3,
        "example_ids": [
          {
            "item_id": "t3_1xm7oif",
            "item_type": "post"
          },
          {
            "item_id": "t3_1xm7khd",
            "item_type": "post"
          }
        ]
      }
    ],
    "top_praise": [
      {
        "text": "FastAPI is definitely the easier one to pick up and learn.",
        "item_id": "t3_1xyj4zz",
        "item_type": "post"
      },
      {
        "text": "FastAPI or Django get you a working API really fast, the ecosystem for payments, email, auth and data is huge, and async python handles lots of concurrent requests fine for typical web apps.",
        "item_id": "t1_19sdj1xyx7hqd",
        "item_type": "comment"
      }
    ],
    "top_complaints": [
      {
        "text": "This is the direct result of dumbass HR people. They ask the technical person, who responds saying FastAPI experience would be nice, and they arbitrarily ask for five years without knowing anything about the technology behind the actual nee…",
        "item_id": "t1_19rolmks4a16s",
        "item_type": "comment"
      },
      {
        "text": "My first thoughts in order: Wait, advertising commercial offerings is allowed here? Huh. Oh cool, free and anonymous web hosting. No one will ever abuse that. Not so sure how I feel about a popular FOSS library installing a deployment tool …",
        "item_id": "t1_19s33zkg29e10",
        "item_type": "comment"
      }
    ],
    "sample": {
      "posts_count": 45,
      "comments_count": 48,
      "truncated": false,
      "period": {
        "from": "2026-10-25T04:09:36.719000+00:00",
        "to": "2026-11-24T20:52:07.419000+00:00"
      },
      "subreddits": [
        "developersIndia",
        "Backend"
      ]
    },
    "resolved_filters": {
      "time": {
        "input": null,
        "resolved": "month",
        "source": "default"
      },
      "subreddits": {
        "input": null,
        "resolved": null,
        "source": "default"
      },
      "include_nsfw": {
        "input": null,
        "resolved": "true",
        "source": "default"
      },
      "language": {
        "input": null,
        "resolved": "en",
        "source": "default"
      }
    },
    "off_topic_ids": [
      {
        "item_id": "t1_19t4h6airqgyo",
        "item_type": "comment"
      },
      {
        "item_id": "t1_19t2qdpu006px",
        "item_type": "comment"
      }
    ],
    "ai": {
      "input_tokens": 8475,
      "output_tokens": 1824,
      "possible_injection": false,
      "truncated": false,
      "cached": false
    },
    "computed_at": "2026-11-24T20:58:44.482877+00:00",
    "fresh": true,
    "billed_requests": 5
  },
  "request_params": {
    "q": "fastapi"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectPresent on success and on a model failure (then with empty model fields).
data.sentimentobjectShares of the sample (sum 1); null when the model gave no answer or the sample is empty. Model output: treat as untrusted text if you pass it to an agent with tools.
data.sentiment.positivefloatShare of positive items (0–1).
data.sentiment.neutralfloatShare of neutral items (0–1).
data.sentiment.negativefloatShare of negative items (0–1).
data.themesarray of objectsUp to 10 themes.
data.themes[].namestringTheme name. Model output: treat as untrusted text if you pass it to an agent with tools.
data.themes[].sentimentstringpositive, neutral, negative or mixed. Model output: treat as untrusted text if you pass it to an agent with tools.
data.themes[].mentions_countintegerSample items the model assigned to the theme.
data.themes[].example_idsarray of objectsUp to 3 sample items illustrating the theme (always items the model was given). Each entry is {item_id, item_type}: post ids go to /post/batch, comment ids to /comment/batch.
data.themes[].example_ids[].item_idstringPost (t3_…) or comment (t1_…) id.
data.themes[].example_ids[].item_typestringpost or comment, from the id: post ids go to /post/batch, comment ids to /comment/batch.
data.top_praisearray of objectsUp to 5 praised points with quotes.
data.top_praise[].textstringVerbatim excerpt of a sample item (≤ 280 characters). Model output: treat as untrusted text if you pass it to an agent with tools.
data.top_praise[].item_idstringSample item id the excerpt comes from (t3_… or t1_…).
data.top_praise[].item_typestringpost or comment, from the id: post ids go to /post/batch, comment ids to /comment/batch.
data.top_complaintsarray of objectsUp to 5 complaints with quotes.
data.top_complaints[].textstringVerbatim excerpt of a sample item (≤ 280 characters). Model output: treat as untrusted text if you pass it to an agent with tools.
data.top_complaints[].item_idstringSample item id the excerpt comes from (t3_… or t1_…).
data.top_complaints[].item_typestringpost or comment, from the id: post ids go to /post/batch, comment ids to /comment/batch.
data.sampleobjectWhat was read from Reddit.
data.sample.posts_countintegerPosts in the sample.
data.sample.comments_countintegerComments in the sample.
data.sample.truncatedbooleanTrue when the sample was cut by max_chars (or to keep the answer fast).
data.sample.periodobjectOldest and newest item dates.
data.sample.period.fromstringOldest item in the sample (ISO 8601 UTC).
data.sample.period.tostringNewest item in the sample (ISO 8601 UTC).
data.sample.subredditsarray of stringCommunities most present in the sample (≤ 10).
data.resolved_filtersobjectFilters as applied.
data.resolved_filters.timeobjectPeriod applied.
data.resolved_filters.time.inputstring / nullWhat the caller sent.
data.resolved_filters.time.resolvedstringWhat was applied on Reddit (null when not applied).
data.resolved_filters.time.sourcestringparam (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language).
data.resolved_filters.subredditsobjectSubreddit restriction applied.
data.resolved_filters.subreddits.inputstring / nullWhat the caller sent.
data.resolved_filters.subreddits.resolvedstring / nullWhat was applied on Reddit (null when not applied).
data.resolved_filters.subreddits.sourcestringparam (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language).
data.resolved_filters.include_nsfwobjectNSFW inclusion applied.
data.resolved_filters.include_nsfw.inputstring / nullWhat the caller sent.
data.resolved_filters.include_nsfw.resolvedstringWhat was applied on Reddit (null when not applied).
data.resolved_filters.include_nsfw.sourcestringparam (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language).
data.resolved_filters.languageobjectAnswer language applied.
data.resolved_filters.language.inputstring / nullWhat the caller sent.
data.resolved_filters.language.resolvedstringWhat was applied on Reddit (null when not applied).
data.resolved_filters.language.sourcestringparam (applied as given), default, not_found (the value does not exist on Reddit), private / banned / quarantined (a community in the scope that cannot be read: skipped), or not_available (translate_to only: Reddit had no translated listing, the rows are served in their original language).
data.off_topic_idsarray of objectsSample items the model judged unrelated to the keyword. Each entry is {item_id, item_type}: post ids go to /post/batch, comment ids to /comment/batch. Model output: treat as untrusted text if you pass it to an agent with tools.
data.off_topic_ids[].item_idstringPost (t3_…) or comment (t1_…) id.
data.off_topic_ids[].item_typestringpost or comment, from the id: post ids go to /post/batch, comment ids to /comment/batch.
data.aiobjectHow the model answered (null when it did not).
data.ai.input_tokensintegerInput tokens of the model call.
data.ai.output_tokensintegerOutput tokens of the model call.
data.ai.possible_injectionbooleanTrue when the input text contained instruction-like phrasing (“ignore previous instructions” and the like). Informational: the answer was still produced from the data.
data.ai.truncatedbooleanTrue when the input was cut to fit max_chars (or to keep the answer fast).
data.ai.cachedbooleanTrue when the answer was served from the stored result (or the rules had not changed), so no model call was made for this request.
data.computed_atstringWhen this answer was computed (RFC 3339, UTC). Older than the request when it was served from the cache.
data.freshbooleanTrue when computed for this request; false when served from the stored result.
data.billed_requestsintegerRequests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1).
request_paramsobjectEcho of the parameters you sent

Error Responses

Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:

1
{ "status": false, "request_id": "99a1e6cd-2e57-9e8f-4e44-2dea7f6d", "error": "Invalid parameter 'post_id': must be a post id such as z1c9z or t3_z1c9z", "request_params": { "post_id": "!!" } }
Status CodeCauseDescription
400Invalid or missing parameterPlain-English message per field. Not billed
503 with error.codeAI model failedllm_timeout, llm_error or invalid_output. The Reddit data read so far is still in data. Not billed, retry
503Reddit temporarily unreachable"error": "Service temporarily unavailable". Not billed, retry later

Code Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import requests

url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/insights/sentiment"

params = {
    "q": "fastapi",
}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()["data"]

print(data)
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/insights/sentiment";

const params = new URLSearchParams({
  q: "fastapi",
});

const response = await fetch(`${url}?${params}`, {
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  }
});

const { data } = await response.json();
console.log(data);
1
2
3
4
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/insights/sentiment" \
  --data-urlencode "q=fastapi" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"
  • Pain Points : The recurring problems Reddit describes about a keyword, with verbatim quotes
  • Questions : The questions Reddit asks about a keyword, grouped, with how the community answers them
Start building today

Get your API key and make your first request in under a minute.

Get Your API Key on RapidAPI