Look examples from Invidious and nitter:
You can get JSON or RSS feed for different endpoints by adding a query parameter
api to the URL. Add
type parameter with value
rss and it will return RSS instead of JSON. See below for examples.
Return JSON for the teddit frontpage:
Return RSS for teddit frontpage:
Return JSON for the /r/privacy
Return RSS for the /r/privacy
Return JSON for the user dEBRUYNE_1.
Return JSON for the user fluffyponyza, sorted as top feed from past year. https://teddit.net/u/fluffyponyza?sort=top&t=year&api
Return JSON for a post.
Search inside a subreddit
Return JSON for a search result inside a subreddit.
Teddit API has some URL query parameter flags which you can use:
Get full size post images in the subreddit a query parameter
full_thumbs. For example:
Get the same JSON response what you get from the official Reddit API. For example:
Get the raw JSON response (disables the encoding of <, >, and &). For example: https://teddit.net/r/LifeProTips?api&raw_json=1
selftext_html key, making the JSON/RSS significantly smaller.
After successfully setuping your instance, it's a good idea to add
maxmemory-policy configs to your redis.conf. For example:
redis.conf file and set
maxmemory value suitable for your server (e.g. 75% of your total RAM):
# nano /etc/redis/redis.conf
Add this to the end of the file:
Save and exit.
# systemctl restart redis
OAuth vs non-OAuth
In the config file
config.js you can set the
use_reddit_oauth key to
false. If the key is set to
true, teddit will use Reddit's API with OAuth (Reddit APP id
reddit_app_id is needed in the config file). If it's set to
false, teddit will use Reddit's API without OAuth (no Reddit APP id needed). Note: If you don't use Reddit OAuth, you might experience unexpected errors (rate limiting). The key is set to
false by default.