OpenAPI Specification
openapi: 3.1.0
info:
title: Xweather Weather Air Quality Fires API
description: The Xweather Weather API provides real-time and historical weather data including current conditions, forecasts, severe weather alerts, lightning data, air quality, maritime weather, and more. Backed by Vaisala, Xweather delivers science-backed hyper-local weather intelligence through a RESTful interface. Authentication uses a client ID and client secret passed as query parameters or HTTP headers.
version: 1.0.0
contact:
name: Xweather Support
url: https://www.xweather.com/support
termsOfService: https://www.xweather.com/legal/terms
servers:
- url: https://data.api.xweather.com
description: Xweather Weather API base URL
security:
- clientAuth: []
tags:
- name: Fires
description: Wildfire data
paths:
/fires/{location}:
get:
operationId: getWildfires
summary: Get Wildfire Data
description: Returns active and historical wildfire data for the US and Canada including type, cause, area, and percent contained.
tags:
- Fires
parameters:
- name: location
in: path
required: true
schema:
type: string
description: Location identifier or state/province code.
example: california
- name: client_id
in: query
required: true
schema:
type: string
description: Your Xweather API client ID.
- name: client_secret
in: query
required: true
schema:
type: string
description: Your Xweather API client secret.
- name: limit
in: query
required: false
schema:
type: integer
description: Maximum number of fire records to return.
- name: fields
in: query
required: false
schema:
type: string
description: Comma-separated list of fields to return.
responses:
'200':
description: Wildfire data
content:
application/json:
schema:
$ref: '#/components/schemas/FiresResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
components:
responses:
NotFound:
description: Not found - location or resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
Unauthorized:
description: Unauthorized - invalid client ID or secret
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
BadRequest:
description: Bad request - invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
schemas:
ApiResponse:
type: object
properties:
success:
type: boolean
description: Whether the request was successful.
error:
$ref: '#/components/schemas/ApiError'
required:
- success
ApiError:
type: object
properties:
code:
type: string
description: Error code string.
example: invalid_client
description:
type: string
description: Human-readable error description.
example: Invalid client ID or secret.
FiresResponse:
allOf:
- $ref: '#/components/schemas/ApiResponse'
- type: object
properties:
response:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
state:
type: string
country:
type: string
lat:
type: number
lon:
type: number
areaAcres:
type: number
description: Area burned in acres.
areaHectares:
type: number
description: Area burned in hectares.
containedPercent:
type: integer
description: Percentage of fire contained.
cause:
type: string
description: Cause of the fire.
type:
type: string
description: Fire type.
securitySchemes:
clientAuth:
type: apiKey
in: query
name: client_id
description: Xweather uses client_id and client_secret query parameters for authentication. Both are required on every request.