example-data.com
Menu
Browse docs and collections

songs

songs

Page 92 of 125.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/songs?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/songs?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/songs";

const res = await fetch(
  "https://example-data.com/api/v1/songs?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Song>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/songs",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 2185,
      "albumId": 205,
      "artistId": 72,
      "title": "Cry Like a Baby",
      "slug": "cry-like-a-baby-2185",
      "trackNumber": 12,
      "durationSeconds": 366,
      "isExplicit": false,
      "playCount": 12739248,
      "createdAt": "2021-10-13T10:40:25.810Z"
    },
    {
      "id": 2186,
      "albumId": 205,
      "artistId": 72,
      "title": "Stormy Weather (Keeps Rainin' All the Time)",
      "slug": "stormy-weather-keeps-rainin-all-the-time-2186",
      "trackNumber": 13,
      "durationSeconds": 284,
      "isExplicit": false,
      "playCount": 17242969,
      "createdAt": "2023-01-28T05:02:12.908Z"
    },
    {
      "id": 2187,
      "albumId": 206,
      "artistId": 73,
      "title": "Duke of Earl",
      "slug": "duke-of-earl-2187",
      "trackNumber": 1,
      "durationSeconds": 400,
      "isExplicit": true,
      "playCount": 24043526,
      "createdAt": "2023-04-11T01:37:55.434Z"
    }
  ],
  "meta": {
    "page": 92,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=92&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=93&limit=24",
    "prev": "/api/v1/songs?page=91&limit=24"
  }
}