Browse docs and collections
Overview
songs / #102
Component variants
Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/102" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/102" ); 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/102"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/102"
)
song = res.json() Response
{
"id": 102,
"albumId": 10,
"artistId": 5,
"title": "Indian Reservation (The Lament Of The Cherokee Reservation Indian)",
"slug": "indian-reservation-the-lament-of-the-cherokee-reservation-indian-102",
"trackNumber": 12,
"durationSeconds": 211,
"isExplicit": false,
"playCount": 29104088,
"createdAt": "2023-11-12T21:12:36.955Z"
}