qzenergy

data lab

From a question to a reproducible request

Choose a dataset and get stable links to source JSON, API and Parquet together with ready-to-run code.

Ready requests

Command line
curl -fsS 'https://qz.energy/api/v1/query?dataset_id=energy-indicators&limit=20&offset=0'
Python
import requests
data = requests.get('https://qz.energy/api/v1/query?dataset_id=energy-indicators&limit=20&offset=0').json()
JavaScript
const data = await fetch('https://qz.energy/api/v1/query?dataset_id=energy-indicators&limit=20&offset=0').then(r => r.json());
R
library(httr2)
data <- request("https://qz.energy/api/v1/query") |> req_url_query(dataset_id="energy-indicators", limit=20) |> req_perform() |> resp_body_json()