ZioMark's HUB | API Documentation
DiscordAbout Me
  • 🔳Introduction
    • 🔐Authentication
  • 🔲GET Endpoints
    • ▫️Dec to Hex
    • ▫️Hex to Dec
    • ▫️Timetamp to Date
    • ▫️CFX
    • ▫️Date
    • ▫️Date & Time Formatter
    • ▫️Text over Image
    • ▫️Image over Image
    • ▫️Weather
    • ▫️Translate
    • ▫️Convert Currency
    • ▫️Geolocation
    • ▫️QR Code Generator
    • ▫️Image Format Converter
    • ▫️Key Generator
    • 🌐Bored
    • ▫️BMI Calculator
    • ▫️VAT Calculator
    • ▫️SEO Analyzer
    • ▫️Local Time
    • ▫️Discount Calculator
    • ▫️Discount Discover
  • 🔲POST Endpoints
    • ▫️HTML to PDF
    • ▫️Loan Calculator
    • ▫️Excel to CSV
Powered by GitBook
On this page
  • /weather
  • Query Parameters
  • Example Usage
  • Response
  1. GET Endpoints

Weather

/weather

This endpoint retrieves weather information for a specified city. It accepts a GET request with query parameters including the city, format, and lang. If any of these parameters are missing, it returns a custom HTML page indicating missing parameters. If the city is not found, it throws an error. If the weather data is successfully fetched, it returns the temperature, weather description, time of observation, and the city name. If the weather data retrieval fails or an error occurs, it returns a corresponding error message with a status code of 500.

Query Parameters

Parameter
Type
Description

city

string

The name of the city for which weather data is requested.

format

string

The format of the temperature (e.g., 'metric', 'imperial', 'standard').

lang

string

The language code for the response (e.g., 'en', 'fr', 'es').

Example Usage

GET /weather?city=London&format=metric&lang=en

Response

{
  "temperature": 20,
  "description": "Cloudy",
  "time": "10:30:00 AM",
  "city": "London"
}
PreviousImage over ImageNextTranslate

Last updated 1 year ago

🔲
▫️