Solar API quick reference

The Solar API returns rooftop solar data for buildings. Its buildingInsights endpoint returns a building's location, dimensions, and solar potential. Its dataLayers endpoint returns URLs for GeoTIFF rasters of an area, such as a digital surface model, aerial imagery, a building mask, flux maps, and hourly shade, which you download with the geoTiff endpoint.

Solar API: key facts

  • Product: Solar API
  • Also known as: Google Maps Platform Solar API
  • Category: Environment
  • Platform: Web service (REST)
  • Runs on: Server (backend code)
  • Launch stage: GA
  • Lifecycle: Active
  • Overview: Solar API overview
  • Regional availability: Limited. Coverage varies by country and imagery quality (HIGH, MEDIUM, BASE); financialAnalyses is returned only for US locations. For EEA billing addresses, EEA terms apply and buildingInsights omits postalCode, administrativeArea, and regionCode (coverage details)

Solar API: when to use it

Use Solar API when:

  • You need the solar potential, roof segment stats, and suggested panel layouts for a building at a given latitude and longitude.
  • You need estimated rooftop solar energy production, plus costs and savings (financialAnalyses in the US; calculated from solarPanelConfigs elsewhere).
  • You need GeoTIFF layers (DSM, RGB imagery, building mask, annual or monthly flux, hourly shade) for an area to design a solar system in a GIS tool.
  • You want to remotely assess roofs to reduce site assessment time or prioritize installation locations.

Don't use Solar API when:

  • You need information about addresses around a location rather than building-level rooftop insights. Use Geocoding API instead.

Solar API: setup

Solar API: common mistakes

  • Problem: If the location has no imagery that meets requiredQuality, buildingInsights returns a NOT_FOUND (404) error. If only higher-quality data exists, the API returns that data instead of the quality you asked for. Fix: Use a lower requiredQuality, such as MEDIUM or BASE, when a 404 is acceptable to avoid. Check the imageryQuality field in the response. See /maps/documentation/solar/building-insights.
  • Problem: URLs in the dataLayers response expire one hour after the request, and fetching them fails with 403 (PERMISSION_DENIED) unless you append &key=YOUR_API_KEY or send OAuth headers. Fix: Download the GeoTIFFs from the returned /v1/geoTiff:get URLs within one hour, or call dataLayers:get again for new URLs. See /maps/documentation/solar/data-layers.
  • Problem: Except for the RGB layer, GeoTIFF files look blank in image viewers, and you can't use them directly as Maps JavaScript API overlays. Fix: Open the files in GIS software such as QGIS, or decode the pixel values and render them yourself. You can store downloaded GeoTIFF files for up to 30 days. See /maps/documentation/solar/geotiff.
  • Problem: The coverage map is an approximation. Requests can return 404 in areas that look covered, for example near country borders. Fix: Handle 404 responses, and check the release notes for coverage updates. See /maps/documentation/solar/coverage.

Solar API: legacy and deprecated features

  • Earth Engine Solar API (earthenginesolar.googleapis.com) with methods buildings:findClosest and solarInfo:get: Deprecated since 2023-05-09. Replacement: solar.googleapis.com with buildingInsights:findClosest and dataLayers:get. Symptom: Requests to earthenginesolar.googleapis.com return 404, and old earthengine.googleapis.com GeoTIFF URLs return an error if an API key is appended. See the migration guide.

What you can do with Solar API

See the guides linked below for each task, or compare across products in the Capabilities Explorer.