🧙‍♂️ Restmancer API – Weather Endpoints

🔙 Back to Homepage

This page documents the available REST endpoints for fetching mock weather data such as temperature, humidity, and condition.


GET /api/weather

Returns fake weather data for cities. You can filter by city, limit the number of records, or select only specific fields.

Optional Query Parameters:
Examples:

Fields Available

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

Example: GET /api/weather?fields=city,temp,condition&limit=3

import requests

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

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