{"repo":"NFeruch/reddit2text","free":true,"listed":false,"github":"https://github.com/NFeruch/reddit2text","clone":"git clone https://github.com/NFeruch/reddit2text.git","description":"The Python toolkit for converting Reddit threads into organized text data. Extract and process Reddit content with ease!","language":"Python","stars":123,"topics":["api","conversion","convert","converter","llm","reddit","reddit-api","reddit-client","reddit-scraper","text"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"Reddit2Text reddit2text is the Python library designed to effortlessly transform any Reddit thread into clean, readable text data . Perfect for prompting to an LLM, performing NLP/data analysis, or simply archiving for offline use , reddit2text offers a straightforward interface to access and convert content from Reddit. Table of Contents - Installation - Quickstart - Example Code - Example Output - Extra Settings - Current Features - Planned Features - Contributions - License Installation Easy install using pip Developing from source: clone the repo and run make — see CONTRIBUTING.md. Quickstart First , you need to create a Reddit app to get your client id and client secret , in order to access the Reddit API. Here's a visual step-by-step guide I created to do this! Alternatively, you can look at Reddit's API documentation. Then , add your credentials. When using env vars: copy .env.example to .env and fill in your Reddit app values: The user agent can be anything you like, but we recommend following this convention according to Reddit's guidelines: ' : : (by )' This is enough to get started: Here is an example (truncated) output from the above code! https://pastebin.com/niQTGbys Extra Configuration - max comment depth , Optional[str] : - Maximum depth of comments to output. Includes the top-most comment. Defaults to None or -1 to include all. - comment delim , Optional[str] : - String/character used to indent comments according to their nesting level. Defaults to to mimic r","default_branch":null,"files":null,"tree":[],"storefront":"/r/NFeruch","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/NFeruch/reddit2text/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}