What the Octopus API actually gives you access to

An API is simply a way of asking a computer for data and getting it back in a structured format. The Octopus Energy API is public, documented, and free to use. It gives you access to several distinct data types:

The Agile rate endpoint requires no login or API key. It is a public URL. The consumption and account endpoints require your personal API key. Both types are freely accessible to any Octopus customer.

Understanding what the API contains helps you understand what services like AgileAlert, Home Assistant integrations, and IFTTT applets are actually doing behind the scenes. They call the same endpoints you could call yourself.

Getting your API key (the 60-second process)

For anything beyond public price data, you need your personal API key. Here is how to get it:

  1. Log in to your Octopus Energy account at octopus.energy.
  2. Click on your account in the top right corner.
  3. Scroll down to the section labelled "API access".
  4. Click "Create API key" if one doesn't already exist.
  5. Copy the key and store it somewhere safe, like a password manager.

The key looks like a string of random characters, something like "sk_live_a1b2c3d4e5f6...". Treat it like a password. Anyone with this key can read your consumption data and account balance, though they cannot make changes or payments.

You will use this key whenever you connect a third-party tool to your Octopus account, including Home Assistant, IFTTT, Zapier, and Google Sheets integrations.

The live price endpoint: viewing your region's prices right now

The Agile price endpoint is public and requires no key. You access it as a URL in any browser. The format is:

https://api.octopus.energy/v1/products/AGILE-24-10-01/electricity-tariffs/E-1R-AGILE-24-10-01-[REGION]/standard-unit-rates/

Replace [REGION] with your DNO region code. Common codes are:

RegionCode
South East EnglandH
LondonC
East MidlandsE
North West EnglandA
YorkshireF
South West EnglandL
Scotland (South)N
Scotland (North)P
WalesK

Paste the URL with your region code into a browser. You will see a page of JSON data listing every price slot for today and tomorrow, with the price in pence per kWh. It looks like raw text but every element is labelled and readable. This is the raw data behind every Agile price dashboard on the internet, including AgileAlert.

For a much cleaner view, head to the AgileAlert price dashboard, which displays this same data as a colour-coded chart with peak and cheap windows clearly highlighted.

No-code tools that use the API: IFTTT, Zapier, Make

Several automation platforms can query the Octopus API without you writing code. The setup involves pasting your API key into a form and choosing what data to use as a trigger or action.

IFTTT (If This Then That) has Octopus Energy triggers built into its platform. You can create an applet that fires a notification or turns on a smart device when the Agile rate drops below a value you choose. Setup takes about 10 minutes. There is a free tier that covers basic automations. See the dedicated IFTTT article in this series for step-by-step instructions.

Zapier offers a more powerful "Webhooks by Zapier" action that can call the Octopus price URL and pass the result into other apps. You can set up a zap that checks the current price every 30 minutes and sends you a Slack or WhatsApp message if it drops below 5p. The free Zapier tier limits runs, but the 750 free tasks per month covers simple price checks.

Make (formerly Integromat) is the most flexible of the three. It handles JSON responses natively, meaning you can extract specific price slots, compare them, and trigger different actions based on price ranges. Make suits users who want more logic without writing code.

Google Sheets live Agile price tracker (no coding)

Google Sheets has a built-in function called IMPORTDATA and a more powerful IMPORTJSON extension. You can use these to pull live Agile prices directly into a spreadsheet, updated whenever you open or refresh the sheet.

The simplest approach uses the ImportJSON add-on, which is free from the Google Workspace Marketplace:

  1. Install ImportJSON from the Workspace Marketplace into your Google account.
  2. In any cell, enter the formula: =ImportJSON("https://api.octopus.energy/v1/products/AGILE-24-10-01/electricity-tariffs/E-1R-AGILE-24-10-01-C/standard-unit-rates/") (replace C with your region code).
  3. The sheet populates with every price slot for today and tomorrow, in two columns: time and price.
  4. Add a conditional formatting rule to highlight cells where the price is below 5p in green and above 30p in red.

You now have a live Agile price tracker in a spreadsheet you already know how to use. Sort by price to find the three cheapest slots of the day. Share the sheet with your household. Add a column for estimated appliance cost at each price level.

This approach requires no ongoing maintenance. The formula refreshes automatically. It suits people who are comfortable with spreadsheets but do not want to learn a new platform.

What AgileAlert does with the API (and why you don't need to build your own)

AgileAlert calls the public Octopus API every 30 minutes and transforms the raw JSON response into the visual price chart you see on the live dashboard. The chart colour-codes each slot, marks the cheapest window, shows the peak rate, and flags negative price events as they happen.

Building this yourself from scratch would take several hours. AgileAlert does it for free, on every device, with no setup required. You open the page and the information is there.

The value of understanding the API is knowing what is possible. You can extend AgileAlert's data with your own consumption numbers from the API, cross-reference your usage patterns against price patterns, and identify which appliances are costing you the most at peak times. That analysis, done once in a spreadsheet, informs every automation you build.

For most Agile users, the combination of the AgileAlert dashboard for price visibility and IFTTT or Home Assistant for automated action covers everything the API can provide, without writing a line of code.

Frequently asked questions

Do I need to register as a developer to use the Octopus API?
No. Any Octopus Energy customer can access the API. The public price endpoints require no authentication at all. Your personal consumption and account data requires your API key, which you generate in your standard customer account settings. There is no developer registration or approval process.
Can I get my usage data from the API?
Yes. The consumption endpoint returns half-hourly usage data going back to when you installed a smart meter. The URL format is: https://api.octopus.energy/v1/electricity-meter-points/[MPAN]/meters/[SERIAL]/consumption/ - authenticate with your API key as a username and leave the password blank. This data is extremely useful for identifying which half-hour slots you consume most power in, helping you prioritise which loads to shift.
Is the Octopus API free to use?
Yes, completely free. Octopus Energy makes the API available to all customers at no charge. There are rate limits to prevent abuse (typically a few hundred requests per minute), but normal use by individuals and small automations never approaches these limits. The API has been free and open since Octopus launched it and there are no plans to charge for it.