{"id":30659299,"url":"https://github.com/tanosshi/reddit-scraper","last_synced_at":"2026-01-20T17:00:10.527Z","repository":{"id":311924433,"uuid":"1045664481","full_name":"tanosshi/reddit-scraper","owner":"tanosshi","description":"Scrape any type of reddit content","archived":false,"fork":false,"pushed_at":"2025-09-06T09:32:48.000Z","size":567,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-17T09:20:23.791Z","etag":null,"topics":["api","image","javascript","js","media","nextjs","nodejs","reddit","scrape","scraper","video"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@tanosshi/reddit-scraper","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanosshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-08-27T14:26:08.000Z","updated_at":"2025-09-05T12:57:29.000Z","dependencies_parsed_at":"2025-08-27T22:32:17.585Z","dependency_job_id":"e7c2fb01-4f9a-4708-a191-b1f9ab1c2eba","html_url":"https://github.com/tanosshi/reddit-scraper","commit_stats":null,"previous_names":["tanosshi/reddit-scraper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tanosshi/reddit-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanosshi%2Freddit-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanosshi%2Freddit-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanosshi%2Freddit-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanosshi%2Freddit-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanosshi","download_url":"https://codeload.github.com/tanosshi/reddit-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanosshi%2Freddit-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","image","javascript","js","media","nextjs","nodejs","reddit","scrape","scraper","video"],"created_at":"2025-08-31T12:47:41.986Z","updated_at":"2026-01-20T17:00:10.507Z","avatar_url":"https://github.com/tanosshi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reddit-scraper\n\n_@tanosshi/reddit-scraper is a quick and simple reddit scraper, to not bloat your own code up_\n\n\u003cimg src=\"thumbnail.png\" alt=\"tanos.fm thumb\" width=\"800px\" style=\"border-radius: 10px; margin: 10px;\"\u003e\n\n## 🚀 How to use (quickly)\n\n### 📦 Installation\n\n```bash\nnpm install @tanosshi/reddit-scraper\n```\n\n\u003e **💡 Info:** Node.js v18 or higher is highly recommended!\n\n### 🛠️ Usage\n\n## In a file\n\n```js\nconst { scrape, download } = require(\"@tanosshi/reddit-scraper\");\n\n// Only download the image file, if present.\nconst imagePath = await download(\"https://reddit.com/r/.../comments/...\", { outDir: \"out\", userAgent: \"...\" });\n\n// Scrape post content\nconst res = await scrape(\"https://reddit.com/r/.../comments/...\", {\n  outDir: \"out\",\n  download: true, // download: true | false\n  userAgent: \"...\", // userAgent: {STRING} or leave empty\n  mode: \"all\", // mode: 'video' | 'image' | 'text' | 'full_media' | 'comments' | 'all'\n});\n\n// res = { title, selftext?, imageUrl?, imagePath?, textPath?, commentsPath? }\n})();\n```\n\n## CLI\n\n```bash\n# Basic\nnpx reddit-scraper \u003credditPostUrl\u003e\n\n# Output to directory\nnpx reddit-scraper \u003credditPostUrl\u003e --out './out/'\n\n# Modes (default is --image)\nnpx reddit-scraper \u003credditPostUrl\u003e --text\nnpx reddit-scraper \u003credditPostUrl\u003e --full-media\nnpx reddit-scraper \u003credditPostUrl\u003e --comments\nnpx reddit-scraper \u003credditPostUrl\u003e --all\n\n# Help\nnpx reddit-scraper --help\n```\n\n## Outputs\n\nConsole: `{\"title\":\"...\",\"imagePath\":\"out/img.jpg\",\"textPath\":\"out/post.txt\",\"commentsPath\":\"out/post.comments.txt\"}`\n\nText file structures:\n\n```bash\nTitle: \u003ctitle\u003e\nAuthor: u/\u003cauthor\u003e\nSubreddit: r/\u003csubreddit\u003e\nURL: https://www.reddit.com/...\n\n\u003cselftext or \"(no text body)\"\u003e\n```\n\nComment files are full with threads\n\n---\n\n### 🤔 Options\n\n#### Output Directory\n\n- `outDir`: Output folder path (created if missing)\n- `download`: Whether to download it in the first place or not (only works in .scrape())\n- `userAgent`: Use a custom user agent incase the default one is flagged\n\n#### Modes\n\n- `video`: Video only\n- `image`: Image only\n- `text`: Text only\n- `full_media`: Image + Text\n- `comments`: Comments only\n- `all`: Image + Text + Comments\n\n_made with ❤️ by tanos_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanosshi%2Freddit-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanosshi%2Freddit-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanosshi%2Freddit-scraper/lists"}