Cookies on the ELEXON Portal

This website stores cookies on your computer, both as an essential part of the user experience and also to collect information to help us understand your use of the service and improve it. Use the links to the right to either view/change your cookie preferences, or simply dismiss this message and accept our default cookie settings. Note: A cookie will be stored on your computer to record these preferences.
> Cookie Preferences
> Dismiss Message
 ELEXON.co.ukELEXON PortalBM ReportsTAAMT
site search 

Scripting Guide

 

Background

While most content on the ELEXON Portal is intended for interactive use through your web browser, there are some files which are added or updated on a regular basis which you may wish to automate the collection of. The portal accomodates this need by providing scripted access to selected content, which you can automate and schedule the downloading of using any tool which allows you to automate HTTPS requests.

Your Scripting Key

All of the files allowed to be scripted against would normally require you to be logged into the site, and providing your username and password in a script is both potentially unsecure and also inconvenient should you happen to change your password. For this reason we supply each user with a "scripting key", which is a 15 character token which you can provide to us to authenticate yourself for the purposes of scripted file downloading. When you change your password on the portal, your scripting key remains the same.

Note that with the exception of BMRA Data Archive and P114 files, the files listed below are updated no more frequently than once per day, so you should only download them once per day at most. If your scripting activity is deemed to be excessive (for example if you were downloading a file every five minutes which is only actually updated every day), in exceptional circumstances we may temporarily disable your scripting key, but this will only affect your ability to perform scripted downloads. Interactive use of the site will still be allowed.

Your scripting key is listed on your Profile Page, but is also included in each of the URLs listed below.

Non-Scriptable Content

Much of the data provided on the portal draws from systems and databases which are scaled to be able to handle normal interactive use by real users, but not intensive automated scripting activity. The only scripted access tolerated is using the URLs listed below and providing a valid scripting key. If you are found to be automating the normal login process for the purpose of scraping data from the site, your account will be suspended.

If you believe that there is content on the site which is not listed below that you would like scripted access to, please contact us and we will be happy to either provide the scripted access, or to explain the reasons why it is not allowed.

Scripting Tools

If you are interested in this functionality, it is assumed that you have access to and are familiar with the use of a tool which allows you to carry out automated web requests. If you are not, the tool that we would recommend is "curl", which is free and widely used.

URLs to use

What follows below is an automatically generated list of the scriptable content which you currently have access to, pre-formatted to include your current scripting key, so you should simply be able to request any of the URLs below from your scripting software and receive the files.

If you have access to BMRA Data Archive or P114 data (which rather than being updated as single files are added to frequently with additional files as new content is generated), you will notice that the URLs below have a red "filename" element. You should replace this with the name of the file that you want to download. The names of files are predictable with date/timestamps in predictable places. You can visit the pages for each of these data types and hover over the URLs of individual files to see the filename formats. If you need additional help in understanding how to construct these filenames, please contact us.

Pre-Formatted URLs

These are the URLs which you should use for scripted access:

Note: We can not currently show you the URLs that you can script against because you are not logged in. Please log in, and the URLs will appear here.
Please login to get more out of the Portal. Personalisation, operational data and more! Login now.
Remember Me    more information
Your login session will normally be timed out after two hours of inactivity. Choosing "Remember Me" will extend this to 28 days of inactivity, so as long as you visit the site at least once every 28 days, you will remain logged in. Only use this option if you are on a private computer that others do not have access to.
Forgot Password?
Not yet a member?
Register now