REDDIT API
Subreddit Posts
Retrieve subreddit posts from Reddit with a single API request.
GET
/api/data/v1/reddit/subreddit1credit base costZero-credit cache supported
Request parameters
Up to 1 creditSubreddit name
Timeframe to get posts from
Sort order
After to get more posts. Get 'after' from previous response.
Set to true for a trimmed down version of the response
If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Caching page for details.]
Live requests use your prepaid balance. Cached responses cost zero where supported.
curl --request GET \
--url 'https://fetchgoblin.com/api/data/v1/reddit/subreddit' \
--header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'Response
Example{
"success": true,
"credits_charged": 1,
"posts": [
{
"id": "1lfbo7u",
"author": "Vetro_Nodulare2",
"author_fullname": "t2_16syu27ar1",
"subreddit": "AskReddit",
"title": "What is a thing you love that lots of people hate?",
"link_flair_text": null,
"selftext": "",
"selftext_html": "",
"downs": 0,
"name": "t3_1lfbo7u",
"upvote_ratio": 0.9,
"ups": 45,
"total_awards_received": 0,
"score": 45,
"created": 1750341959,
"num_comments": 349,
"url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/",
"subreddit_subscribers": 56146328,
"is_video": false,
"created_utc": 1750341959
}
],
"after": "t3_1lfogps"
}Example data from the API specification. Run a request to retrieve current data.
Response shape
This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.
View JSON Schema +
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"credits_remaining": {
"type": "integer"
},
"credits_charged": {
"type": "integer"
},
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"author_fullname": {
"type": "string"
},
"subreddit": {
"type": "string"
},
"title": {
"type": "string"
},
"link_flair_text": {
"type": [
"string",
"object",
"array",
"number",
"boolean",
"null"
]
},
"selftext": {
"type": "string"
},
"selftext_html": {
"type": "string"
},
"downs": {
"type": "integer"
},
"name": {
"type": "string"
},
"upvote_ratio": {
"type": "number"
},
"ups": {
"type": "integer"
},
"total_awards_received": {
"type": "integer"
},
"score": {
"type": "integer"
},
"created": {
"type": "integer"
},
"num_comments": {
"type": "integer"
},
"url": {
"type": "string"
},
"subreddit_subscribers": {
"type": "integer"
},
"is_video": {
"type": "boolean"
},
"created_utc": {
"type": "integer"
}
}
}
},
"after": {
"type": "string"
}
}
}