example-data.com
Menu
Browse docs and collections

songs

songs

Page 111 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": 2641,
      "albumId": 251,
      "artistId": 88,
      "title": "Sing, Sing, Sing (With A Swing)",
      "slug": "sing-sing-sing-with-a-swing-2641",
      "trackNumber": 10,
      "durationSeconds": 253,
      "isExplicit": false,
      "playCount": 39118112,
      "createdAt": "2022-06-19T12:10:08.926Z"
    },
    {
      "id": 2642,
      "albumId": 251,
      "artistId": 88,
      "title": "Baby Come Back",
      "slug": "baby-come-back-2642",
      "trackNumber": 11,
      "durationSeconds": 219,
      "isExplicit": false,
      "playCount": 48787433,
      "createdAt": "2022-04-11T22:54:43.896Z"
    },
    {
      "id": 2643,
      "albumId": 251,
      "artistId": 88,
      "title": "Turn! Turn! Turn! (To Everything There is a Season)",
      "slug": "turn-turn-turn-to-everything-there-is-a-season-2643",
      "trackNumber": 12,
      "durationSeconds": 354,
      "isExplicit": false,
      "playCount": 39187445,
      "createdAt": "2022-01-18T21:05:06.343Z"
    }
  ],
  "meta": {
    "page": 111,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=111&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=112&limit=24",
    "prev": "/api/v1/songs?page=110&limit=24"
  }
}