example-data.com
Menu
Browse docs and collections

songs

songs

Page 45 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": 1057,
      "albumId": 101,
      "artistId": 39,
      "title": "Wake Me Up Before You Go Go",
      "slug": "wake-me-up-before-you-go-go-1057",
      "trackNumber": 8,
      "durationSeconds": 121,
      "isExplicit": false,
      "playCount": 37796634,
      "createdAt": "2022-01-17T01:13:10.338Z"
    },
    {
      "id": 1058,
      "albumId": 101,
      "artistId": 39,
      "title": "Blue Suede Shoes",
      "slug": "blue-suede-shoes-1058",
      "trackNumber": 9,
      "durationSeconds": 295,
      "isExplicit": false,
      "playCount": 21366079,
      "createdAt": "2022-11-20T13:57:54.692Z"
    },
    {
      "id": 1059,
      "albumId": 101,
      "artistId": 39,
      "title": "Shining Star",
      "slug": "shining-star-1059",
      "trackNumber": 10,
      "durationSeconds": 199,
      "isExplicit": false,
      "playCount": 20587084,
      "createdAt": "2021-08-26T06:56:36.415Z"
    }
  ],
  "meta": {
    "page": 45,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=45&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=46&limit=24",
    "prev": "/api/v1/songs?page=44&limit=24"
  }
}