Browse docs and collections
Overview
songs / #1982
Component variants
Medium
Knock Three Times
· 2 min
Small
Knock Three Times Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/1982" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/1982" ); 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/1982"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/1982"
)
song = res.json() Response
{
"id": 1982,
"albumId": 187,
"artistId": 67,
"title": "Knock Three Times",
"slug": "knock-three-times-1982",
"trackNumber": 11,
"durationSeconds": 130,
"isExplicit": false,
"playCount": 41460737,
"createdAt": "2021-11-06T11:19:52.576Z"
}