Browse docs and collections
Overview
songs / #912
Component variants
Medium
Cheek to Cheek
· 3 min
Small
Cheek to Cheek Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/912" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/912" ); 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/912"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/912"
)
song = res.json() Response
{
"id": 912,
"albumId": 88,
"artistId": 35,
"title": "Cheek to Cheek",
"slug": "cheek-to-cheek-912",
"trackNumber": 3,
"durationSeconds": 160,
"isExplicit": false,
"playCount": 22724586,
"createdAt": "2023-01-11T02:51:03.871Z"
}