{"id":15201805,"url":"https://github.com/timeforaninja/node-ytsr","last_synced_at":"2025-10-02T18:30:53.591Z","repository":{"id":18264850,"uuid":"83908628","full_name":"TimeForANinja/node-ytsr","owner":"TimeForANinja","description":"Do anonymous YouTube search requests.","archived":true,"fork":false,"pushed_at":"2024-01-09T00:55:44.000Z","size":1185,"stargazers_count":287,"open_issues_count":24,"forks_count":66,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-12T11:39:49.288Z","etag":null,"topics":["deprecated","deprecated-repository","javascript","nodejs","search","youtube"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/TimeForANinja.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-04T16:45:21.000Z","updated_at":"2024-12-19T21:13:14.000Z","dependencies_parsed_at":"2024-01-09T02:57:11.728Z","dependency_job_id":"18c9b437-62b7-4ebf-87b4-b5f0c09b2a57","html_url":"https://github.com/TimeForANinja/node-ytsr","commit_stats":{"total_commits":289,"total_committers":24,"mean_commits":"12.041666666666666","dds":0.3391003460207612,"last_synced_commit":"90b9a434da040e45fe03fea91084188e105d0d9f"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimeForANinja%2Fnode-ytsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimeForANinja%2Fnode-ytsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimeForANinja%2Fnode-ytsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimeForANinja%2Fnode-ytsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimeForANinja","download_url":"https://codeload.github.com/TimeForANinja/node-ytsr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235031402,"owners_count":18925227,"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":["deprecated","deprecated-repository","javascript","nodejs","search","youtube"],"created_at":"2024-09-28T03:40:18.970Z","updated_at":"2025-10-02T18:30:48.193Z","avatar_url":"https://github.com/TimeForANinja.png","language":"HTML","readme":"# DEPRECATED \u003cnode-ytsr\u003e\n\nThis repo is no longer supported, please consider using the official api instead.\n\n# node-ytsr\n[![NPM version](https://img.shields.io/npm/v/ytsr.svg?maxAge=3600)](https://www.npmjs.com/package/ytsr)\n[![NPM downloads](https://img.shields.io/npm/dt/ytsr.svg?maxAge=3600)](https://www.npmjs.com/package/ytsr)\n[![codecov](https://codecov.io/gh/timeforaninja/node-ytsr/branch/master/graph/badge.svg)](https://codecov.io/gh/timeforaninja/node-ytsr)\n[![Known Vulnerabilities](https://snyk.io/test/github/timeforaninja/node-ytsr/badge.svg)](https://snyk.io/test/github/timeforaninja/node-ytsr)\n[![Discord](https://img.shields.io/discord/484464227067887645.svg)](https://discord.gg/V3vSCs7)\n\nSimple js only package to search for Youtube for Videos, Playlists and many more.\nDoes not require any login or Google-API-Key.\n\n# Support\nYou can contact us for support on our [chat server](https://discord.gg/V3vSCs7)\n\n# Usage\n\n```js\nconst ytsr = require('ytsr');\n\nconst searchResults = await ytsr('github');\n```\n\n\n# API\n### ytsr(searchString, [options])\n\nSearches for the given string\n\n* `searchString`\n    * search string or url (from getFilters) to search from\n* `options`\n    * object with options\n    * possible settings:\n    * gl[String] -\u003e 2-Digit Code of a Country, defaults to `US` - Allows for localisation of the request\n    * hl[String] -\u003e 2-Digit Code for a Language, defaults to `en` - Allows for localisation of the request\n    * safeSearch[Boolean] -\u003e pull items in youtube restriction mode.\n    * limit[integer] -\u003e limits the pulled items, defaults to 100, set to Infinity to get the whole list of search results - numbers \u003c1 result in the default being used\n    * pages[Number] -\u003e limits the pulled pages, pages contain 20-30 items, set to Infinity to get the whole list of search results - numbers \u003c1 result in the default limit being used - overwrites limit\n    * requestOptions[Object] -\u003e Additional parameters to passed to [miniget](https://github.com/fent/node-miniget), which is used to do the https requests\n\n* returns a Promise\n* [Example response](https://github.com/timeforaninja/node-ytsr/blob/master/example/example_search_output.txt)\n\n\n### ytsr.getFilters(searchString, options)\n\nPulls avaible filters for the given string or link\n\n#### Usage\n\n```js\nconst ytsr = require('ytsr');\n\nconst filters1 = await ytsr.getFilters('github');\nconst filter1 = filters1.get('Type').get('Video');\nconst filters2 = await ytsr.getFilters(filter1.url);\nconst filter2 = filters2.get('Features').get('Live');\nconst options = {\n  pages: 2,\n}\nconst searchResults = await ytsr(filter2.url, options);\n```\n\n* `searchString`\n    * string to search for\n    * or previously optained filter ref\n* `options`\n    * gl[String] -\u003e 2-Digit Code of a Country, defaults to `US` - Allows for localisation of the request\n    * hl[String] -\u003e 2-Digit Code for a Language, defaults to `en` - Allows for localisation of the request\n    * requestOptions[Object] -\u003e Additional parameters to passed to [miniget](https://github.com/fent/node-miniget), which is used to do the https requests\n* returns a Promise resulting in a `Map\u003cString, Map\u003cString, Filter\u003e\u003e`\n* [Example response](https://github.com/timeforaninja/node-ytsr/blob/master/example/example_filters_output.txt)\n\n### ytsr.continueReq(continuationData)\nContinues a previous request by pulling yet another page.  \nThe previous request had to be done using `pages` limitation.\n\n#### Usage\n```js\nconst ytsr = require('ytsr');\n\nconst firstResultBatch = await ytsr('github', { pages: 1 });\nconst secondResultBatch = ytsr.continueReq(firstResultBatch.continuation);\nconst thirdResultBatch = ytsr.continueReq(secondResultBatch.continuation);\n\n// You can now use the .items property of all result batches e.g.:\nconsole.log(firstResultBatch.items);\nconsole.log(secondResultBatch.items);\nconsole.log(thirdResultBatch.items);\n```\n\n* returns a Promise resolving into `{ continuation, items }`\n\n# Related / Works well with\n\n* [node-ytdl-core](https://github.com/fent/node-ytdl-core)\n* [node-ytpl](https://github.com/TimeForANinja/node-ytpl)\n\n\n# Install\n\n    npm install --save ytsr\n\n# License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeforaninja%2Fnode-ytsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimeforaninja%2Fnode-ytsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimeforaninja%2Fnode-ytsr/lists"}