How to get a Reddit API key

Reddit's approval process, where the client ID and secret live, the free and commercial limits, and how Social Fetch credentials differ.

RedditUpdated
RequestGET /v1/reddit/search
const base = "https://api.socialfetch.dev";
const path = "/v1/reddit/search?query=switching+from+Notion";
const res = await fetch(`${base}${path}`, {
headers: { "x-api-key": "YOUR_API_KEY" },
});
Response200 OK
{
"data": {
"query": "webscraping",
"posts": [
{
"id": "1sa1sgp",
"name": "t3_1sa1sgp",
// …
On this page

People who search for a "Reddit API key" usually want one of two things. One is Reddit's own OAuth credentials, for a bot, a mod tool or an app that acts on Reddit. The other is a way to pull public posts, comments and search results into a script or product. Reddit requires approval for its Data API. A Social Fetch key authenticates requests to Social Fetch; it is a separate credential.

This guide covers both: how Reddit's approval and app registration work, what "free" and the rate limits mean, and how to get a Social Fetch key for public Reddit data. To see what a search returns before you choose, try the free Reddit research tool.

Two different things called a Reddit API key

Reddit's Data APISocial Fetch Reddit routes
What you getA client ID; script and web apps also have a secretOne sfk_… key
How you get itRequest access, wait for approval, register an appCreate it on the API Keys page
Bots, mod tools, posting, inboxYes, within Reddit's termsNo
Public posts, comments, subreddits, searchYesYes
Private communitiesWith the right scopes and membershipNo, public only
Limits100 queries per minute per client ID for eligible free accessCredits and available service capacity
Commercial useReddit approval and a separate agreementPay per lookup; no Reddit permission is granted by the key

Background reading: Does Reddit have an API? and the Reddit platform page.

How to get an official Reddit API key

Reddit's Responsible Builder Policy requires explicit approval before API access. Registering an app or holding an old client ID does not establish permission for a new use.

Reddit's Responsible Builder Policy page on Reddit Help. The rule requiring approval before API access is boxed, with a label explaining that new apps need Reddit's approval first. The rest of the page is dimmed.
Reddit's Responsible Builder Policy: approval comes before any API access.
  1. Check whether Devvit fits. Reddit points non-commercial developers to its Developer Platform (Devvit) first. Devvit supports apps inside Reddit. If it cannot support your use, use Reddit's access-request route.
  2. Read the policy. Read the Responsible Builder Policy and Data API Terms for permitted uses. Do not submit duplicate requests for the same use case.
  3. File a Data Access Request. Open Reddit's request form (no Reddit login needed). Under What do you need assistance with? choose Data Access Request, enter your email, and pick the role that fits under Which role best describes your reason for requesting API access? The form then asks for details that depend on the role, such as what your app does, which subreddits it uses, and a link to its source code.
Reddit Help's Submit a request form with Data Access Request selected and the role menu open, listing I'm a developer, I'm a researcher and I'm an enterprise partner/commercial developer. The commercial option is boxed and labelled 'Selling Reddit data or a product built on it? This is your route'.
The role you pick decides the questions that follow. Commercial use has its own route.
  1. Wait for an answer. Reddit reviews each request and may turn it down. Academic researchers should follow the Reddit for Researchers instructions. That programme provides approved non-commercial research access through BigQuery Analytics Hub, rather than the OAuth app setup below.
  2. Register your app. If Reddit approves your request, follow its registration instructions. Where directed to the legacy app page, sign in with the approved account and open reddit.com/prefs/apps to create an app. Reddit's app-type documentation distinguishes these options: choose script for a program that only you run, web app for a server-side app other people sign in to, or installed app for a mobile or desktop app that can't keep a secret.

For an app that signs people in, use the redirect URI required by your integration. It is the address Reddit sends the person back to after they authorise your app, and must match the URI in your OAuth request exactly. Follow Reddit's approval instructions if they differ from the legacy form.

Reddit's create application form at reddit.com/prefs/apps, filled in with the name social-fetch-docs, the script type and a localhost redirect uri, with the reCAPTCHA ticked. Beside create app, Reddit has printed: In order to create an application or use our API you can read our full policies here, followed by the Responsible Builder Policy link. That line is boxed and labelled Not approved for the API yet: Reddit refuses and points to its policy
Without approval, create app goes no further: Reddit points you to its Responsible Builder Policy. Once approved, your app's client ID sits under its name and the secret inside its edit panel.
  1. Get an access token. For an approved script or server-side web app reading without a user context, Reddit's application-only OAuth documentation describes the client_credentials flow below. Installed apps use a different flow. The wiki is legacy technical guidance; Reddit's current approval and terms still apply.

Set REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRET in your local environment first, and replace your_username in the User-Agent with your Reddit username. Keep secrets out of browser code and source control.

Request
bash

Use the descriptive User-Agent required by the Data API wiki. To act as another Reddit user, use an approved user-authorisation flow with that person's consent and only the scopes your app needs. Follow the returned expires_in value when renewing tokens.

Reddit's Data API wiki requires removal of deleted posts and comments from your stored data. For deleted accounts, remove author-identifying information. Check your approved retention requirements before storing results.

Reddit API key vs client ID

Reddit doesn't give you a single api_key string. A registered app has:

  • a client ID, the short string shown under the app's name. Most tutorials mean this when they say "Reddit API key";
  • a client secret, for script and web apps. Installed apps have none;
  • access tokens, which your code obtains through the OAuth flow for its app type. These authenticate API requests and expire.

If your app list at reddit.com/prefs/apps is empty, check which account you signed in with and whether app registration completed. If creation is blocked by the Responsible Builder Policy notice, return to your access request; completing a CAPTCHA does not grant approval.

A few errors come up often once you have credentials:

  • 401 Unauthorized when requesting a token: check the client ID, secret and HTTP Basic authentication. Make sure the grant supports your app type.
  • invalid_grant: check the grant parameters. For a user-authorisation flow, check the code and registered redirect URI; do not reuse an expired or already-used code.
  • 429 Too Many Requests: you went over the rate limit below.
  • 403 Forbidden or a blocked page: check your approval, token scopes and access to the requested resource. Unauthenticated access can be blocked too; a client ID alone does not authenticate a request.

A Social Fetch key is a different kind of credential: one sfk_… key, sent as x-api-key, for public data only. See the Reddit API reference.

Is the Reddit API free?

Reddit provides free access to eligible approved uses, within the rate limit below. Free access is not an automatic entitlement.

Commercial Data API use needs a separate agreement under section 3.1 of Reddit's Data API Terms. Ask Reddit about eligibility and pricing for your use; this guide cannot promise approval or a price.

A free, non-commercial approval doesn't cover a brand-monitoring product, customer-facing enrichment or a paid research tool. For costs and alternatives, see Reddit API pricing and the best Reddit data APIs.

Reddit API rate limits

Reddit's Data API wiki sets the free limit at 100 queries per minute per OAuth client ID. It's averaged over a window (currently 10 minutes), to support bursts within that average. Check the linked wiki before sizing a workload.

The Rate Limits section of Reddit's Data API wiki, with the rest of the page dimmed. The three headers X-Ratelimit-Used, X-Ratelimit-Remaining and X-Ratelimit-Reset are boxed and labelled 'Read these headers to stay under it'; '100 queries per minute (QPM) per OAuth client id' is boxed and labelled 'The free limit, per app'.
Reddit's published limit for free access, and the headers that show how much you have left.

Each response carries three headers: X-Ratelimit-Used, X-Ratelimit-Remaining and X-Ratelimit-Reset (seconds until the window resets). Slow down when Remaining gets low rather than waiting for a 429. Fetching another page uses another request.

Social Fetch's paid Reddit routes have no request quota; requests spend credits. When capacity is full, a request may return 503 temporarily_unavailable with a Retry-After header, which isn't charged. See Credits and Errors.

Get a Social Fetch key for public Reddit data

Social Fetch's Reddit routes accept a Social Fetch key, so you do not supply a Reddit client ID, secret or token. They return public data as JSON. This technical setup does not grant Reddit approval or permission for a particular use. Check Reddit's Responsible Builder Policy, including its commercial and research requirements, before collecting or using Reddit data.

  1. Create a free account or sign in.
  2. Open API Keys, type a name for the key and click Create key.
The API keys page in the Social Fetch dashboard, with 'Reddit research' typed in the Name field. The card holding Name, Expires and the Create key button is boxed and labelled 'Name the key, then click Create key'.
Name your Social Fetch key. This key authenticates Social Fetch requests.
  1. Copy the key from the Save your API key window. It starts with sfk_ and is shown only once.
  2. Try a search in the Playground: choose Reddit, then Search. Enter switching from Notion in query, then click Send. The Playground uses your signed-in workspace and spends its credits; you do not paste a key.
The Social Fetch Playground after a Search Reddit posts request for 'switching from Notion'. '1 credit' and the 200 status are boxed and labelled 'One credit, no Reddit app or OAuth'; the posts array in the JSON response is labelled 'Public posts that match the search'. The post author's username is blurred.
A real search: public posts as JSON, 1 credit, and no Reddit credentials.
  1. Store the copied key in a local environment variable named SOCIALFETCH_API_KEY. Call the same route from your own code with the key in the x-api-key header. Keep it on your server, out of public repositories and browser code. Add timeframe (day, week, month, year or all) to limit how far back the search goes.
Request
bash

A search costs 1 credit. You're charged for a lookup that completes, even if it finds nothing; lookups that fail (502 lookup_failed, 503 temporarily_unavailable) are free. Successful responses say what they cost in meta.creditsCharged; failures use the separate error envelope.

The other Reddit routes fetch a subreddit, its posts, a single post, a post's comments, and search within one subreddit. See the Reddit API reference. These routes do not grant access to private communities or inboxes. Check the endpoint's documented outcome fields when a lookup returns no data.

Which key do you need?

Request Reddit's own access when you're building something that acts on Reddit: a bot, a mod tool, an app people sign in to with their Reddit account, or anything that posts, votes or reads an inbox. Use Reddit's approved app and OAuth flow for those actions.

Use a Social Fetch key to authenticate public-data requests to Social Fetch. Decide whether your intended use is permitted separately from choosing the API. To see what that looks like in practice, read Reddit product research or the Reddit research recipe.

FAQ

Why does Reddit send me back to the Responsible Builder Policy?

Check your access-request status and follow Reddit's response. An app-creation form or a completed CAPTCHA does not guarantee API access. Do not create more accounts or duplicate requests to get around a refusal.

Can I put a Social Fetch key into a Reddit OAuth integration?

No. A field asking for a Reddit client ID or client secret expects Reddit credentials. A Social Fetch key belongs in the x-api-key header on requests to api.socialfetch.dev.

Can I recover a Social Fetch key after closing the save window?

The full secret is shown only once. Create a replacement on API Keys, update the application that uses it, then revoke the old key. The key prefix in the list is only for identifying a key.

Share this article

Try the API

Profiles, posts, comments and metrics on 87 platforms through one REST API.

Try the Playground