reddit-memes-api
v1.1.0
Published
Extract memes and jokes from reddit (Limited;unauthenticated)
Maintainers
Readme
Logo by u/RamenFish195
Available as node package
Installation
Install using npm or yarn
npm install reddit-memes-api
yarn add reddit-memes-apiAPI Reference
Type 1 - Get data
GET /${subreddit}| Parameter | Type | Description |
| :---------- | :------- | :-------------------------------------- |
| subreddit | string | Required. Need valid subreddit name |
| after | int | Optional. To go to next page |
| before | int | Optional. To go to previous page |
Type 2 - Get data
GET /${subreddit}/${memesare}?limit=${limit}| Parameter | Type | Description |
| :---------- | :------- | :----------------------------------------- |
| subreddit | string | Required. Need valid subreddit name |
| memesare | string | Required. Need valid memesare type |
| limit | int | Optional. Number of results to display |
| after | int | Optional. To go to next page |
| before | int | Optional. To go to previous page |
Type 3 - Get data
GET /${subreddit}/${memesare}/${freq}?limit=${limit}| Parameter | Type | Description |
| :---------- | :------- | :----------------------------------------- |
| subreddit | string | Required. Need valid subreddit name |
| memesare | string | Required. Need valid memesare type |
| freq | string | Required. Need valid frequency |
| limit | int | Optional. Number of results to display |
| after | int | Optional. To go to next page |
| before | int | Optional. To go to previous page |
Paramaters information
| Parameter | Type | Valid Paramaters |
| :---------- | :------- | :------------------------------------------------------- |
| subreddit | string | meme, memes, joke, jokes |
| memesare | string | hot, new, top, rising |
| freq | string | now, hour, day, week, month, year, all |
| limit | int | provide according to no. of contents exists in subreddit |
| after | int | go to the next page |
| before | int | go to the previous page |
Usage/Examples
https://....../memes
https://....../memes/hot
https://....../memes/hot?limit=100
https://....../memes/top/all
https://....../memes/top/all?limit=100Remove .... with actual url
Methods for node package
f1(subreddit)
f2(subreddit,memesare,limit)
f3(subreddit,memesare,freq,limit)env example
URL=https://reddit.com/r/
PORT=3000
# Rate Limiting
RATE_LIMIT_WINDOW=60000 # 1 minute (in ms)
RATE_LIMIT_MAX=60 # 60 requests per window per IP
# Caching
CACHE_TTL=30 # 30 secondsChangelog
Read the project changes in Changelog.md
Contributing
Contributions are always welcome!
See Contributing.md for ways to get started.
Please adhere to this project's Code Of Conduct.
Support
Support the project using Github sponsor. For issues/features or anything else visit Github repo and open a new issue.
License
This project is licensed under MIT License
