Request a demo

Public dataset · Geography, weather and climate

OpenAQ Global Air Quality in BigQuery

Air quality measurements (pollutant, value, unit, time) from OpenAQ monitoring locations worldwide in one table of 5.6 million rows and 738 MiB, with a GEOGRAPHY column for spatial queries. The table was last updated in June 2022, so treat it as a snapshot.

bigquery-public-data.openaq · OpenAQ (openaq.org) · US · Sizes measured November 23, 2026

1tables
738 MiBlogical size
5,594,614rows
under $0.01to scan every column once, on-demand

OpenAQ is an open-source project that collects air quality data from public sources. The dataset description says the data covers 5,490 locations in 47 countries and that the dataset only includes the most current measurement available for each location, not historical data. It also states an hourly update frequency, but the description begins with "Data Updated On: 2022-06-23" and the table metadata shows the same last-modified date, so the table is effectively a frozen snapshot from June 2022.

The single table global_air_quality has one row per location and pollutant: location, city, country, pollutant, value, unit, timestamp, source_name, latitude, longitude, averaged_over_in_hours and location_geom, a GEOGRAPHY point you can use with ST_DWITHIN and ST_DISTANCE.

Tables and sizes

TableRowsSizeFull scanLayout
global_air_quality
One row per location and pollutant with value, unit, timestamp and a GEOGRAPHY point.
5,594,614738 MiBunder $0.01None

Full scan = every column of the table at the on-demand list price of $6.25 per TiB, before your free TiB each month. Selecting fewer columns costs proportionally less. See BigQuery pricing.

Example queries

Highest PM2.5 readings

Scans 341 MiB · under $0.01 on-demand

Top locations by PM2.5 value. Seven columns, 341 MiB.

SELECT
  city,
  country,
  location,
  value,
  unit,
  timestamp
FROM `bigquery-public-data.openaq.global_air_quality`
WHERE pollutant = 'pm25'
ORDER BY value DESC
LIMIT 10;

Average PM2.5 by country

Scans 185 MiB · under $0.01 on-demand

Keeps only non-negative values as a basic sanity filter. Reads four columns: 185 MiB.

SELECT
  country,
  COUNT(DISTINCT location) AS locations,
  ROUND(AVG(value), 1) AS avg_pm25
FROM `bigquery-public-data.openaq.global_air_quality`
WHERE pollutant = 'pm25'
  AND value >= 0
GROUP BY country
ORDER BY avg_pm25 DESC;

Measurements within 25 km of a point

Scans 420 MiB · under $0.01 on-demand

Uses the location_geom GEOGRAPHY column. The point is central Paris.

SELECT
  location,
  pollutant,
  value,
  unit,
  ROUND(ST_DISTANCE(location_geom, ST_GEOGPOINT(2.3522, 48.8566)) / 1000, 1) AS km
FROM `bigquery-public-data.openaq.global_air_quality`
WHERE ST_DWITHIN(location_geom, ST_GEOGPOINT(2.3522, 48.8566), 25000)
ORDER BY km, pollutant;

All columns for one country (expensive)

Scans 738 MiB · under $0.01 on-demand

WHERE country = 'US' does not prune anything: this reads the full 738 MiB.

SELECT *
FROM `bigquery-public-data.openaq.global_air_quality`
WHERE country = 'US';

Querying it cheaply

  • The table is not partitioned or clustered, so WHERE country = ... or WHERE pollutant = ... filters rows but not bytes. Only selecting fewer columns lowers cost.
  • location_geom is one of the heavier columns. Leave it out unless you need spatial functions; latitude and longitude are cheaper for display.
  • Every query here costs at most 738 MiB. The bigger risk is analysing stale data: check MAX(timestamp) before you build anything on it.

FAQ

Is the OpenAQ BigQuery dataset still updated?

No. The dataset description says "Data Updated On: 2022-06-23" and the table was last modified that day. For current readings, use the OpenAQ API directly.

Is the OpenAQ dataset free to query?

Google pays for storing public datasets, so you never pay storage for them. You pay only for the bytes your queries scan, billed to your own project at the on-demand rate, and the first 1 TiB scanned each month is free. See BigQuery pricing.

How much does it cost to query OpenAQ in BigQuery?

A full scan is 738 MiB, and the dry runs above range from 185 MiB to 738 MiB. That is under 0.1% of the monthly free TiB per query.

All public datasets · BigQuery cost queries · Pricing calculator

Cut BigQuery spend without guessing

Masthead attributes compute and storage cost to every project, user, pipeline and table, finds unused and dead-end tables, and shows where editions or on-demand pricing is cheaper. Mnemonic cut its BigQuery compute cost by 20% within 24 hours of onboarding.