Browse docs and collections
Overview
songs / #810
Component variants
Medium
Cry Like a Baby
· 7 min
Small
Cry Like a Baby Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/810" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/810" ); 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/810"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/810"
)
song = res.json() Response
{
"id": 810,
"albumId": 76,
"artistId": 31,
"title": "Cry Like a Baby",
"slug": "cry-like-a-baby-810",
"trackNumber": 4,
"durationSeconds": 437,
"isExplicit": false,
"playCount": 2906200,
"createdAt": "2023-05-15T08:15:14.000Z"
}