REDDIT API
Search
Retrieve search from Reddit with a single API request.
GET
/api/data/v1/reddit/search1credit base cost
Request parameters
Up to 1 creditSearch query
Search posts or comments
Sort by. Comment search supports relevance, new, and top; comment_count is for post search only.
Post search timeframe
Used to paginate to next page
Set to true for a trimmed down version of the response
Live requests use your prepaid balance. Cached responses cost zero where supported.
curl --request GET \
--url 'https://fetchgoblin.com/api/data/v1/reddit/search' \
--header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'Response
Example{
"success": true,
"posts": [
{
"id": "w63dgy",
"author": "Morgentau7",
"author_fullname": "t2_2hy2xjit",
"subreddit": "MadeMeSmile",
"title": "Player realizes that he nearly stole the dogs job",
"downs": 0,
"name": "t3_w63dgy",
"upvote_ratio": 0.97,
"ups": 220403,
"total_awards_received": 0,
"score": 220403,
"created": 1658580900,
"num_comments": 1246,
"url": "https://www.reddit.com/r/MadeMeSmile/comments/w63dgy/player_realizes_that_he_nearly_stole_the_dogs_job/",
"subreddit_subscribers": 11605207,
"is_video": true,
"created_utc": 1658580900
}
],
"after": "t3_1izmcgx",
"credits_charged": 1,
"credits_remaining": 1000,
"request_id": "00000000-0000-4000-8000-000000000000"
}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"
},
"posts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"author": {
"type": "string"
},
"author_fullname": {
"type": "string"
},
"subreddit": {
"type": "string"
},
"title": {
"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"
},
"credits_charged": {
"type": "integer",
"minimum": 0,
"description": "FetchGoblin credits charged for this request."
},
"credits_remaining": {
"type": "integer",
"description": "Your FetchGoblin credit balance after this request."
},
"request_id": {
"type": "string",
"format": "uuid",
"description": "FetchGoblin request identifier."
}
}
}