• Welcome
  • API Reference
Precipitation Data
    Daily Precipitation DatagetHourly Precipitation DatagetLast 48 Hours Precipitation DatagetRecent Rain Eventget
Soil Data
    Daily Soil MoisturegetHourly Soil MoisturegetSoil Temperatureget
Atmospheric Data
    Air TemperaturegetSpecific HumiditygetRelative HumiditygetWind SpeedgetWind GustsgetWind DirectiongetCloud CovergetSolar Radiationget
Bulk Export
    Create Bulk Exportpost
Map Services
    Esri Image Server IntegrationgetMap Layer TilesgetQueryget
Embed Widgets
    Embeddable HTML UIget
Other endpoints
    Redirect to Dev PortalgetRedirect to new Dev PortalgetMCP Serverpost
Schemas
powered by Zudoku
Precipitation & Weather Data API
Precipitation & Weather Data API

Embed Widgets

Endpointhttps://api.precip.ai

Embeddable UI components for web integration


Embeddable HTML UI

GET
https://api.precip.ai
/embed/location

Returns a complete, HTML page displaying comprehensive weather data for a specific location. See the examples page for more details.

Authorization headers set automatically from query parameters on this endpoint.

Embeddable HTML UI › query Parameters

lat
number · min: -90 · max: 90 · required

Latitude coordinate (-90 to 90) for the location center of the precipitation widget

Example: 42.378792
Default: 42.378792
lon
number · min: -180 · max: 180 · required

Longitude coordinate (-180 to 180) for the location center of the precipitation widget

Example: -83.7935
Default: -83.7935
apiKey
string · required

Your API key for authentication. Gets automatically applied as header.

Example: zpka_0b7a88ccf2254a3dab9a4fb7039b6b45_361969c9
units
string · enum

Unit system for displaying precipitation amounts and temperatures. 'metric' shows mm and °C, 'imperial' shows inches and °F.

Enum values:
metric
imperial
Default: metric
widgets
string

Comma-separated list of widget keys to display.

Available options: current, event, calendar, cumulative, total, precip, table, wind, temp, soiltemp, soilmoisture, snow

When not provided, shows all widgets.

Example: current,temp,precip

Embeddable HTML UI › Headers

Authorization
string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Embeddable HTML UI › Responses

Interactive precipitation widget HTML successfully retrieved. Returns a complete, self-contained HTML page optimized for iframe embedding.

string

Complete HTML page containing an interactive precipitation widget with charts, current conditions, and historical data. Includes embedded CSS and JavaScript for full functionality.

GET/embed/location
curl --request GET \
  --url 'https://api.precip.ai/embed/location?lat=42.378792&lon=-83.7935&apiKey=%3Cstring%3E' \
  --header 'Authorization: <string>'
shell
Example Responses
<iframe src="https://api.precip.ai/embed/location?lat=42.378792&lon=-83.7935&units=imperial&key=your-api-key" width="100%" height="400" frameborder="0" allowtransparency="true"></iframe>
html
How to embed the widget in your web application
text/html

Map ServicesOther endpoints