{"id":20247697,"url":"https://github.com/ixnoahlive/youtube-websocket","last_synced_at":"2025-04-10T21:32:13.549Z","repository":{"id":251993895,"uuid":"839078399","full_name":"ixnoahlive/youtube-websocket","owner":"ixnoahlive","description":"A rudimentary plug-and-play websocket for YouTube live chat!","archived":false,"fork":false,"pushed_at":"2024-09-06T23:24:01.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T18:52:37.673Z","etag":null,"topics":["bun","elysia","elysiajs","websocket","youtube","youtube-api","youtube-api-wrapper"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ixnoahlive.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}},"created_at":"2024-08-06T23:35:45.000Z","updated_at":"2024-10-21T02:15:26.000Z","dependencies_parsed_at":"2024-11-14T09:39:05.584Z","dependency_job_id":"58357a08-250a-4e0a-9b51-b90abd2ed230","html_url":"https://github.com/ixnoahlive/youtube-websocket","commit_stats":null,"previous_names":["noahthenerd/youtube-websocket"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnoahlive%2Fyoutube-websocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnoahlive%2Fyoutube-websocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnoahlive%2Fyoutube-websocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnoahlive%2Fyoutube-websocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixnoahlive","download_url":"https://codeload.github.com/ixnoahlive/youtube-websocket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248301591,"owners_count":21080920,"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":["bun","elysia","elysiajs","websocket","youtube","youtube-api","youtube-api-wrapper"],"created_at":"2024-11-14T09:38:55.611Z","updated_at":"2025-04-10T21:32:13.513Z","avatar_url":"https://github.com/ixnoahlive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# youtube-websocket\nA rudimentary plug-and-play websocket for YouTube live chat!\n* [x] Outputs messages with basic info\n* [x] Superchat support\n* [ ] Superchat sticker support\n* [ ] Member gifting support\n* [ ] Message pinning support\n\n*(Probably won't add any of those things, though...)*\n\n## Deploying\nYou can deploy this on any server by following these steps!\n* Install [Bun](https://bun.sh/) on your system\n* Clone this GitHub repo using `git clone`\n* Navigate to directory and run `bun i` to get deps\n* Run the server with `bun .`\n\nYou can also change the default port of `9905` to anything by creating a `.env` file and specifying the `PORT` property.\n\n```env\nPORT=1234\n```\n\n## Usage\nYou can use the endpoint `/c/\u003cid\u003e` to access live chat via a channel, this can be via a handle such as `ixnoah`, or the channel's id. It will always return the latest stream. If you want to get more specific, try using `/s/\u003cid\u003e` to access a stream via it's id. This can be found in the stream's URL.\n\n```ts\ninterface LiveChatMessage {\n    type: 'message';\n    id: string; \n    message: string;\n    author: {\n        name: string;\n        id: string;\n        verified: boolean;\n        moderator: boolean;\n    },\n    unix: number;\n}\n```\n\nBy default, superchats are disabled. You can enable these by adding a `?includeSuperchat=true` parameter to your websocket URL.\nBe warned, we do not convert currencies and the `purchase_amount` property is a string. The message may also be blank.\n\n```ts\ninterface LiveChatSuperchat {\n    type: 'superchat';\n    id: string;\n    purchase_amount: string,\n    hasMessage: boolean,\n    message: string | null;\n    author: {\n        name: string;\n        id: string;\n        verified: boolean;\n        moderator: boolean;\n    },\n    unix: number;\n}\n```\n\n## Special Thanks\n* [Ottomated](https://github.com/ottomated/youtube-websocket)\n    * made me lose $5 to cloudflare workers resulting in me making this project out of spite\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnoahlive%2Fyoutube-websocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixnoahlive%2Fyoutube-websocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnoahlive%2Fyoutube-websocket/lists"}