Browse docs and collections
Overview
songs / #986
Component variants
Medium
What a Fool Believes
· 5 min
Small
What a Fool Believes Related
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/986" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/986" ); 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/986"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/986"
)
song = res.json() Response
{
"id": 986,
"albumId": 94,
"artistId": 37,
"title": "What a Fool Believes",
"slug": "what-a-fool-believes-986",
"trackNumber": 10,
"durationSeconds": 296,
"isExplicit": true,
"playCount": 38059637,
"createdAt": "2022-10-12T20:16:23.763Z"
}