Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-bus-stop/get-youtube-title
get the title of a youtube video in node.js or the browser.
https://github.com/goto-bus-stop/get-youtube-title
Last synced: 27 days ago
JSON representation
get the title of a youtube video in node.js or the browser.
- Host: GitHub
- URL: https://github.com/goto-bus-stop/get-youtube-title
- Owner: goto-bus-stop
- License: other
- Created: 2017-10-29T14:26:55.000Z (about 7 years ago)
- Default Branch: default
- Last Pushed: 2022-10-18T18:32:41.000Z (about 2 years ago)
- Last Synced: 2024-10-05T16:26:15.156Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://npmjs.com/package/get-youtube-title
- Size: 13.7 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# get-youtube-title
get the title of a youtube video in node.js or the browser.
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url][npm-image]: https://img.shields.io/npm/v/get-youtube-title.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/get-youtube-title
[travis-image]: https://img.shields.io/travis/goto-bus-stop/get-youtube-title.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/get-youtube-title
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard## Install
```
npm install get-youtube-title
```## Usage
```js
var getYoutubeTitle = require('get-youtube-title')getYoutubeTitle('ZjM8Wq5pQ2o', function (err, title) {
console.log(title) // 'SLCHLD - EMOTIONS (feat. RIPELY) (prod. by GILLA)'
})
```## API
### `getYoutubeTitle(id: string, key: string, function(err, title))`
`id` is the YouTube Video ID. If you have a video URL, use the [`get-youtube-id`](https://www.npmjs.com/package/get-youtube-id) module to find the video ID.
`key` is the YouTube API key. If one is not provided a default key is used. Note that this key may be disabled by YouTube if other users of this library send what it considers abusive requests.## License
[Apache-2.0](LICENSE.md)