example-data.com
Menu
Browse docs and collections

songs

songs

Page 29 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": 673,
      "albumId": 62,
      "artistId": 25,
      "title": "What a Fool Believes",
      "slug": "what-a-fool-believes-673",
      "trackNumber": 1,
      "durationSeconds": 367,
      "isExplicit": false,
      "playCount": 15845352,
      "createdAt": "2024-01-13T12:52:35.787Z"
    },
    {
      "id": 674,
      "albumId": 62,
      "artistId": 25,
      "title": "Tears of a Clown",
      "slug": "tears-of-a-clown-674",
      "trackNumber": 2,
      "durationSeconds": 416,
      "isExplicit": false,
      "playCount": 41287027,
      "createdAt": "2024-07-01T03:02:32.562Z"
    },
    {
      "id": 675,
      "albumId": 62,
      "artistId": 25,
      "title": "Aquarius/Let The Sunshine In",
      "slug": "aquariuslet-the-sunshine-in-675",
      "trackNumber": 3,
      "durationSeconds": 289,
      "isExplicit": false,
      "playCount": 36166118,
      "createdAt": "2024-01-04T02:46:13.034Z"
    }
  ],
  "meta": {
    "page": 29,
    "limit": 24,
    "total": 2978,
    "totalPages": 125
  },
  "links": {
    "self": "/api/v1/songs?page=29&limit=24",
    "first": "/api/v1/songs?page=1&limit=24",
    "last": "/api/v1/songs?page=125&limit=24",
    "next": "/api/v1/songs?page=30&limit=24",
    "prev": "/api/v1/songs?page=28&limit=24"
  }
}