Weatherbit - Interactive Swagger UI Documentation
weatherbit · Location
This an interactive version of the documentation for the Weatherbit API. The base URL for the API is [http://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/) or [https://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/). Below is the Swagger UI documentation for the API. All API requests require the `key` parameter. An Example for a 48 hour forecast for London, UK would be `http://api.weatherbit.io/v2.0/forecast/hourly?lat=51.5072`&`lon=-0.1276`. See our [Weather API descr
Authentication
Sample Requests
Returns a group of Current Observations - Given a list of City IDs.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}?key=YOUR_API_KEY&lang=ar&units=S&marine=t&callback=example"import requests
params = {
"key": "YOUR_API_KEY",
"lang": "ar",
"units": "S",
"marine": "t",
"callback": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('lang', 'ar');
url.searchParams.set('units', 'S');
url.searchParams.set('marine', 't');
url.searchParams.set('callback', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}")
q := baseURL.Query()
q.Set("key", "YOUR_API_KEY")
q.Set("lang", "ar")
q.Set("units", "S")
q.Set("marine", "t")
q.Set("callback", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}")
uri.query = URI.encode_www_form({
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"marine" => "t",
"callback" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?cities={cities}?" . http_build_query([
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"marine" => "t",
"callback" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Returns current weather observation - Given a City ID.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}?key=YOUR_API_KEY&lang=ar&units=S&marine=t&include=minutely&callback=example"import requests
params = {
"key": "YOUR_API_KEY",
"lang": "ar",
"units": "S",
"marine": "t",
"include": "minutely",
"callback": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('lang', 'ar');
url.searchParams.set('units', 'S');
url.searchParams.set('marine', 't');
url.searchParams.set('include', 'minutely');
url.searchParams.set('callback', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}")
q := baseURL.Query()
q.Set("key", "YOUR_API_KEY")
q.Set("lang", "ar")
q.Set("units", "S")
q.Set("marine", "t")
q.Set("include", "minutely")
q.Set("callback", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}")
uri.query = URI.encode_www_form({
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"marine" => "t",
"include" => "minutely",
"callback" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?city_id={city_id}?" . http_build_query([
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"marine" => "t",
"include" => "minutely",
"callback" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Returns a group of Current Observations - Given a list of points (lat1, lon1), (lat2, lon2), (latN, lonN), ...
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}?key=YOUR_API_KEY&lang=ar&units=S&callback=example"import requests
params = {
"key": "YOUR_API_KEY",
"lang": "ar",
"units": "S",
"callback": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('lang', 'ar');
url.searchParams.set('units', 'S');
url.searchParams.set('callback', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}")
q := baseURL.Query()
q.Set("key", "YOUR_API_KEY")
q.Set("lang", "ar")
q.Set("units", "S")
q.Set("callback", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}")
uri.query = URI.encode_www_form({
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"callback" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/current?points={points}?" . http_build_query([
"key" => "YOUR_API_KEY",
"lang" => "ar",
"units" => "S",
"callback" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Weatherbit - Interactive Swagger UI Documentation?
Weatherbit - Interactive Swagger UI Documentation is a Location API. Developers commonly use location APIs for:
- tracking assets and vehicles in real time
- building delivery and logistics apps
- finding nearby businesses or services
- geo-fencing and location-based notifications
- address validation and autocomplete
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Weatherbit - Interactive Swagger UI Documentation is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?