# Social Fetch API - Reddit endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 6 documented Reddit operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/reddit/subreddits Get Reddit subreddit Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/subreddits/get.mdx SDK: client.reddit.getSubreddit({ subreddit: "AbsoluteUnits" }) Parameters: - subreddit (optional, string) - Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing. - url (optional, string) - Optional subreddit URL for the request. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/reddit/subreddits?subreddit=AbsoluteUnits" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/reddit/subreddits/{subreddit}/posts List Reddit subreddit posts Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/subreddits/subreddit/posts/get.mdx SDK: client.reddit.listSubredditPosts({ subreddit: "AskReddit", sort: "hot" }) Parameters: - subreddit (required, string) - Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing. Lists posts for this subreddit. - sort (optional, string, enum: best | hot | new | top | rising) - Optional sort order for the returned posts. - timeframe (optional, string, enum: all | day | week | month | year) - Optional timeframe used with time-based sort orders. - cursor (optional, string) - Opaque pagination cursor from a previous response (`data.page.nextCursor`). Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/reddit/subreddits/AskReddit/posts?sort=best" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/reddit/subreddits/search Search Reddit subreddit Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/subreddits/search/get.mdx SDK: client.reddit.searchSubreddit({ subreddit: "Fitness", query: "push ups" }) Parameters: - subreddit (required, string) - Subreddit name, optional `r/` prefix, or Reddit subreddit URL. Must match Reddit's exact casing. Searches posts within this subreddit. - query (optional, string) - Search text to match against public subreddit posts. - sort (optional, string, enum: relevance | hot | top | new | comments) - Optional sort order for search results. Defaults to relevance when omitted. - timeframe (optional, string, enum: all | year | month | week | day | hour) - Optional time range filter for search results. Defaults to all when omitted. - cursor (optional, string) - Opaque pagination cursor returned by a previous response. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Disambiguation: Use `data.page.hasMore` and `data.page.nextCursor` for pagination rather than inferring completion from `data.totalResults` alone. curl "https://api.socialfetch.dev/v1/reddit/subreddits/search?subreddit=Fitness" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/reddit/posts/comments List Reddit post comments Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/posts/comments/get.mdx SDK: client.reddit.listPostComments({ url: "https://www.reddit.com/r/gadgets/comments/1tgimff/example/" }) Parameters: - url (required, string) - Link to the Reddit post whose comments should be listed. - cursor (optional, string) - Opaque cursor from a previous response to fetch another page of comments or replies. - trim (optional) - When true, requests a lighter response shape when available. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/reddit/posts/comments?url=https://www.reddit.com/r/gadgets/comments/1tgimff/aura_displays_debuts_new_portable_monitor_with/" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/reddit/posts/transcript Get Reddit post transcript Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/posts/transcript/get.mdx SDK: client.reddit.getPostTranscript({ url: "https://www.reddit.com/r/youseeingthisshit/comments/1oiu9xm/example/" }) Parameters: - url (required, string) - Link to the Reddit post or direct hosted video URL whose transcript should be returned. - language (optional, string) - Optional ISO 639-1 language code (two letters) to prefer when multiple caption tracks exist. Outcome field: `data.lookupStatus` in `found`, `not_found`, `lookup_failed` Disambiguation: Accepts Reddit post permalinks and direct hosted video URLs. curl "https://api.socialfetch.dev/v1/reddit/posts/transcript?url=https://www.reddit.com/r/youseeingthisshit/comments/1oiu9xm/football_nostalgiasaints_punter_head_coach_cant/" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/reddit/search Search Reddit posts Credit cost: 1 credit per successful request. Docs: https://www.socialfetch.dev/docs/api/v1/reddit/search/get.mdx SDK: client.reddit.search({ query: "webscraping" }) Parameters: - query (required, string) - Search query text for public Reddit posts. - sortBy (optional, string, enum: relevance | new | top) - Optional sort order for search results. - timeframe (optional, string, enum: all | day | week | month | year) - Optional time range filter for search results. - cursor (optional, string) - Opaque pagination cursor returned by a previous response. - trim (optional) - Whether to request a smaller response shape when available. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Disambiguation: Use `data.page.hasMore` and `data.page.nextCursor` for pagination rather than inferring completion from `data.totalResults` alone. curl "https://api.socialfetch.dev/v1/reddit/search?query=web scraping" \ -H "x-api-key: YOUR_API_KEY"