Skip to content

Subreddit Search

GET/v1/reddit/subreddit/search1 credit

Searches the posts of one subreddit and returns the matching posts.

01Query parameters

NameTypeDescription
subredditrequiredstringThe subreddit's name, e.g. `golang`, or its URL.
queryrequiredstringThe search text, e.g. `generics`.
sortoptionalstringSort order. Reddit's default when omitted.Accepted values:relevancehottopnewcomments
timeframeoptionalstringLimits results to posts from this period.Accepted values:allyearmonthweekdayhour
cursoroptionalstringThe `cursor` of the previous answer, to fetch the next page.

02Request

curl "https://api.scrapesocial.ai/v1/reddit/subreddit/search?subreddit=golang&query=generics" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/reddit/subreddit/search?subreddit=golang&query=generics

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "posts": [
    {
      "id": "1wu2x6h",
      "post_id": "t3_1wu2x6h",
      "author": "fastwind18",
      "author_fullname": "t2_9fm19a80x",
      "subreddit": "golang",
      "title": "Do you use method generics of 1.27 in production ?",
      "selftext": null,
      "selftext_html": null,
      "downs": 0,
      "name": "t3_1wu2x6h",
      "upvote_ratio": null,
      "ups": 58,
      "total_awards_received": null,
      "score": 58,
      "created": 1790769284,
      "created_utc": 1790769284,
      "created_at_iso": "2026-09-30T11:54:44.000Z",
      "num_comments": 40,
      "url": "https://www.reddit.com/r/golang/comments/1wu2x6h/do_you_use_method_generics_of_127_in_production/",
      "permalink": "/r/golang/comments/1wu2x6h/do_you_use_method_generics_of_127_in_production/",
      "thumbnail": null,
      "thumbnail_blurred": false,
      "position": 0,
      "subreddit_subscribers": null,
      "is_video": false,
      "over_18": false,
      "spoiler": false,
      "relative_position": 0
    },
    {
      "id": "1vx55je",
      "post_id": "t3_1vx55je",
      "author": "VastDesign9517",
      "author_fullname": "t2_9ntut7nq",
      "subreddit": "golang",
      "title": "What are you gonna use Generic methods for?",
      "selftext": null,
      "selftext_html": null,
      "downs": 0,
      "name": "t3_1vx55je",
      "upvote_ratio": null,
      "ups": 44,
      "total_awards_received": null,
      "score": 44,
      "created": 1787583411,
      "created_utc": 1787583411,
      "created_at_iso": "2026-08-24T14:56:51.000Z",
      "num_comments": 61,
      "url": "https://www.reddit.com/r/golang/comments/1vx55je/what_are_you_gonna_use_generic_methods_for/",
      "permalink": "/r/golang/comments/1vx55je/what_are_you_gonna_use_generic_methods_for/",
      "thumbnail": null,
      "thumbnail_blurred": false,
      "position": 1,
      "subreddit_subscribers": null,
      "is_video": false,
      "over_18": false,
      "spoiler": false,
      "relative_position": 1
    }
  ],
  "cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoie1wic2VjdGlvbl8xX3BpcGVsaW5lXzBfZ2xvYmFsX21vZGlmaWVyc1wiOlwiMVwiLFwic2VjdGlvbl8xX3BpcGVsaW5lXzFfbG9jYWxfbW9kaWZpZXJzXCI6XCIyXCIsXCJzZWN0aW9uXzJfcGlwZWxpbmVfN19zY29wZV9zd2l0Y2hlclwiOlwiMFwiLFwic2VjdGlvbl8yX3BpcGVsaW5lXzhfZHluYW1pY18wX3Bvc3Rfc2VhcmNoXCI6XCI3XCIsXCJzZWN0aW9uXzNfcGlwZWxpbmVfMF9zaWRlYmFyX2NvbW11bml0eV9pbmZvXCI6XCIwXCJ9IiwiZXhwZXJpZW5jZV9zZWxlY3Rpb24iOiJw…"
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

About 7 posts per page in `posts`, plus `cursor`, an opaque string to pass back as `cursor` for the next page. Search results carry no post body (`selftext` is null), and `upvote_ratio` and `total_awards_received` are null. A search with no results returns `posts: []` for 0 credits.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.