GET /post/extract

Post Extract

AI extraction of structured rows from a thread. Reddit Scraper API endpoint /post/extract: parameters, JSON response fields and code examples.

An AI model reads a post’s comments and returns one row per comment that states what you ask for, with its comment_id and real score, in thread order (rows: [] when none does). Describe the fields in schema and/or instructions; up to max_comments comments are read and answers are kept 30 minutes. Billed 1 request per 100 comments read (minimum 1) plus 1 AI unit per started 40,000 characters of max_chars (none on a stored answer). Use POST for a nested schema (lists or objects) or long instructions.

HTTP Request

GET /post/extract (also POST /post/extract with a JSON body, see below)

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

Parameters

ParameterTypeRequiredDefaultDescription
post_idstringNo-Post id, with or without the t3_ prefix (e.g. z1c9z or t3_z1c9z). Give this or url.
urlstringNo-A Reddit post or comment URL (https://www.reddit.com/r/IAmA/comments/z1c9z/..., redd.it/z1c9z), or the permalink path returned by this API. Alternative to the id.
fieldsstringNo-What to extract per comment, as name:type pairs separated by commas (at most 20; names in snake_case; types string, number, integer, boolean, url), e.g. question:string,answered:boolean. Every field is optional in the output (null when a comment does not state it). Give this and/or instructions.
instructionsstringNo-Optional steer or question for the model, at most 1,000 characters (focus, audience, a question to answer). It cannot change the output shape or the rules the model follows. Without schema, the model chooses snake_case field names for what you ask.
max_commentsintegerNo200Comments read from the thread before the text is built, 1–500 (default 200).
max_charsintegerNo40000Characters of thread text handed to the model, 1,000–120,000 (default 40,000). The thread is cut at this cap on a comment boundary (truncated). Up to 40,000 is 1 AI unit, up to 80,000 is 2 AI units, up to 120,000 is 3 AI units.
languagestringNo-ISO-639-1 code (en, es, pt-BR) the answer is written in. Default: the language of the post.
include_htmlbooleanNofalseAdds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text.
freshbooleanNofalseDefault false. True recomputes instead of serving the stored result (bills the full cost).

POST body

POST /post/extract accepts the same fields as a JSON body (Content-Type: application/json). List fields are JSON arrays instead of comma-separated strings. Use POST when the text is long.

ParameterTypeRequiredDefaultDescription
post_idstringNo-Post id, with or without the t3_ prefix (e.g. z1c9z or t3_z1c9z). Give this or url.
urlstringNo-A Reddit post or comment URL (https://www.reddit.com/r/IAmA/comments/z1c9z/..., redd.it/z1c9z), or the permalink path returned by this API. Alternative to the id.
schemaobjectNo-What to extract per comment, as a JSON Schema object or the shorthand {"field": "string/number/integer/boolean/url", "list": [{...}]} (at most 50 fields, nesting depth 3, 20 KB). Every field is optional in the output (null when a comment does not state it). Give this and/or instructions.
instructionsstringNo-Optional steer or question for the model, at most 1,000 characters (focus, audience, a question to answer). It cannot change the output shape or the rules the model follows. Without schema, the model chooses snake_case field names for what you ask.
max_commentsintegerNo200Comments read from the thread before the text is built, 1–500 (default 200).
max_charsintegerNo40000Characters of thread text handed to the model, 1,000–120,000 (default 40,000). The thread is cut at this cap on a comment boundary (truncated). Up to 40,000 is 1 AI unit, up to 80,000 is 2 AI units, up to 120,000 is 3 AI units.
languagestringNo-ISO-639-1 code (en, es, pt-BR) the answer is written in. Default: the language of the post.
include_htmlbooleanNofalseAdds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text.
freshbooleanNofalseDefault false. True recomputes instead of serving the stored result (bills the full cost).

Response

Real response to GET /post/extract?fields=opinion:string,in_favor:boolean&post_id=t3_1xj9fse (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
126
127
128
129
130
{
  "status": true,
  "request_id": "d679f2ab-a8ff-0c47-b55f-09d51155",
  "data": {
    "post": {
      "post_id": "t3_1xj9fse",
      "title": "PEP 851 – Add list.discard()",
      "type": "text",
      "permalink": "/r/Python/comments/1xj9fse/pep_851_add_listdiscard/",
      "post_url": "https://www.reddit.com/r/Python/comments/1xj9fse/pep_851_add_listdiscard/",
      "url": "https://www.reddit.com/r/Python/comments/1xj9fse/pep_851_add_listdiscard/",
      "domain": "self.Python",
      "subreddit": "Python",
      "subreddit_id": "t5_2qh0y",
      "subreddit_type": "public",
      "subreddit_icon_url": "https://styles.redditmedia.com/t5_2qh0y/styles/communityIcon_lctik80p96tg1.png?width=64&frame=1&auto=webp&s=92baaacc951d52b5071629852df033d53cafa5ec",
      "is_subreddit_nsfw": false,
      "is_subreddit_quarantined": false,
      "author": "kirara0048",
      "is_author_deleted": false,
      "author_id": "t2_4uu8u9p7",
      "author_avatar_url": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_3.png",
      "author_type": "user",
      "is_author_nsfw": false,
      "author_flair": null,
      "flair": {
        "text": "News",
        "rich_text": [
          {
            "type": "text",
            "text": "News",
            "url": null
          }
        ],
        "background_color": "#7193FF",
        "text_color": "light",
        "flair_id": "0ad780a0-1c5e-11ea-978c-0ee7bacb2bff"
      },
      "score": 216,
      "upvote_ratio": 0.9737,
      "comments_count": 56,
      "shares_count": 3,
      "crossposts_count": null,
      "created_at": "2026-10-30T08:05:21.804000+00:00",
      "is_nsfw": false,
      "is_spoiler": false,
      "is_stickied": false,
      "is_locked": false,
      "is_archived": false,
      "is_crosspost": false,
      "crosspost_parent_id": null,
      "crosspost_parent_subreddit": null,
      "is_brand_affiliate": false,
      "distinguished": null,
      "removed_by": null,
      "removal_category": null,
      "position": null,
      "thumbnail_url": "https://external-preview.redd.it/pep-851-add-list-discard-v0-qsyApzksUdlxqY7z2ubJCNmhQilhXIOl25dSHcQQLB4.png?width=108&crop=smart&auto=webp&s=47770d6b68eb1f776c7d2788912186555f3d08a4",
      "thumbnail_width": 108,
      "thumbnail_height": 108,
      "body_text": "PEP 851 – Add list.discard()\n\nhttps://peps.python.org/pep-0851/\n\nDiscussions-To: Discourse thread\n\nAbstract\n\nAdd list.discard(x), which removes the first item equal to x if one is present and does nothing otherwise, returning whether an ite…",
      "body_media": [],
      "poll": null,
      "media": {
        "type": null,
        "preview_url": "https://external-preview.redd.it/pep-851-add-list-discard-v0-qsyApzksUdlxqY7z2ubJCNmhQilhXIOl25dSHcQQLB4.png?auto=webp&s=a805df47873c9a330535ca66222f010b3deba9ac",
        "preview_width": 200,
        "preview_height": 200,
        "preview_variants": [
          {
            "size": "thumbnail",
            "url": "https://external-preview.redd.it/pep-851-add-list-discard-v0-qsyApzksUdlxqY7z2ubJCNmhQilhXIOl25dSHcQQLB4.png?width=108&crop=smart&auto=webp&s=47770d6b68eb1f776c7d2788912186555f3d08a4",
            "width": 108,
            "height": 108
          },
          {
            "size": "full",
            "url": "https://external-preview.redd.it/pep-851-add-list-discard-v0-qsyApzksUdlxqY7z2ubJCNmhQilhXIOl25dSHcQQLB4.png?auto=webp&s=a805df47873c9a330535ca66222f010b3deba9ac",
            "width": 200,
            "height": 200
          }
        ],
        "alt_text": null,
        "hls_url": null,
        "video_url": null,
        "poster_url": null,
        "captions_url": null,
        "duration_seconds": null,
        "width": null,
        "height": null,
        "renditions": [],
        "embed_html": null,
        "embed_provider": null,
        "gallery": []
      }
    },
    "rows": [
      {
        "comment_id": "t1_19rve4jkai9b4",
        "score": 96,
        "opinion": "I like the proposal and checked the full pep and wondered about remove(x, missing_ok=True)... the separate method is the better choice, mostly because of the return value. discard() returns whether something was removed, while remove() retu…",
        "in_favor": true
      },
      {
        "comment_id": "t1_19rvhm63rkdr4",
        "score": 48,
        "opinion": "\"A flag that's always passed as a literal is usually a sign it should be its own method\" is a wonderful rule to code by. I love that.",
        "in_favor": true
      }
    ],
    "comments_included": 55,
    "comments_omitted": 0,
    "truncated": false,
    "language": null,
    "ai": {
      "input_tokens": 5134,
      "output_tokens": 2278,
      "possible_injection": true,
      "truncated": false,
      "cached": false
    },
    "computed_at": "2026-11-24T20:55:26.006736+00:00",
    "fresh": true,
    "billed_requests": 1
  },
  "request_params": {
    "fields": "opinion:string,in_favor:boolean",
    "post_id": "t3_1xj9fse"
  }
}

Response Fields

FieldTypeDescription
statusbooleantrue when the request succeeded
request_idstringUnique request identifier
dataobjectExtraction; status false with data present = the thread was read but the model did not answer; null with error.code not_found / deleted.
data.postobjectThe post.
data.post.post_idstringPost fullname, e.g. t3_z1c9z.
data.post.titlestringPost title; null when Reddit shows only its removal placeholder ([ Removed by moderator ]…).
data.post.typestringtext, link, image, gif, gallery, video, poll, crosspost, embed, game. A text post with inline images is text (its images in body_media). Only with with_details=true on /post/batch and /answers.
data.post.permalinkstringReddit path, e.g. /r/IAmA/comments/z1c9z/i_am_barack_obama/ (Reddit’s relative value; post_url is the same thread as a full link). Either form can be passed back as url.
data.post.post_urlstringAbsolute link of the post’s Reddit thread (https://www.reddit.com + permalink), ready to open.
data.post.urlstringWhere the post points (Reddit’s own url): the outside page for link posts, the image or video file for media posts (https://i.redd.it/…, https://v.redd.it/…), the original post for crossposts, the thread itself for text posts. The post’s own thread is post_url.
data.post.domainstringLink domain (arstechnica.com). For a text post Reddit fills the placeholder self.{subreddit}, which is not a link domain: /domain/posts refuses it; list text posts with /subreddit/posts?post_type=text.
data.post.subredditstringSubreddit name without r/.
data.post.subreddit_idstringSubreddit id (t5_…).
data.post.subreddit_typestringCommunity type: public, restricted, private, user (a post on a profile)…; null when this endpoint does not carry it. Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity and /user/insights.
data.post.subreddit_icon_urlstringCommunity icon URL; null when this endpoint does not carry it. Only with with_details=true on /post/batch, /domain/posts and /answers. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.is_subreddit_nsfwbooleanThe community is 18+ (a post can be safe for work in an 18+ community); null when this endpoint does not carry it. Only with with_details=true on /post/batch, /domain/posts and /answers. Left out on /subreddit/multi-posts.
data.post.is_subreddit_quarantinedbooleanThe community is quarantined; null when this endpoint does not carry it. Only with with_details=true on /post/batch, /domain/posts and /answers. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.authorstringAuthor username; [deleted] is reported as null with is_author_deleted true. Only with with_details=true on /post/batch and /answers.
data.post.is_author_deletedbooleanThe author’s account is deleted (the post may remain).
data.post.author_idstringAuthor account id (t2_…). Only with with_details=true on /post/batch and /answers.
data.post.author_avatar_urlstringAuthor avatar URL. Only with with_details=true on the routes that have it; left out on /media/search and /subreddit/multi-posts.
data.post.author_typestringuser or app (an app account that posts games or bot content); null when this endpoint does not carry it. Only with with_details=true on the routes that have it. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.is_author_nsfwbooleanThe author’s profile is marked 18+; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.author_flairobject / nullAuthor’s flair in this subreddit; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. Left out on /subreddit/multi-posts and the listing-card routes (/subreddit/posts, /feed/best, /feed/popular, /content/stories, /content/viral-media, /user/activity, /user/insights).
data.post.flairobjectPost flair. Only with with_details=true on /post/batch and /answers (always on /post/search). On the listing-card routes (/subreddit/posts, the feeds, /content/*, /user/activity and /user/insights posts) it holds text and background_color only.
data.post.flair.textstringFlair text (emoji shortcodes kept, e.g. :phx-2: Suns).
data.post.flair.rich_textarray of objectsRich-text flair as parts in display order (text, and emoji with their image URL); null for a plain-text flair or when this endpoint does not carry it.
data.post.flair.rich_text[].typestringtext or emoji.
data.post.flair.rich_text[].textstringThe text, or the emoji’s short code (e.g. :nba-1:).
data.post.flair.rich_text[].urlstring / nullEmoji image URL (emoji parts only).
data.post.flair.background_colorstringHex background colour (#0079D3) or null when the flair has no colour.
data.post.flair.text_colorstringlight or dark text on the flair pill.
data.post.flair.flair_idstringFlair template id, the same as flair_id on /subreddit/flairs. A reference id, not an input of this API; null when this endpoint does not carry it.
data.post.scoreintegerNet upvotes at fetch time.
data.post.upvote_ratiofloatUpvote share 0–1, 4 decimals (e.g. 0.8218). Only with with_details=true on the routes that have it. Left out on /subreddit/multi-posts. Left out on /media/search.
data.post.comments_countintegerComment count reported by Reddit.
data.post.shares_countintegerTimes the post was shared, as Reddit counts it; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.crossposts_countinteger / nullNumber of crossposts; null when Reddit sends no count (it sends none, not 0, for most posts never crossposted) or this endpoint does not carry it. Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity and /user/insights. On the /post/crossposts source_post: Reddit’s total of crossposts of the post.
data.post.created_atstringISO-8601 UTC creation time, microsecond precision. Left out on /media/search and on /answers without with_details.
data.post.is_nsfwbooleanMarked NSFW.
data.post.is_spoilerbooleanMarked spoiler. Only with with_details=true on /post/batch and /answers.
data.post.is_stickiedbooleanPinned in the feed (feeds and listings only). Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /media/search.
data.post.is_lockedbooleanComments locked. Only with with_details=true on /post/batch and /answers (always on /post/search). Left out on /media/search.
data.post.is_archivedbooleanArchived (no new votes or comments). Only with with_details=true on the routes that have it (always on /post/search). Left out on /media/search.
data.post.is_crosspostbooleanThe post is a crosspost. Only with with_details=true on the routes that have it. Left out on /media/search.
data.post.crosspost_parent_idstring / nullId of the original post (t3_…) this crosspost shares; null unless is_crosspost and the endpoint carries it. Pass it to /post/details. Only with with_details=true on /post/batch and /answers (always on /post/search).
data.post.crosspost_parent_subredditstring / nullSubreddit of the original post, without r/; null unless is_crosspost. Only with with_details=true on /post/batch and /answers (always on /post/search).
data.post.is_brand_affiliatebooleanReddit’s paid-partnership disclosure is set on the post; null when this endpoint does not carry it. Only with with_details=true on the routes that have it. Left out on /subreddit/posts, /feed/best, /feed/popular, /feed/games, /content/stories, /content/viral-media, /media/search, /user/activity, /user/insights and /subreddit/multi-posts.
data.post.distinguishedstring / nullmoderator or admin when the post is distinguished; else null. Only with with_details=true on the routes that have it.
data.post.removed_bystring / nullWho removed the post: moderator, author, automod, spam, reddit or other; null when live or when this endpoint does not carry it. Only with with_details=true on the routes that have it.
data.post.removal_categorystring / nullReddit’s removal reason as sent, e.g. moderator or automod_filtered; null when live. Only with with_details=true on the routes that have it.
data.post.positioninteger / nullRank in the feed or the search results, 1-based and counted across pages (feeds keep Reddit’s gaps where ads were).
data.post.thumbnail_urlstringThumbnail URL.
data.post.thumbnail_widthintegerThumbnail pixel width; null when this endpoint does not carry it. Only with with_details=true on the routes that have it.
data.post.thumbnail_heightintegerThumbnail pixel height; null when this endpoint does not carry it. Only with with_details=true on the routes that have it.
data.post.body_textstringSelf text as plain text. Only with with_details=true on the routes that have it. Left out on /post/crossposts, /post/by-url and /subreddit/multi-posts. Left out on /media/search.
data.post.body_mediaarrayImages and videos embedded in the text body, in order; empty when none or when this endpoint does not carry them. Only with with_details=true on the routes that have it.
data.post.pollobject / nullPoll options and totals (poll posts only). Only with with_details=true on the routes that have it.
data.post.mediaobjectImages, video renditions, gallery, embed. Only with with_details=true on the routes that have it (always on /post/search).
data.post.media.typestring / nullMedia kind: image, video, gif, gallery, embed or null.
data.post.media.preview_urlstringLargest still preview URL.
data.post.media.preview_widthintegerPreview pixel width.
data.post.media.preview_heightintegerPreview pixel height.
data.post.media.preview_variantsarray of objectsEvery size Reddit renders of the preview image, smallest first; empty when this endpoint does not carry them.
data.post.media.preview_variants[].sizestringthumbnail (108 px wide), compact, medium (320), large (640), extra_large (1080) or full (the original size).
data.post.media.preview_variants[].urlstringImage URL at that size.
data.post.media.preview_variants[].widthintegerPixel width.
data.post.media.preview_variants[].heightintegerPixel height.
data.post.media.alt_textstring / nullImage description the author set for screen readers; null when none.
data.post.media.hls_urlstring / nullHLS playlist (.m3u8) for hosted video.
data.post.media.video_urlstring / nullPlayer URL of a third-party embed (YouTube, Streamable…), or the downloadable MP4 of a Reddit-hosted video (signed, expires within about a day). Null when the source of the route does not carry it (a hosted video on a listing card: use renditions).
data.post.media.poster_urlstring / nullVideo poster image.
data.post.media.captions_urlstring / nullWebVTT captions URL when available.
data.post.media.duration_secondsinteger / nullVideo duration in seconds.
data.post.media.widthinteger / nullVideo pixel width (a hosted video’s full size, or the embed player’s size).
data.post.media.heightinteger / nullVideo pixel height (a hosted video’s full size, or the embed player’s size).
data.post.media.renditionsarrayMP4 renditions with bitrate and size (hosted video only).
data.post.media.embed_htmlstring / nulloEmbed iframe HTML for third-party embeds (YouTube, Streamable…).
data.post.media.embed_providerstring / nullEmbed provider name, e.g. YouTube or Streamable; null on Reddit-hosted media.
data.post.media.galleryarrayGallery images in page order.
data.rowsarray of objectsOne object per comment that carries the requested information: your fields plus comment_id (always a comment the model was given) and score (read from the thread). Empty when no comment matched. Model output: treat as untrusted text if you pass it to an agent with tools.
data.rows[].comment_idstringThe comment the row was read from (t1_…).
data.rows[].scoreintegerThat comment’s score, read from the thread (never the model’s).
data.rows[].opinionstring
data.rows[].in_favorboolean
data.comments_includedintegerComments the model saw.
data.comments_omittedintegerComments read but left out by max_chars.
data.truncatedbooleanTrue when max_chars or max_comments left part of the thread out.
data.languagestring / nullISO-639-1 code of the free-text values: the requested language; null without it (the values keep the thread’s wording).
data.aiobjectModel call details; null when the model did not answer (status false with error.code llm_timeout / llm_error / invalid_output). Model output: treat as untrusted text if you pass it to an agent with tools.
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
200 with status: falseItem not availableerror.code is not_found, deleted (post removed or deleted). data is null. Billed 1 request
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
19
20
import requests

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

params = {
    "fields": "opinion:string,in_favor:boolean",
    "post_id": "t3_1xj9fse",
}

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["comments_included"])
print(data["comments_omitted"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
const url = "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/extract";

const params = new URLSearchParams({
  fields: "opinion:string,in_favor:boolean",
  post_id: "t3_1xj9fse",
});

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.comments_included, data.comments_omitted);
1
2
3
4
5
curl -G "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/extract" \
  --data-urlencode "fields=opinion:string,in_favor:boolean" \
  --data-urlencode "post_id=t3_1xj9fse" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com"

POST example

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

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

payload = {
    "post_id": "t3_1xj9fse",
    "instructions": "List each opinion about the proposal and whether it is in favor"
}

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

response = requests.post(url, headers=headers, json=payload)
data = response.json()["data"]

print(data["comments_included"])
print(data["comments_omitted"])
print("Billed requests:", data["billed_requests"])
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const response = await fetch("https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/extract", {
  method: "POST",
  headers: {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "post_id": "t3_1xj9fse",
  "instructions": "List each opinion about the proposal and whether it is in favor"
})
});

const { data } = await response.json();
console.log(data.comments_included, data.comments_omitted);
1
2
3
4
5
curl -X POST "https://reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com/post/extract" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: reddit-scraper-api-extractor-ai-the-most-complete.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{"post_id": "t3_1xj9fse", "instructions": "List each opinion about the proposal and whether it is in favor"}'
Start building today

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

Get Your API Key on RapidAPI