Skip to main content

Reddit

Overview

The Reddit source supports Full Refresh as well as Incremental syncs.

Full Refresh sync means every time a sync is run, Airbyte will copy all rows in the tables and columns you set up for replication into the destination in a new table. Incremental sync means only changed resources are copied from Reddit. For the first run, it will be a Full Refresh sync.

Steps for getting api_key

You can make a POST request from Postman to exchange your Reddit username and password for an api_key authorized to make requests.

First make an app to get the client ID and secret for authentication:

  1. Go to Reddit's App Preferences Page:
  • Visit https://www.reddit.com/prefs/apps, select create another app and input an app name. Select the script option and set the redirect URI as https://oauth.pstmn.io/v1/callback.
  1. Copy Your App Credentials:
  • After creating the app, you will see the Client ID (below your app name) and Client Secret (labeled as "secret").
  • Client ID: Copy this value as it will be your Authorization Username in Postman.
  • Client Secret: Copy this value as it will be your Authorization Password in Postman.
  1. Visit Postman via web or app and make a new request with following guidelines:
  • Request - POST https://www.reddit.com/api/v1/access_token
  • Authorization - Basic Auth -username: <YOUR_USERNAME>, password: <YOUR_PASSWORD>
  • Body - x-www-form-urlencoded - grant_type: password, username: YOUR_REDDIT_USERNAME, password: YOUR_REDDIT_PASSWORD

Hit send to receive api_key in the response under access_token

Records and rate limiting

  • The Reddit API has rate limiting of 100 queries per minute (QPM) per OAuth client ID. It is handled with an exponential backoff strategy, with maximum 3 retries.
  • If the api_key expires, a new access token will need to be generated through Postman.
  • The Reddit API has a hard limit of fetching 1000 records per single stream call with subsequent pagination.

Configuration

InputTypeDescriptionDefault Value
api_keystringAPI Key.
querystringQuery. Specifies the query for searching in reddits and subredditsairbyte
include_over_18booleanInclude over 18 flag. Includes mature contentfalse
exactbooleanExact. Specifies exact keyword and reduces distractions
limitnumberLimit. Max records per page limit1000
subredditsarraySubreddits. Subreddits for exploration[r/funny, r/AskReddit]
start_datestringStart date.

Streams

Stream NamePrimary KeyPaginationSupports Full SyncSupports Incremental
selfnameNo pagination
searchDefaultPaginator
subreddit_searchDefaultPaginator
message_inboxDefaultPaginator
subreddit_popularDefaultPaginator
subreddit_exploreDefaultPaginator

Changelog

Expand to review
VersionDatePull RequestSubject
0.0.22024-10-2847542Update dependencies
0.0.12024-08-2344579Initial release by btkcodedev via Connector Builder
Was this page helpful?