Reddit JSON API: How to Access Reddit Data in JSON Format

Reddit exposes a hidden JSON interface on almost every page. Append .json to any URL to get structured data. Here's how to use it.

The .json Trick

Almost every Reddit page has a JSON counterpart. Just append .json to the end of any Reddit URL, and you get the same data in structured JSON format instead of the rendered HTML page.

Examples:

| URL | JSON Equivalent |

|-----|----------------|

| reddit.com/r/programming | reddit.com/r/programming.json |

| reddit.com/r/AskReddit/hot | reddit.com/r/AskReddit/hot.json |

| reddit.com/user/spez/comments | reddit.com/user/spez/comments.json |

| reddit.com/r/python/comments/abc123/title | reddit.com/r/python/comments/abc123/title.json |

This works in any browser — just edit the URL and hit Enter. You'll see raw JSON data that includes everything the page would normally display, plus metadata that isn't visible in the UI.

What's in the JSON Response?

A typical subreddit listing response includes a top-level object with kind: "Listing" and a data object containing a children array. Each child has a kind field (like t3 for posts) and a data object with fields such as title, author, subreddit, score, num_comments, created_utc, selftext (post body), url, and permalink.

The response also includes after and before fields for pagination.

Key thing types:

Common Endpoints

Subreddit Listings

Append .json to any subreddit sort URL:

reddit.com/r/SUBREDDIT/hot.json

reddit.com/r/SUBREDDIT/new.json

reddit.com/r/SUBREDDIT/top.json?t=week

reddit.com/r/SUBREDDIT/rising.json

The t parameter for top posts accepts: hour, day, week, month, year, all.

Post Comments

reddit.com/r/SUBREDDIT/comments/POST_ID.json

This returns an array with two listings: the post itself and its comment tree.

User Profiles

reddit.com/user/USERNAME/submitted.json

reddit.com/user/USERNAME/comments.json

reddit.com/user/USERNAME/about.json

Search

reddit.com/search.json?q=search+terms&limit=25

reddit.com/r/SUBREDDIT/search.json?q=search+terms&restrict_sr=on

Pagination

Reddit returns 25 items per page by default. You can request up to 100 by adding limit=100 to the query string.

To get the next page, use the after value from the response as a query parameter:

reddit.com/r/python.json?limit=100&after=t3_abc123

Keep paginating until after is null — that means you've reached the end. Note that the total depth is still limited to approximately 1,000 items per listing, the same cap that applies to saved posts and other lists.

Rate Limits

When using the JSON endpoints without authentication:

For higher rate limits (60 requests/minute), you need to authenticate through Reddit's OAuth2 API. This requires registering an application at reddit.com/prefs/apps.

Practical Uses

Quick Data Grabs

Need to pull the top 10 posts from a subreddit for a report? The JSON endpoint is the fastest way. Use a tool like curl to fetch the URL and pipe it through a JSON formatter.

Building Bots and Tools

The JSON API is often the starting point for Reddit bots, notification systems, and data analysis tools. While the official API (via OAuth) is preferred for production use, the .json trick is useful for prototyping.

Monitoring Subreddits

Some developers use the JSON feed with simple polling to monitor subreddits for new posts matching specific criteria — keywords, score thresholds, or specific authors.

Exporting Thread Data

If you want to archive an entire thread (post + all comments), the JSON endpoint gives you everything in one request. Add limit=500 to get more comments per request (the maximum). For threads with thousands of comments, you'll need to follow the "more comments" links in the response.

The Full Reddit API

The .json trick is a subset of Reddit's full API. For more advanced use cases — posting, voting, managing your account, or accessing private data like your saved posts — you need to use the authenticated API.

Getting started with the full API:

  1. Create an app at reddit.com/prefs/apps
  2. Choose "script" for personal use or "web app" for a user-facing tool
  3. Use OAuth2 to authenticate
  4. Access endpoints at oauth.reddit.com instead of reddit.com

Libraries like PRAW (Python) and Snoowrap (JavaScript) wrap this API and handle authentication for you.

If you're specifically interested in working with your saved posts programmatically, tools like Readdit Later handle the API authentication and data retrieval automatically — it connects to Reddit via OAuth and syncs your saves into a searchable local library without requiring any coding.

Important Notes


Related: