Octopus Energy provide an API for reading general information and account specific details.
You can find the API REST documentation here
If you are after general rates you will need the products endpoint. This offers up a list of all current products on offer. You only need to put https://api.octopus.energy/v1/products/ into your browser address bar and you will get a complete list of all products (that are currently on sale).
https://api.octopus.energy/v1/products/?brand=OCTOPUS_ENERGY&is_variable=false&is_business=false narrows this list down to just Octopus, fixed, domestic, and using ‘pretty-print’ makes it easy to visually check the list.
Once you have chosen the product (from currently a list of just 5, and there are only 2 IMPORT products) you can use the product name eg
OE-LOYAL-FIX-14M-25-03-27 to get the set of rates, which are broken down by region.
If you know your region, then just look this up and see the values. There are typically differing blocks for single-register (electricity only) and dual-register (dual-fuel). The term and availability information is at the top of the output JSON.
Octopus appear to only offer one product (plus variant) at any one time, so this could be automated for checking on a monthly basis. The actual rates will be ex and inc VAT, and in some cases the standard rates do not apply.
I guess it is possible to automate as an HA rest sensor with a template, but for myself I much prefer Node-RED as this is so much easier to work with.
[{"id":"b452f3617537eea1","type":"http request","z":"b97bfe377325e0e3","name":"Product List","method":"GET","ret":"obj","paytoqs":"query","url":"https://api.octopus.energy/v1/products","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":450,"y":120,"wires":[["9c42770bf71766fe"]]},{"id":"b460c76221721bc7","type":"inject","z":"b97bfe377325e0e3","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":120,"wires":[["5f3a807e48b4db70"]]},{"id":"5f3a807e48b4db70","type":"change","z":"b97bfe377325e0e3","name":"Parameters","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"brand\": \"OCTOPUS_ENERGY\", \"is_variable\": false, \"is_business\": false}","tot":"json"},{"t":"set","p":"inout","pt":"msg","to":"[\"IMPORT\"]","tot":"json"},{"t":"set","p":"region","pt":"msg","to":"L","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":120,"wires":[["b452f3617537eea1"]]},{"id":"336bf554d4aea877","type":"debug","z":"b97bfe377325e0e3","name":"debug 41","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":240,"wires":[]},{"id":"9c42770bf71766fe","type":"change","z":"b97bfe377325e0e3","name":"List","rules":[{"t":"set","p":"products","pt":"msg","to":" $list:=payload.results[direction in $$.inout].code","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":180,"wires":[["c843907a4e0d40db"]]},{"id":"c843907a4e0d40db","type":"split","z":"b97bfe377325e0e3","name":"Products","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"products","x":280,"y":180,"wires":[["796196a90348cafd"]]},{"id":"21498068eb398bf8","type":"change","z":"b97bfe377325e0e3","name":"1R & 2R","rules":[{"t":"set","p":"url","pt":"msg","to":" \"https://api.octopus.energy/v1/products/\" & products & \"/electricity-tariffs/E-\" & registers & \"R-\" & products & \"-\" & region & \"/standard-unit-rates/\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":180,"wires":[["701eaca95e5018f7"]]},{"id":"701eaca95e5018f7","type":"http request","z":"b97bfe377325e0e3","name":"Product List","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":830,"y":180,"wires":[["a8b30cda6632fdfc"]]},{"id":"39cc67cd7f24ba07","type":"split","z":"b97bfe377325e0e3","name":"Reg","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"registers","x":550,"y":180,"wires":[["21498068eb398bf8"]]},{"id":"796196a90348cafd","type":"change","z":"b97bfe377325e0e3","name":"Registers","rules":[{"t":"set","p":"registers","pt":"msg","to":"[1,2]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":180,"wires":[["39cc67cd7f24ba07"]]},{"id":"a8b30cda6632fdfc","type":"change","z":"b97bfe377325e0e3","name":"tidy","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.results[0].value_inc_vat","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":180,"wires":[["30f077a8b741f425"]]},{"id":"30f077a8b741f425","type":"join","z":"b97bfe377325e0e3","name":"Reg","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"registers","joiner":"\\n","joinerType":"str","useparts":true,"accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1090,"y":180,"wires":[["6b99af5852e6d4c3"]]},{"id":"6b99af5852e6d4c3","type":"join","z":"b97bfe377325e0e3","name":"Products","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"products","joiner":"\\n","joinerType":"str","useparts":true,"accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1220,"y":180,"wires":[["336bf554d4aea877"]]}]
Change the settings and region to suit. This currently gives:
{
"OE-FIX-14M-25-03-27":{
"1":24.3012,
"2":{
"detail":"This tariff has day and night rates, not standard."
}
},
"OE-LOYAL-FIX-14M-25-03-27":{
"1":24.11598,
"2":{
"detail":"This tariff has day and night rates, not standard."
}
}
}
This is a bit more complicated as the dual register tariff does not have standard rates but a day-rate and a night-rate. Plenty of room to experiment.