{"id":13630332,"url":"https://github.com/markets/suchtube","last_synced_at":"2025-07-27T20:39:12.864Z","repository":{"id":57374091,"uuid":"111942374","full_name":"markets/suchtube","owner":"markets","description":"🔍 📼 YouTube search as a service, with Slack integration and CLI","archived":false,"fork":false,"pushed_at":"2019-11-16T14:21:57.000Z","size":290,"stargazers_count":27,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-22T09:44:21.101Z","etag":null,"topics":["cli","nodejs","search-videos","service","slack","youtube","youtube-api","youtube-search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/markets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-24T17:32:20.000Z","updated_at":"2024-12-17T20:17:47.000Z","dependencies_parsed_at":"2022-09-17T16:50:28.248Z","dependency_job_id":null,"html_url":"https://github.com/markets/suchtube","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/markets/suchtube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markets%2Fsuchtube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markets%2Fsuchtube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markets%2Fsuchtube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markets%2Fsuchtube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markets","download_url":"https://codeload.github.com/markets/suchtube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markets%2Fsuchtube/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267417664,"owners_count":24083839,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","nodejs","search-videos","service","slack","youtube","youtube-api","youtube-search"],"created_at":"2024-08-01T22:01:38.923Z","updated_at":"2025-07-27T20:39:12.804Z","avatar_url":"https://github.com/markets.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# SuchTube\n\n[![](https://img.shields.io/npm/v/suchtube.svg?style=flat-square)](https://www.npmjs.com/package/suchtube)\n[![](https://img.shields.io/travis/markets/suchtube.svg?style=flat-square)](https://travis-ci.org/markets/suchtube)\n[![Help Contribute to Open Source](https://www.codetriage.com/markets/suchtube/badges/users.svg)](https://www.codetriage.com/markets/suchtube)\n\n\u003e Youtube Search as a service\n\nSuchTube is a server and a CLI app to search videos on YouTube.\n\nThe server responds to multiple formats, even comes with [Slack integration](#slack-integration):\n\n- `html` at `GET /search.html?q=cats`\n- `json` at `GET /search.json?q=cats`\n- `text` at `GET /search.text?q=cats`\n- `slack` at `POST /search.slack` + Slack payload\n\nThe CLI allows you to search videos without leaving the terminal:\n\n    \u003e suchtube funny cats\n    \u003e suchtube football top goals --random --open\n\nOr start the server:\n\n    \u003e suchtube --server\n\nYou can also use the search part [as a library](#usage-as-a-library).\n\n## Installation and usage\n\n### Requirements\n\n- Node.js\n\nCurrently this package officially supports (and is tested against) Node v8.3+. If you need to manage different Node environments, a version manager (like [creationix/nvm](https://github.com/creationix/nvm) or [tj/n](https://github.com/tj/n)) is recommended.\n\n- YouTube Data API key\n\nShould be loaded in current shell as an environment variable named `SUCHTUBE_YOUTUBE_DATA_API_V3`.\n\n### Install\n\nVia npm:\n\n    \u003e npm install -g suchtube\n    \u003e suchtube --help\n\nVia GitHub:\n\n- Clone this repo and `cd` into it.\n- Run `npm install`\n- Run `npm start` to start the server\n- Run `bin/suchtube -h` to use the CLI\n\nThe server listens by default on port 3333, if you want to change this, you can do it via the `PORT` environment variable. If you're starting the server using the SuchTube CLI, you can also set the port by:\n\n    \u003e suchtube --server --port 4444\n\n## Options\n\nOptions while using the CLI are available in the following formats: `--time=10` or `--time 10`. For the server, you should pass the options along with the query, inside the `q` paramater, ie: `?q=funny+cats+--time=10`.\n\n- `--time=10`, `-t=10`\n\nStarts the video at the given time in seconds.\n\n- `--random`, `-r`\n\nReturns a random video taking into account the given topic.\n\n- `--open`, `-o` *(CLI only)*\n\nOpens the video in your browser.\n\n- `--full`, `-f` *(CLI only)*\n\nDisplays full video's information. It corresponds to hit `GET /search.json?q=` against the server.\n\n## Usage as a library\n\nYou can use the SuchTube search as a library:\n\n```js\nconst suchtube = require('suchtube')\n\nsuchtube.search('funny cats', { random: true }).then(video =\u003e {\n  console.log(video.title)\n  console.log(video.link)\n  console.log(video.publishedAt)\n})\n```\n\n## Slack integration\n\n`/suchtube funny cats --random`\n\nTo integrate SuchTube in your Slack workspace, read the following guides: https://api.slack.com/slash-commands.\n\nBasically, you should run the server, make it publicly available (via URL or IP) and create a custom Slash Command pointing to your instance URL.\n\n## Contributing\n\nAny kind of idea, suggestion or bug report are really welcome! Just fork the repo, make your hack and send a pull request.\n\nThanks to all contributors, you rock :metal:\n\n## Development\n\nStart the server in development mode (`nodemon` + debugging):\n\n    \u003e npm run dev\n\nRun tests:\n\n    \u003e npm test\n\n## License\n\nCopyright (c) Marc Anguera Insa. SuchTube is released under the [MIT](LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkets%2Fsuchtube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkets%2Fsuchtube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkets%2Fsuchtube/lists"}