Restmancer API - Restaurants

This page documents the available REST endpoints for fetching mock restaurant data such as name, cuisine, rating, and address.

GET /api/restaurants

Returns fake restaurant data. You can filter by cuisine, limit the number of records, or select specific fields.

Optional Query Parameters:

  • cuisine – Cuisine type (e.g., Italian).
  • limit – Number of restaurants to return.
  • fields – Comma-separated list of fields (e.g. name,cuisine,priceRange).

Examples:

Fields Available

  • id
  • name
  • cuisine
  • rating
  • address
  • city
  • phone
  • priceRange
  • description
  • image

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

Example: GET /api/restaurants?fields=name,cuisine,rating&limit=3

import requests

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

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