example-data.com
Menu
Browse docs and collections

Overview

albums / #147

Coma

Coma

2010

countryjazz

Component variants

Related

Referenced by

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/albums/147" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/albums/147"
);
const album = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/albums.d.ts https://example-data.com/types/albums.d.ts
import type { Album } from "./types/albums";

const res = await fetch(
  "https://example-data.com/api/v1/albums/147"
);
const album = (await res.json()) as Album;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/albums/147"
)
album = res.json()

Response

{
  "id": 147,
  "artistId": 52,
  "title": "Coma",
  "slug": "coma-147",
  "releaseDate": "2010-11-24",
  "trackCount": 13,
  "durationSeconds": 4047,
  "genres": [
    "country",
    "jazz"
  ],
  "coverUrl": "https://picsum.photos/seed/album-147/500/500",
  "createdAt": "2024-08-22T21:09:22.960Z"
}