# spotify-get-track-info

> Get spotify track info

Latest version **1.0.2** (published 2024-11-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install spotify-get-track-info
pnpm add spotify-get-track-info
yarn add spotify-get-track-info
bun add spotify-get-track-info
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-11-13 |
| First published | 2024-01-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thanawut Promraungdet |
| Maintainers | promraungdet |
| Keywords | spotify, track, color, album |

## Links

- npm: https://www.npmjs.com/package/spotify-get-track-info
- Repository: https://github.com/promraungdet/spotify-get-track-info
- Homepage: https://github.com/promraungdet/spotify-get-track-info#readme
- Issues: https://github.com/promraungdet/spotify-get-track-info/issues
- npm.io page: https://npm.io/package/spotify-get-track-info

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.7.0

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2024-11-13
- 1.0.1 — 2024-11-13
- 1.0.0 — 2024-01-08

## README

# spotify-get-track-info
Spotify get track info

## Install

```bash
npm i spotify-get-track-info
```

## Examples

```bash
// CommonJS
const { getTrackInfo } = require('spotify-get-track-info')
// ES6
import { getTrackInfo } from "spotify-get-track-info"

const trackInfo = await getTrackInfo("1gar5NDxG2UBBdZSVYeVhI")
console.log(trackInfo)
```

## Output

```bash
{
    "trackColor": "#282828",
    "trackData": {
        "type": "track",
        "name": "พูดไม่ได้",
        "uri": "spotify:track:1gar5NDxG2UBBdZSVYeVhI",
        "id": "1gar5NDxG2UBBdZSVYeVhI",
        "title": "พูดไม่ได้",
        "artists": [
            {
                "name": "Potato",
                "uri": "spotify:artist:6RQyog3L4JlA8t8Bf56otE"
            }
        ],
        "coverArt": null,
        "releaseDate": {
            "isoString": "2021-11-14T00:00:00Z"
        },
        "duration": 291075,
        "maxDuration": 291075,
        "isPlayable": true,
        "isExplicit": false,
        "audioPreview": {
            "url": "https://p.scdn.co/mp3-preview/07f778b20bd10b6a4c917e3f9e74a994d220d208"
        },
        "hasVideo": false,
        "visualIdentity": {
            "backgroundBase": {
                "alpha": 255,
                "blue": 80,
                "green": 93,
                "red": 0
            },
            "backgroundTintedBase": {
                "alpha": 255,
                "blue": 46,
                "green": 57,
                "red": 0
            },
            "textBase": {
                "alpha": 255,
                "blue": 255,
                "green": 255,
                "red": 255
            },
            "textBrightAccent": {
                "alpha": 255,
                "blue": 255,
                "green": 255,
                "red": 255
            },
            "textSubdued": {
                "alpha": 255,
                "blue": 205,
                "green": 223,
                "red": 119
            },
            "image": [
                {
                    "url": "https://image-cdn-ak.spotifycdn.com/image/ab67616d00001e0289bfa76c6fc0ccfb08e7f29e",
                    "imageFormat": "JPEG",
                    "maxHeight": 300,
                    "maxWidth": 300
                },
                {
                    "url": "https://image-cdn-ak.spotifycdn.com/image/ab67616d0000485189bfa76c6fc0ccfb08e7f29e",
                    "imageFormat": "JPEG",
                    "maxHeight": 64,
                    "maxWidth": 64
                },
                {
                    "url": "https://image-cdn-ak.spotifycdn.com/image/ab67616d0000b27389bfa76c6fc0ccfb08e7f29e",
                    "imageFormat": "JPEG",
                    "maxHeight": 640,
                    "maxWidth": 640
                }
            ]
        },
        "relatedUri": "spotify:artist:6RQyog3L4JlA8t8Bf56otE",
        "embeded_uri": "spotify:track:1gar5NDxG2UBBdZSVYeVhI",
        "backgroundColor": "#282828"
    }
}
```

---
_Source: https://npm.io/package/spotify-get-track-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
