Browse docs and collections
Overview
songs / #309
Component variants
Medium
Walk Don't Run
· 2 min
Small
Walk Don't Run Related
References
Request
curl example
curl -sS \ "https://example-data.com/api/v1/songs/309" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/songs/309" ); 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/309"
);
const song = (await res.json()) as Song; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/songs/309"
)
song = res.json() Response
{
"id": 309,
"albumId": 29,
"artistId": 14,
"title": "Walk Don't Run",
"slug": "walk-dont-run-309",
"trackNumber": 2,
"durationSeconds": 138,
"isExplicit": false,
"playCount": 7235936,
"createdAt": "2021-08-23T12:56:09.625Z"
}