Skip to main content
Gary
Rank 1
Rank 1
March 9, 2017
Solved

Can we get access to the OVO energy online account API to download our smart meter usage data?

  • March 9, 2017
  • 227 replies
  • 36573 views

Hi Ovo,

I wondered whether the API that powers your live and historical usage page in the account menu is something you could look into opening up a bit so we can freely access our raw data and also perhaps it may stimulate some interesting community projects?

For instance (more sport related), Strava and Fitbit.

Best answer by g-de

Updated on 14/08/25 by Abby_OVO

 

Tim_OVO: “We love seeing the innovative ways our customers are using tech to help monitor and manage their energy usage. It’s inspiring us to think about ways to do energy differently. We know some customers have been using some of the application programming interface (APIs) behind our public facing services. While we’re OK with that, we do need to make you aware of a couple of things.

 

These APIs are designed to be used by OVO teams only, and aren't public facing. There are some downsides to using APIs that aren't for the public, and we wanted to let you know what these are. Behind the scenes, OVO uses APIs to share and update information between systems that power your bills and your online account. This is done in partnership with Kaluza, the tech company that’s part of the OVO family. They’ve built the billing platform designed to put our customers in the driving seat of their energy usage. 

 

These internal APIs are intended for use by Kaluza and its clients, who are energy retailers like OVO, rather than customers. Because of this, there’s no support for them being used anywhere else, which means they may be discontinued with no notice when we update our products and services. 

 

OVO Energy and Kaluza need to be able to monitor these APIs, and may block access if there's any problems in the future.

 

We know some customers may have put time and effort into developing solutions that use these API. So, now that you know the risks, we want to hear from you on how you’re using the APIs and the problems you’re solving with your DIY approach. 

 

Is there anything you’d like to see from OVO to help you monitor and manage your energy better? Leave a comment below to tell us.”

 

can you help me understand if the links above allow users to access raw data as if from an API?

I can certainly give it a go.

 

Firstly, big thanks to Timmo and other contributors for developing the library. All thanks go to them and links to buy them a coffee for their effort can be found on PyPi or GitHub:

https://pypi.org/project/ovoenergy/
https://github.com/timmo001/ovoenergy

 

I assume the way the library was developed this was to reverse engineer the My OVO website. That is, browse the website as normal and and monitor the traffic to see what OVO URLs and APIs it uses. Assuming this is the case, one of these URLs (get account IDs) already seems to be different but the library is still working for the moment. The APIs being used are not officially supported outside of the website, so first, a warning that any changes to the My OVO website may break the library.

 

For anyone using Python, you should be able to include the ovoenergy library and look at https://github.com/timmo001/ovoenergy/blob/master/ovoenergy/cli.py for how to use it.

 

For replicating this in other languages, the process seems to be as follows:

  1. Login by sending a POST request to https://my.ovoenergy.com/api/v2/auth/login with the following JSON in the body:
    {
    "username": "...",
    "password": "...",
    "rememberMe": true
    }

    From the response, save the cookies to use in all future requests.

  2. Next, send a GET request to https://smartpaym.ovoenergy.com/api/customer-and-account-ids . Be sure to save the items in the “accountIds” property (usually only one item).
  3. Finally, make a GET request to https://smartpaym.ovoenergy.com/api/energy-usage/daily/{accountId}?date={yyyy-MM} where {accountId} is the value from the previous request and {yyyy-MM} is the month in the format 2020-08.

You can also get monthly or half-hourly usage using the following URLs similar to step 3:

