{"id":25739642,"url":"https://github.com/anthonykrivonos/turnip-bot","last_synced_at":"2025-06-28T21:32:11.397Z","repository":{"id":40716291,"uuid":"268447241","full_name":"anthonykrivonos/turnip-bot","owner":"anthonykrivonos","description":" 🧄 Scrape Reddit for the best Turnip prices in Animal Crossings: New Horizons!","archived":false,"fork":false,"pushed_at":"2023-03-04T23:11:32.000Z","size":960,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-24T17:17:42.378Z","etag":null,"topics":["animal","animal-crossing","bot","crossing","horizons","new","new-horizons","reddit","scraper","turnip","turnip-price"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/anthonykrivonos.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}},"created_at":"2020-06-01T06:53:30.000Z","updated_at":"2021-10-30T04:19:00.000Z","dependencies_parsed_at":"2023-02-17T22:25:27.247Z","dependency_job_id":null,"html_url":"https://github.com/anthonykrivonos/turnip-bot","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/anthonykrivonos/turnip-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonykrivonos%2Fturnip-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonykrivonos%2Fturnip-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonykrivonos%2Fturnip-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonykrivonos%2Fturnip-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonykrivonos","download_url":"https://codeload.github.com/anthonykrivonos/turnip-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonykrivonos%2Fturnip-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261856267,"owners_count":23220434,"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":["animal","animal-crossing","bot","crossing","horizons","new","new-horizons","reddit","scraper","turnip","turnip-price"],"created_at":"2025-02-26T08:29:20.102Z","updated_at":"2025-06-28T21:32:11.197Z","avatar_url":"https://github.com/anthonykrivonos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧄 turnip-bot\n\nScrape Reddit for the best Turnip prices in **Animal Crossings: New Horizons**!\n\n\u003e Disclaimer: Use at your own discretion. This code is licensed under the MIT license (see [LICENSE.md](LICENSE.md)) and is free for anyone to use or modify. All authors of this package are removed of any liabilities concerning usage of turnip-bot.\n\n## 🐗 Usage (NPM)\n\n`npm install turnip-bot --save`\n\n```\nimport { subscribeToNewPosts, Post } from 'turnip-bot`\n\n// Should the bot log its progress? It's helpful to do so.\nconst verbose = true\n\n// Polling interval in seconds (min 15)\nconst pollingInterval = 30\n\n// Called whenever a new post is scraped\nconst onNewPost = (post:Post) =\u003e {\n    console.log('Got new post')\n    console.log(post)\n}\n\nsubscribeToNewPosts(onNewPost, pollingInterval, verbose)\n```\n\n## 🦝 Usage (Local)\n\n1. Clone the repo.\n```\ngit clone https://github.com/anthonykrivonos/turnip-bot.git\n```\n\n2. Install dependencies.\n```\ncd turnip-bot \u0026\u0026 npm install\n```\n\n3. Run `turnip-bot`! The following will save the scraper result to `./dist/data/my_database.json` every 30 seconds.\n```\nnpm run reddit my_database 30\n```\nYou can also simply call the following, which will save the scraper result to `./dist/data/reddit_database.json` every 15 seconds.\n```\nnpm run reddit\n```\n\n## 🔷 Output Shape\n\nThe result is always returned as a `Post` object.\n\n#### Post\n\n- **`id`** (`string`): *The unique ID of the post.*\n- **`type`** (`'buy'|'sell'`): *`buy` denotes that the Nooklings are buying turnips, while `sell` denotes that Daisy Mae is selling turnips.*\n- **`price`** (`number`): *The price of the turnips, in bells.*\n- **`url`** (`string`): *A direct link to the post.*\n- **`title`** (`string`): *The original title of the post.*\n- **`body`** (`string?`): *The unformatted body of the post.*\n- **`poster`** (`Poster`): *The original poster (OP).*\n\nWithin a `Post` object is an object called `Poster`, which contains information on the user who made the post.\n\n#### Poster\n\n- **`username`** (`string?`): *The OP's username on the platform the information was scraped from.*\n- **`friendCode`** (`string?`): *The OP's Nintendo Switch friend code*\n- **`profileUrl`** (`string?`): *The link to the OP's profile on the platform the information was scraped from.*\n- **`acName`** (`string?`): *The OP's name in Animal Crossing: New Horizons.*\n- **`acIslandName`** (`string?`): *The OP's island name in Animal Crossing: New Horizons.*\n\n## Author\n\nAnthony Krivonos ([Portfolio](https://anthonykrivonos.com/) | [LinkedIn](https://linkedin.com/in/anthonykrivonos))","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonykrivonos%2Fturnip-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonykrivonos%2Fturnip-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonykrivonos%2Fturnip-bot/lists"}