Browse docs and collections
Overview
songs / #1648
Component variants
Medium
Nothing Compares 2 U
· 6 min
Small
Nothing Compares 2 U Related
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1648" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1648" ); const song = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/songs.d.ts https://example-data.com/types/songs.d.ts
import type { Song } from "./types/songs";
const res = await fetch(
"https://example-data.com/api/v1/songs/1648"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1648"
)
song = res.json() Response
{
"id": 1648,
"albumId": 158,
"artistId": 55,
"title": "Nothing Compares 2 U",
"slug": "nothing-compares-2-u-1648",
"trackNumber": 4,
"durationSeconds": 336,
"isExplicit": false,
"playCount": 25159205,
"createdAt": "2024-08-14T16:50:23.640Z"
}