Browse docs and collections
Overview
songs / #2642
Component variants
Medium
Baby Come Back
· 4 min
Small
Baby Come Back Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/2642" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/2642" ); 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/2642"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/2642"
)
song = res.json() Response
{
"id": 2642,
"albumId": 251,
"artistId": 88,
"title": "Baby Come Back",
"slug": "baby-come-back-2642",
"trackNumber": 11,
"durationSeconds": 219,
"isExplicit": false,
"playCount": 48787433,
"createdAt": "2022-04-11T22:54:43.896Z"
}