As mentioned above, if this is wanted for Home Assistant, the integration was added in version 0.114 (https://www.home-assistant.io/integrations/ovo_energy/).


Unfortunately the data only goes up to the end of the previous day as OVO no longer provide real-time data:

 

227 replies

MikeWilliams
Newcomer
Newcomer
April 10, 2024

With the aid of @Firedog I have managed to work out why the program kept crashing.

I will be deploying a new version to GitHub later, watch this space.

Firedog
Super User
Super User
April 10, 2024

I have managed to work out why the program kept crashing.

 

Mea culpa: it looks as if the app was choking when it found no gas data for me. Mike was quick to spot the hurdle and remove it, so now I’ve run out of ways to break it.

I can really recommend Mike’s solution to anyone happy to work from an SQLite database.

 

Noel | I have no official status; I'm just a volunteer who comes here to help other customers. My gear: Aclara SGM 1416-B Electricity-only E7 meter; Chameleon IHD3-PPMID-AAA | It may look as if I know what I’m talking about, but don’t let that fool you. |
MikeWilliams
Newcomer
Newcomer
April 10, 2024

I have managed to work out why the program kept crashing.

 

Mea culpa: it looks as if the app was choking when it found no gas data for me. Mike was quick to spot the hurdle and remove it, so now I’ve run out of ways to break it.

I can really recommend Mike’s solution to anyone happy to work from an SQLite database.

 

I was tempted to say why, but I considered that your choice @Firedog to do so, for privicy reasons.

As I said earlier I intend to release the fixed version to GitHub shortly (hopefully tomorrow).

For those of you on a single fuel deal, please wait until I announce it’s release.

My solution also allows you to export the data to either CSV or Excel files.

/Mike

MikeWilliams
Newcomer
Newcomer
April 11, 2024

I have just release V1.0.1 to GitHub, this fixes the issue found by @Firedog when you only have electricity supplied by OVO.

Just download the zip file from https://github.com/MikeWilliams-UK/My-Ovo-Data/releases/tag/V1.0.1 and unzip it’s contents to any folder, then run OvoData.exe

 

/Mike

knight
Newcomer
Newcomer
April 11, 2024

I have just published my application which fetches your data and stores it in a local SQLite database on your PC.

It can also export the data to CSV and Excel files, to allow easy anaylsis.

 

I know this is greedy of me but I don’t suppose you would consider making that into something embeddable in Node.js? If you did, it could be made available to Node-RED and Home Assistant users quite easily.

 

Julian Knight, IT Architect, Node-RED contributor
MikeWilliams
Newcomer
Newcomer
April 11, 2024

It's a WPF application written in C# so I am pretty sure it won't be an easy port to node.js, also I don't know node.js

The full source code is on GitHub, so you can go "fill your boots" there …

It also directly accesses the file system, which is prohibited in all browsers.

MikeWilliams
Newcomer
Newcomer
April 19, 2024

Just tried to update my useage data today and the fetching of my account id(s) is being blocked

Using postman after logging in and trying to get the data from https://smartpaym.ovoenergy.com/api/customer-and-account-ids

I get this in the html comming back

“Sorry, you have been blocked”
“This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution.
There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.”
 
What can I do to resolve this?
“You can email the site owner to let them know you were blocked.
Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.”
 
Looks like something that Cloudflare are doing :-(
 
/Mike
Rank 1
April 22, 2024

I have been using the HA Ovo add-on and it has now got me band from the  “smartpaym.ovoenergy.com/api/customer-and-account-ids” url it uses or it has been turned off, so the add-on no longer works in HA. Has any one else come a cross this?

MikeWilliams
Newcomer
Newcomer
April 22, 2024

Just fixed a bug in my Ovo data fetching program, one of the OVO api’s I was using has been deprecated.

You can find release 1.0.2 at https://github.com/MikeWilliams-UK/My-Ovo-Data/releases/tag/V1.0.2
 

MikeWilliams
Newcomer
Newcomer
April 22, 2024

I have been using the HA Ovo add-on and it has now got me band from the  “smartpaym.ovoenergy.com/api/customer-and-account-ids” url it uses or it has been turned off, so the add-on no longer works in HA. Has any one else come a cross this?

The url has been blocked by Cloudflare, my app has suffered from it since Friday (19th April) presumably the old API has now been turned off.

There is a new API with a new ul which returns the same data, can the app that you are using have the url changed?

/Mike