Reddit Post Fetcher

Database: Checking... Total Posts: -

Fetch Posts from Reddit

Browse & Filter Posts

Click "Apply Filters" to load posts

Export Posts

API Endpoints

Access your Reddit posts data via REST API endpoints

Get Posts by Subreddit

GET /api/r/:subreddit
Authentication:
  • token - API token (query parameter) OR
  • X-API-Token - API token (header) OR
  • Authorization: Bearer TOKEN - API token (header)
Query Parameters:
  • format - Response format: json (default), csv
  • dateFrom - Filter from date (YYYY-MM-DD)
  • dateTo - Filter to date (YYYY-MM-DD)
  • keywords - Comma-separated keywords
  • questionOnly - true for questions only
  • minScore - Minimum score filter
  • sortBy - Sort: created_utc, oldest, title, score, comments
  • limit - Number of posts to return (default: 100, max: 1000)
  • offset - Pagination offset (default: 0)
  • columns - Custom columns for CSV (format: key:Header,key:Header)
Example (with token in URL):
Alternative: Use X-API-Token: YOUR_API_TOKEN header or Authorization: Bearer YOUR_API_TOKEN header instead of query parameter

Get All Posts (All Subreddits)

GET /api/posts
Authentication: (same as above)
  • Use token query parameter, X-API-Token header, or Authorization: Bearer TOKEN header
Query Parameters: (same as above, plus)
  • subreddit - Filter by specific subreddit (optional)
Example:

Get Questions Only

GET /api/r/:subreddit?questionOnly=true
Query Parameters:
  • questionOnly=true - Filter to only return posts with question titles
  • format - Response format: json (default), csv
  • All other parameters from above also apply
Example (JSON with token):
Alternative: Use X-API-Token: YOUR_API_TOKEN header or Authorization: Bearer YOUR_API_TOKEN header instead of query parameter
Example (CSV with token):
Alternative: Use X-API-Token: YOUR_API_TOKEN header or Authorization: Bearer YOUR_API_TOKEN header instead of query parameter

API Builder

Build your API URL with filters:

Cloudflare Worker Setup

Deploy a Cloudflare Worker to fetch posts directly from Reddit's API through Cloudflare's edge network. This reduces load on your server and improves performance.

Step 1: Deploy Worker Code

Copy the code below and deploy it as a Cloudflare Worker. This worker fetches posts directly from Reddit's public API through Cloudflare's edge network.

Query Parameters:
  • subreddit - Subreddit name (default: all)
  • limit - Number of posts (default: 25, max: 100)
  • sort - Sort order: new, hot, top (default: new)
  • after - Pagination token (optional)

Note: No environment variables needed! This worker uses Reddit's public JSON endpoints.

Step 2: Configure Worker URL

Add REDDIT_WORKER_URL=https://your-worker.your-subdomain.workers.dev to your .env file and restart the server. The server will use this worker to fetch posts from Reddit.

Enter URL here to test. To actually use it, add REDDIT_WORKER_URL to your .env file.

Step 3: Use Worker for Fetching

Once you've added REDDIT_WORKER_URL to your .env file and restarted the server, the "Fetch Posts" tab will automatically use this worker to fetch posts from Reddit instead of making direct requests.

Benefits:
  • Reddit requests go through Cloudflare's edge network (faster, global CDN)
  • Reduced load on your server
  • Better rate limiting and caching
  • No CORS issues when fetching from Reddit
  • Works from any domain without CORS restrictions

⚠ Danger Zone

Permanently delete all posts from a subreddit. This action cannot be undone.

⚠ Warning:
  • This will permanently delete ALL posts from the selected subreddit
  • This action cannot be undone
  • All associated data will be removed from the database
Only subreddits with existing data are shown