Restmancer API - Songs

This page documents the available REST endpoints for fetching mock music data such as title, artist, album, genre, and release year.

GET /api/songs

Returns fake song data. You can filter by genre, limit the number of results, or select specific fields.

Optional Query Parameters:

  • genre – Music genre (e.g., Pop).
  • limit – Number of songs to return.
  • fields – Comma-separated list of fields (e.g. title,artist,genre).

Examples:

Fields Available

  • id
  • title
  • artist
  • album
  • genre
  • duration
  • releaseYear
  • cover

You can customize the song response by controlling fields and limit.

Example: GET /api/songs?fields=title,artist,genre&limit=3

import requests

url = "https://restmancer.vercel.app/api/songs"
response = requests.get(url)
print(response.json())
fetch("https://restmancer.vercel.app/api/songs")
  .then(res => res.json())
  .then(data => console.log(data));
const axios = require("axios");

axios.get("https://restmancer.vercel.app/api/songs")
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });
curl "https://restmancer.vercel.app/api/songs"