About This Service
The Dartastic Weather API provides current weather information for any location through a simple REST API. It's designed to be easy to use in your Dart, Flutter, and web applications.
Note: This is a public API that doesn't require authentication.
Live Demo
Click the button to see the Weather API in action (uses your current location)
Weather data will appear here
Using the API
To get weather data, make a GET request to the weather endpoint with latitude and longitude:
GET /weather?lat=37.7749&lon=-122.4194
Response Format
{
"coord": {
"lon": -122.4194,
"lat": 37.7749
},
"weather": [
{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}
],
"main": {
"temp": 14.25,
"feels_like": 13.34,
"temp_min": 12.12,
"temp_max": 16.11,
"pressure": 1018,
"humidity": 78
},
"wind": {
"speed": 2.68,
"deg": 250
},
"clouds": {
"all": 0
},
"name": "San Francisco"
}
Integration Example
Here's a simple example using the Dart http package:
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<Map<String, dynamic>> getWeather(double latitude, double longitude) async {
final response = await http.get(
Uri.parse('https://weather.dartastic.io/weather?lat=$latitude&lon=$longitude'),
);
if (response.statusCode == 200) {
return jsonDecode(response.body);
} else {
throw Exception('Failed to load weather: ${response.body}');
}
}
Rate Limiting
Requests are limited to 100 requests per minute per IP address.
Documentation
For detailed documentation, please visit the Dartastic Documentation.