{"id":19500477,"url":"https://github.com/antonvanassche/redditapi","last_synced_at":"2026-05-16T03:33:21.427Z","repository":{"id":110294261,"uuid":"560847336","full_name":"AntonVanAssche/RedditAPI","owner":"AntonVanAssche","description":"A shitty unofficial Reddit API to retrieve posts from SPECIFIC subreddits.","archived":false,"fork":false,"pushed_at":"2024-01-02T10:39:02.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T10:12:45.528Z","etag":null,"topics":["api","flask","reddit","reddit-api","reddit-scraper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonVanAssche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-02T12:02:15.000Z","updated_at":"2022-11-02T12:30:32.000Z","dependencies_parsed_at":"2025-01-08T10:12:30.246Z","dependency_job_id":"1275f70e-2566-4fde-a965-c9645dccb32a","html_url":"https://github.com/AntonVanAssche/RedditAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2FRedditAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2FRedditAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2FRedditAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2FRedditAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonVanAssche","download_url":"https://codeload.github.com/AntonVanAssche/RedditAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240748140,"owners_count":19851213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","flask","reddit","reddit-api","reddit-scraper"],"created_at":"2024-11-10T22:08:40.403Z","updated_at":"2026-05-16T03:33:21.392Z","avatar_url":"https://github.com/AntonVanAssche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\n        \u003cs\u003eShitty\u003c/s\u003e Reddit API\n    \u003c/h1\u003e\n    \u003cp align=\"center\"\u003e\n        A \u003cs\u003eshitty\u003c/s\u003e unofficial Reddit API to retrieve posts from \u003cstrong\u003eSPECIFIC\u003c/strong\u003e subreddits.\n    \u003c/p\u003e\n    \u003cimg src=\"./assets/Preview.png\" width='75%'\u003e\n\u003c/div\u003e\n\n## How it works\n\nThis API uses Praw to retrieve the data and the Flask web framework to display the data in **JSON** format.\nTo get a **RANDOM** post from a **SPECIFIC** subreddit you'll have to provide the subreddit a the endpoint of the url.\n\n**NOTE**: This API is meant to be hosted locally.\n\n### Example\n\nTo get a random post from the [`r/memes`](https://www.reddit.com/r/memes/) subreddit you'll have to navigate to the following URL.\n\n- **Endpoint**: `/memes`\n- **Full URL**: [http://127.0.0.1:5000/memes/](http://127.0.0.1:5500/memes/)\n- **Returns**:\n\n```json\n{\n  \"author\": \"Fast-Quit9212\",\n  \"code\": 200,\n  \"image_previews\": [\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=108\u0026crop=smart\u0026auto=webp\u0026s=cb8bd59e5ec9a5658e169880c2e43b3b6adcf724\",\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=216\u0026crop=smart\u0026auto=webp\u0026s=dfd663b6c3dbe2d8711c2c63732f419dffa7ebd1\",\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=320\u0026crop=smart\u0026auto=webp\u0026s=c778c8ba62647254fd63fd077b6dcf5e2786b31f\",\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=640\u0026crop=smart\u0026auto=webp\u0026s=f280fd49b564c0009831b7b365dd7bd8cc9994d5\",\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=960\u0026crop=smart\u0026auto=webp\u0026s=ae99d90e798d2294b115877846aa72bd98fac35d\",\n    \"https://preview.redd.it/bds66o1lvhx91.jpg?width=1080\u0026crop=smart\u0026auto=webp\u0026s=ff9602ae65146013cf117d4bab20cfc123ac17aa\"\n  ],\n  \"nsfw\": false,\n  \"post_link\": \"https://redd.it/yjz2j9\",\n  \"spoilers_enabled\": true,\n  \"subreddit\": \"memes\",\n  \"title\": \"I wanted lemonade!!!\",\n  \"ups\": 17,\n  \"url\": \"https://i.redd.it/bds66o1lvhx91.jpg\"\n}\n```\n\n## How to install\n\nYou can install te bot by entering the following commands in your terminal:\n\n```bash\n$ git clone https://github.com/AntonVanAssche/RedditAPI.git # Clone the repository\n$ cd RedditAPI # Go to the directory\n$ pip3 install -r requirements.txt # Install dependencies\n```\n\nOnce you have successfully cloned the project and installed the dependencies, you'll have to create a `.env` file with your Reddit credentials. \nYou can generate a token in [Reddit preferences](https://old.reddit.com/prefs/apps) under `create another app`.\n\n```\nCLIENT_ID='YOUR CLIENT ID'\nCLIENT_SECRET='YOUR CLIENT SECRET'\nUSER_AGENT='Comment Extraction (by /u/YOUR_REDDIT_USERNAME)'\n```\n\nOnce you have successfully configured the `.env` file, you can start the API by running the following command in your terminal:\n\n```bash\n$ python src/main.py\n```\n\nThat's it!.\nIf you encountered any issues while installing the API, feel free to [report them here](https://github.com/AntonVanAssche/RedditAPI/issues/new).\n\n## References\n\n- [PRAW Documentation](https://praw.readthedocs.io/en/stable/index.html)\n- [Flask Documentation](https://flask.palletsprojects.com/en/2.2.x/)\n- [python-dotenv Documentation](https://github.com/theskumar/python-dotenv#getting-started)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonvanassche%2Fredditapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonvanassche%2Fredditapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonvanassche%2Fredditapi/lists"}