Browse docs and collections
Overview
songs / #1207
Component variants
Medium
End of the Road
· 7 min
Small
End of the Road Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1207" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1207" ); 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/1207"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1207"
)
song = res.json() Response
{
"id": 1207,
"albumId": 114,
"artistId": 43,
"title": "End of the Road",
"slug": "end-of-the-road-1207",
"trackNumber": 6,
"durationSeconds": 427,
"isExplicit": false,
"playCount": 6097504,
"createdAt": "2024-02-28T08:51:16.034Z"
}