curl --request POST \
--url https://api.example.com/api/fetch-reddit \
--header 'Content-Type: application/json' \
--data '
{
"subreddits": "<string>",
"limit": 123,
"excludeUrls": [
"<string>"
],
"sortBy": "<string>",
"timeRange": "<string>",
"includeText": true
}
'{
"[].id": "<string>",
"[].title": "<string>",
"[].author": "<string>",
"[].subreddit": "<string>",
"[].url": "<string>",
"[].media_url": "<string>",
"[].thumbnail": {},
"[].score": 123,
"[].num_comments": 123,
"[].created_utc": 123,
"[].is_video": true,
"[].nsfw": true,
"[].spoiler": true
}Fetch media posts from specified subreddits with filtering and sorting
curl --request POST \
--url https://api.example.com/api/fetch-reddit \
--header 'Content-Type: application/json' \
--data '
{
"subreddits": "<string>",
"limit": 123,
"excludeUrls": [
"<string>"
],
"sortBy": "<string>",
"timeRange": "<string>",
"includeText": true
}
'{
"[].id": "<string>",
"[].title": "<string>",
"[].author": "<string>",
"[].subreddit": "<string>",
"[].url": "<string>",
"[].media_url": "<string>",
"[].thumbnail": {},
"[].score": 123,
"[].num_comments": 123,
"[].created_utc": 123,
"[].is_video": true,
"[].nsfw": true,
"[].spoiler": true
}r/ prefix or not.Examples:"pics,aww,cats""r/pics,r/aww""pics"hot - Currently trending postsnew - Most recent poststop - Highest scoring poststop sorting:hour - Past hourday - Past 24 hoursweek - Past weekmonth - Past monthyear - Past yearall - All timesortBy=topr/ prefix)curl -X POST "https://app.joip.io/api/fetch-reddit" \
-H "Content-Type: application/json" \
-d '{
"subreddits": "pics,aww",
"limit": 25
}'
curl -X POST "https://app.joip.io/api/fetch-reddit" \
-H "Content-Type: application/json" \
-d '{
"subreddits": "earthporn,spaceporn",
"limit": 50,
"sortBy": "top",
"timeRange": "week"
}'
curl -X POST "https://app.joip.io/api/fetch-reddit" \
-H "Content-Type: application/json" \
-d '{
"subreddits": "cats",
"limit": 25,
"excludeUrls": [
"https://i.redd.it/abc123.jpg",
"https://i.imgur.com/xyz789.png"
]
}'
curl -X POST "https://app.joip.io/api/fetch-reddit" \
-H "Content-Type: application/json" \
-d '{
"subreddits": "askreddit",
"limit": 10,
"includeText": true
}'
[
{
"id": "abc123",
"title": "Cute cat sleeping",
"author": "redditor123",
"subreddit": "cats",
"url": "https://reddit.com/r/cats/comments/abc123",
"media_url": "https://i.redd.it/abc123xyz.jpg",
"thumbnail": "https://b.thumbs.redditmedia.com/abc.jpg",
"score": 1234,
"num_comments": 56,
"created_utc": 1709280000,
"is_video": false,
"nsfw": false,
"spoiler": false
},
{
"id": "def456",
"title": "Amazing sunset",
"author": "photographer",
"subreddit": "pics",
"url": "https://reddit.com/r/pics/comments/def456",
"media_url": "https://i.imgur.com/def456.png",
"thumbnail": "https://i.imgur.com/def456s.png",
"score": 5678,
"num_comments": 123,
"created_utc": 1709283600,
"is_video": false,
"nsfw": false,
"spoiler": false
}
]
400 Bad Request
{
"message": "No valid subreddits provided"
}
503 Service Unavailable
{
"message": "Content integration is not configured. Please contact support.",
"error": "MISSING_CREDENTIALS"
}
404 Not Found
{
"message": "No media found in the specified subreddits",
"error": "NO_MEDIA_FOUND"
}
429 Too Many Requests
{
"message": "Reddit API rate limit exceeded. Please try again later.",
"error": "REDDIT_API_ERROR"
}
500 Internal Server Error
{
"message": "Failed to fetch posts from Reddit",
"error": "REDDIT_API_ERROR"
}
r/ prefix, URLs, etc.)