Browse docs and collections
Overview
songs / #1928
Component variants
Medium
Sentimental Journey
· 8 min
Small
Sentimental Journey Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1928" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1928" ); 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/1928"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1928"
)
song = res.json() Response
{
"id": 1928,
"albumId": 183,
"artistId": 65,
"title": "Sentimental Journey",
"slug": "sentimental-journey-1928",
"trackNumber": 8,
"durationSeconds": 454,
"isExplicit": true,
"playCount": 40106042,
"createdAt": "2022-05-11T11:08:44.971Z"
}