The Pollen API returns pollen data for a specific location, including regional plant species, pollen types, pollen index, and health recommendations. It has a forecast endpoint (up to 5 days of daily data) and a heatmap tiles endpoint, covers over 65 countries, and has a resolution of 1 x 1 km.
Pollen API: key facts
- Product: Pollen API
- Category: Environment
- Platform: Web service (REST)
- Runs on: Server (backend code)
- Launch stage: GA
- Lifecycle: Active
- Overview: Pollen API overview
- Regional availability: Limited. Pollen data is available in over 65 countries; supported pollen types and plants vary by country. (coverage details)
Pollen API: when to use it
Use Pollen API when:
- You need a daily pollen forecast (up to 5 days) with pollen index values for tree, grass, and weed types at a latitude and longitude.
- You need plant species details for a location, such as season, appearance, cross-reactions, and plant pictures.
- You need health recommendations based on the pollen index level at a location.
- You need color-coded pollen heatmap tiles (tree, grass, weed) to overlay on a Google map, including in a browser with a browser-restricted API key.
Don't use Pollen API when:
- You need air quality index (AQI) or pollutant data rather than pollen data. Use Air Quality API instead.
- You need weather conditions or forecasts such as temperature or precipitation, not pollen levels. Use Weather API instead.
- You need rooftop solar energy potential for buildings. Use Solar API instead.
Pollen API: setup
- Service to enable:
pollen.googleapis.com - Authentication: API key, OAuth 2.0, Service account
- Get started: Set up Pollen API
- Reference: Pollen API reference
- Pricing: Pollen API usage and billing
- Policies: Pollen API policies
- Release notes: Pollen API release notes
Pollen API: related products
- Often used with: Maps JavaScript API, Air Quality API
Pollen API: common mistakes
- Problem: When a pollen type or plant is out of season and the pollen count is low, the response omits the
indexInfoobject. Code that expectsindexInfocan fail. Fix: TreatindexInfoas optional and handle the case where it's missing. See /maps/documentation/pollen/forecast. - Problem: Locations outside the supported country list return a 400 error with the message 'Information is unavailable for this location.' Fix: Check the coverage page before you send a request, and handle 400 responses for unsupported locations. See /maps/documentation/pollen/faq.
- Problem: When a supported location has no pollen data for the date,
pollenTypeInfoandplantInfocontain onlycodeanddisplayName, with no other data fields. Fix: Don't assume index or description fields exist. Check for each field before you use it. See /maps/documentation/pollen/faq. - Problem: Heatmap tile
XandYvalues that aren't valid for the zoom level (for example, (10,10) at zoom 2) return an error. Zoom must be 0-16. Fix: Normalize tile coordinates to the range 0 to 2^zoom- 1 before you request a tile. See /maps/documentation/pollen/heatmap-tiles. - Problem: Although the forecast endpoint is called from a server,
heatmapTilesrequests can also run directly in browser JavaScript (for example, in a Maps JavaScript APIoverlayMapTypestile layer). Fix: When loadingheatmapTilesURLs directly in a browser, you can use an API key with browser (HTTP referrer) restrictions. See /maps/documentation/pollen/embed-heatmaps.
What you can do with Pollen API
See the guides linked below for each task, or compare across products in the Capabilities Explorer.
- Return a five-day forecast of the pollen index for a specified geographic location.
- Return a five-day forecast of the pollen plant sources and effects for a specified geographic location.
- Return a five-day forecast of pollen condition descriptions for specified geographic location.
- Return plant descriptions and cross reaction details for sources included in a pollen forecast.
- Return URLs of photos for the plant sources included in a pollen forecast.
- Return a five-day forecast of health recommendations based on the pollen conditions and plant sources for a specified geographic location.
- Return an image file of pollen conditions heatmap tile for a set of map tile coordinates and zoom level.