Professional Documents
Culture Documents
Documentation
The Speedtest Intelligence Data Extract API provides easy programmatic access to your data
extract files as well as all metadata associated with those files. This enables users to automate
extract file downloads, or even build their own integrations.
To get started, you’ll first need to generate an API key. API keys are specific to an individual
user rather than an organization, so the account associated with the API key will need to have
data extract access.
If you need to delete a key and regenerate another API key pair, simply select the “Create API
Key” button. You will receive a prompt to make sure that you want to delete the current key and
generate a new one. Upon selecting that, you will receive a new API key id and a new secret
key.
The script works by first querying the API for a list of all available files and any metadata
associated with those files. It then determines what extract types are available and downloads
the newest extract file for each type. Because the script downloads the most recently modified
version of each extract type, the script will need to be run at least as often as new extract
files are added. Also, rather than parsing file names to determine the date of the file, the script
uses the file’s timestamp. If the extract file is modified in any way, the timestamp will reflect the
last modified date which may temporarily cause the modified files to appear as the newest
extract until new extracts are added.
Automating the script to run in set intervals is dependant on your operating environment.
Depending on the platform, most users will want to use cron (Linux), Windows Scheduled
Tasks, or launchctl (Mac OS), but scheduling can also be done directly within Python using
the schedule library.
we would need to base64 encode the string 123A4BC:Z9YxwV8 and add that to the request
header. The header using these credentials would need to look like
If authentication is successful, the API returns a JSON object. If authentication fails, rather than
a 401 error, the API returns the Speedtest Intelligence Portal web login. If authentication is
successful but the user doesn’t have access to data extracts, the API returns a 500 error.