# @megatroncupcakes/get-youtube-id-by-url

> Get YouTube channel or video id by url!

Latest version **1.0.0** (published 2023-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @megatroncupcakes/get-youtube-id-by-url
pnpm add @megatroncupcakes/get-youtube-id-by-url
yarn add @megatroncupcakes/get-youtube-id-by-url
bun add @megatroncupcakes/get-youtube-id-by-url
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-07-12 |
| First published | 2023-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 2 |
| Unpacked size | 12.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | megatroncupcakes |
| Keywords | youtube, youtube id, youtube channel id, youtube video id, get youtube id, get youtube channel id, get youtube video id, youtube url, google |

## Links

- npm: https://www.npmjs.com/package/@megatroncupcakes/get-youtube-id-by-url
- Repository: https://github.com/MegatronCupcakes/node-get-youtube-id-by-url
- Issues: https://github.com/MegatronCupcakes/node-get-youtube-id-by-url/issues
- npm.io page: https://npm.io/package/@megatroncupcakes/get-youtube-id-by-url

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.12

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-07-12

## README

# Get YouTube ID By Url (Node.js Library)

Get YouTube channel or video id by url!

## Report Issues

Please report any bugs you discover at <https://github.com/MegatronCupcakes/node-get-youtube-id-by-url/issues>

## Installation

Node.js 12.0.0 or newer is required.

### With NPM

```sh-session
npm install @megatroncupcakes/get-youtube-id-by-url
```

## Examples

```javascript
import { channelId, videoId, channelIconById, channelIconByName } from '@megatroncupcakes/get-youtube-id-by-url'
```

### Get YouTube Channel ID By Url

```javascript
channelId('YouTube Channel Url').then((id) => {
  console.log(id)
})
```

Support URL format:

- https://www.youtube.com/channel/xxxxxxxxxxxxxxxxxxxxxxxx
- https://www.youtube.com/c/xxxxxxxx
- https://www.youtube.com/user/xxxxxxxx

### Get YouTube Video ID By Url

```javascript
videoId('YouTube Video Url').then((id) => {
  console.log(id)
})
```

Support URL format:

- https://www.youtube.com/watch?v=xxxxxxxxxxx
- https://youtu.be/xxxxxxxxxxx

### Get YouTube Channel Icon By Channel ID

```javascript
channelIconById('YouTube Channel ID').then((iconUrl) => {
  console.log(iconUrl)
})
```
### Get YouTube Channel Icon By Channel Name

```javascript
channelIconByName('YouTube Channel Name').then((iconUrl) => {
  console.log(iconUrl)
})
```

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/@megatroncupcakes/get-youtube-id-by-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
