Browse docs and collections
Overview
songs / #741
Component variants
Medium
That Old Black Magic
· 6 min
Small
That Old Black Magic Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/741" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/741" ); 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/741"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/741"
)
song = res.json() Response
{
"id": 741,
"albumId": 69,
"artistId": 27,
"title": "That Old Black Magic",
"slug": "that-old-black-magic-741",
"trackNumber": 3,
"durationSeconds": 346,
"isExplicit": false,
"playCount": 34094382,
"createdAt": "2024-07-13T04:37:50.594Z"
}