Webperf's API
The API is under constant change – Work in Progress
More information and documentation is added continuously. Unless stated otherwise, responses are in JSON format. Want to see the OpenAPI/Swagger documentation? You'll find it here!
1. Open data
The data that Webperf releases as open data is published under the CC BY-SA 4.0 licence. This means you need to give proper attribution (that the data source is Webperf), and if you share the data source further, or adapt it, it must keep the same licence.
1.1 URLs to municipality and region websites
The URLs you get from this API endpoint point to the start page of municipality and region websites as
stored at Webperf.se.
Note that Visby municipality in this list has been replaced by Region Gotland.
GET
https://api.webperf.se/public-sector/
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- result_count integer for how many unique websites are in the list of data.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data a list of websites, containing the following data:
- category a string that is either Municipality, i.e. a municipality, or Region if it is a region.
- sameAs a URI (string) referencing the same organisation on Wikidata.
- title a string with the name of the organisation.
- uri a string referencing the organisation on Webperf. Work in progress. URLs to Webperf-internal content will be added in time.
- url a string with the organisation's start-page address on the web.
The point of URIs to Wikidata? Linked data!
"Linked data is a method of publishing structured data in a way that makes it possible to follow connections between pieces of information across multiple sources. Linked data builds on web standards such as HTTP and URIs, but instead of using them to present information to humans, the aim is to make data readable by machines. The goal is to enable widely differing actors to describe their information in a uniform way and thereby simplify reuse and interoperability."
So you can relate information at Webperf with Wikidata, which lets you fetch both even more data and also connect to various Wikipedia articles you may want to work with. This makes the data source machine-readable and processable automatically in your own application.
This can be handy if you want to automate fetching municipalities' names in other languages, which province they belong to, population size, their official email address, images from Wikimedia and everything else offered by Wikidata. See, for example, Wikidata's URI for Åmål municipality.
Code examples to get you started with Webperf's open data
On Webperf's GitHub account there are code examples you can reuse or take inspiration from.
- 01 - Code example for api.webperf.se fetches municipalities and regions from Webperf, connects to each website, looks at the page titles, and fetches population data from Wikidata.
1.2 Persistent URI (for municipalities and regions)
A URI is an identifier in the (linked) open data world. It is meant to be persistent and a unique
reference that you may come across in datasets from Webperf. External parties are also free to use
these URIs.
You'll find URIs in each listing and they can also be looked up. A URI for Webperf follows the syntax below and returns the public information that is available to share.
Do you have Premium? Then you can get your own data and the overall scores just by supplying an API key. See more about URIs for Premium.
GET
https://api.webperf.se/item/number
For example the following for Västra Götaland Region:
GET
https://api.webperf.se/item/141
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data lists information about the website:
- category a string that is either Municipality, i.e. a municipality, or Region if it is a region.
- sameAs a URI (string) referencing the organisation on Wikidata.
- title a string with the name of the organisation.
- uri a string referencing the organisation on Webperf. Work in progress. URLs to Webperf-internal content will be added in time.
- url a string with the organisation's start-page address on the web.
1.3 Test types
In several of the API's responses a field type_of_test appears – an integer that identifies which kind of test was run. This endpoint is an open catalogue of every test type in Webperf Core, with their id numbers and names. So you need no API key. The data source is Webperf Core and is released as open data.
Note that the names of the test types that are active in the current Webperf Core are taken verbatim from Webperf Core's own locale files. Descriptions, and names for historical (inactive) tests in Danish, Norwegian, Finnish and Icelandic, are machine-translated from Swedish/English and should be reviewed before you fully rely on them.
Fetch the whole list:
GET
https://api.webperf.se/v1/tests
Or a single test type by its id number:
GET
https://api.webperf.se/v1/tests/number
For example the following for the performance test (Sitespeed.io):
GET
https://api.webperf.se/v1/tests/15
There are two optional query parameters:
- lang flattens the response to a single language. Allowed values are sv, en, da, no, fi and is. If you omit it you get all languages gathered under the translations node. If you supply an unsupported language you get status code 400.
- active with the value 1, true or yes gives you only the test types in active use. List endpoint only.
Example with English names and active tests only:
GET
https://api.webperf.se/v1/tests?lang=en&active=true
The response contains the following data:
- count integer for how many test types are in the list of data.
- meta metadata about the data source, including language which shows which language the response applies to (or all if you didn't pick one).
- tests a list of test types (or test with a single object when you fetch by
id number), containing the following data:
- id integer that identifies the test type. This is the same number you see in type_of_test in other API responses.
- active a boolean that indicates whether the test type is in active use.
- url_with_details a string with a URL to more information about the test on Webperf.se (may be empty).
- name, description and long_description strings with name and descriptions. These sit directly on the object if you supplied lang.
- translations appears instead if you did not supply lang, and has a node per language (sv, en, da, no, fi, is) with their respective name, description and long_description.
The response is delivered with long cache headers and an ETag, so a conditional request with If-None-Match can return status code 304 (Not Modified) and save bandwidth.
2. Webperf's premium API
Quick links to the premium endpoints:
- 2.1 Fetch your latest scores
- 2.2 Historical scores
- 2.3 Re-test the start page
- 2.4 Start private tests
- 2.5 Fetch a list of your private tests
- 2.6 Fetch test results for one of your private tests
- 2.7 Your own URI gives you your latest overall scores
- 2.8 Get a text's readability index (LIX)
- 2.9 The categories' average scores
- 2.10 Trigger a Premium Audit
- 2.11 Fetch your Premium Audits or reviews
Only for you with a Webperf premium account of the medium or large variant. A few have bought the API add-on for their account; if that applies to you, you'll see it in the menu when you log in to Premium. You need to fetch your
API key via your premium account to get started. If you don't have your API key yet, log in to premium.webperf.se and click My API key in the menu to create one.
Read more about Webperf's different premium accounts »
The premium APIs are versioned so that you can trust that your integrations won't suddenly
break. Each version is supported for at least 6 months, and it may become longer as the API is released in
newer versions going forward.
You don't have to pick a version in your calls, but if you do, it's an extra path segment with a decimal number in the API endpoints below. If you don't pick a versioned endpoint you always get the latest version.
If you don't have premium but want to try it out, you can use the demo account that exists for Webperf.se as a site. In that case it's API key 989089bfe899d6992ff320a97 and the site's id number 3843 that you use.
Looking for code examples to work with the premium API?
There are code examples in Python at the link below. It runs in Jupyter Notebook, which is also compatible with Google Colab as an environment if you prefer that.
With the code example you can interact with the premium API by asking which id number your website has, fetch the latest results, historical average scores and create a graph of the average scores over time.
These are just code examples. To give inspiration for what you can do to get started with the premium API. There are surely other automations and integrations you'll think of.
- 02 - Code example for the premium API (GitHub, updated 2023-07-24)
2.1 Fetch your latest scores
Here you get, in JSON format, the same tests you can see on Webperf.se as test results.
Initially you may not know which id number your website has. Then you can make the API request below together with your API key, and you'll find out which id numbers you have access to. This is also shown on the Info page if you log in to premium.
GET
https://api.webperf.se/stats/
https://api.webperf.se/0.1/stats/
HTTP header
Key: api-key
Value: your-api-key
Once you know the website's id number, your API endpoint is the following to get statistics:
GET
https://api.webperf.se/stats/number
https://api.webperf.se/0.1/stats/number
HTTP header
Key: api-key
Value: your-api-key
It might look like this if you use Webperf.se's demo account:
GET
https://api.webperf.se/stats/3843
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- uri a string referencing which website on Webperf the test results belong to.
- result_count integer for how many unique tests are in the list of data.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data lists the latest test results:
- type_of_test integer that identifies the type of test performed.
- rating decimal with the score for the current test.
- test_date server-side timestamp for when the test was carried out.
- check_report a string with the main test result, in readable form.
- check_report_a11y a string with the test result concerning accessibility, in readable form.
- check_report_perf a string with the test result within web performance, in readable form.
- check_report_sec a string with the test result for information security, in readable form.
- check_report_stand a string with the test result regarding web standards, in readable form.
- json_check_data a JSON-formatted string with the test result. Used in a few test types.
2.2 Historical scores
Webperf has collected test results for many years for certain websites. For example monthly for all municipalities since the summer of 2018. All scores are part of a kind of "category score", which is what you see reported in the recurring monthly reports on Webperf.se, but it can be tedious to compile your own data from those reports. That's why this API endpoint exists.
GET
https://api.webperf.se/stats_per_month/number
https://api.webperf.se/0.1/stats_per_month/number
HTTP header
Key: api-key
Value: your-api-key
It might look like this if you use Webperf.se's demo account:
GET
https://api.webperf.se/stats_per_month/3843
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- uri a string referencing which website on Webperf the test results belong to.
- result_count integer for how many unique monthly scores are in the list of data. Not to be confused with the number of months. One and the same month can have a handful of different scores in your result. See type_of_score below.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data lists the average scores of all test results:
- data_id integer that identifies the calculation of the monthly score. Mainly useful for troubleshooting.
- score decimal with the average score for the current month and the tests included in that type of test. See type_of_score.
- timeperiod a date in the format yyyy-mm and is within the period the tests were carried out.
- type_of_score a string that identifies which type of tests were summed up into an average score for the month. The options are fairly self-explanatory; kat-total total score for all tests, kat-infosec for information security/privacy, kat-a11y for accessibility, kat-perf for everything within web performance and kat-webstandard for compliance with web standards.
2.3 Re-test the start page
Do you want to manually re-run the tests of your website so that Webperf.se takes a fresh look? The test applies to the start page of your website and the result will be published on Webperf.se when the test is done, and you can reach the new tests via the API through 2.1 Fetch your latest scores.
You have a limited number of credits per 4 weeks to do these re-tests. You can't overdraw; it's up to Webperf to stop you. So go for it.
The number you supply is the website's id number. If you don't know your website's id number, run the API request under 2.1 Fetch your latest scores and you'll get it in the response.
POST
https://api.webperf.se/retest/
https://api.webperf.se/0.1/retest/
HTTP header
Key: api-key
Value: your-api-key
Key: site-id
Value: number
Optional – if you only want to run certain tests:
Key: testnums
Value: [1, 2, 4, 5, 8, 9, 10, 15, 17,18, 20, 21, 22, 23, 24, 25]
It might look like this if you use Webperf.se's demo account:
POST
https://api.webperf.se/retest/
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
Key: site-id
Value: 3843
The response to your POST is status code 200 if it went well and a text confirmation along the lines of "Website with site-id 3843 will be retested in a couple of minutes". If something went wrong on the server side it's error 500. If you forgot to post site-id or api-key you get status code 400.
2.4 Start private tests
You can test up to 10 sub-pages of your choice per call to the API. The number of pages you can test is governed by which level of premium your website has. If you have one of the larger premium variants you have room to make several API posts in a row and then wait for the test results to come in over the 15-30 minutes it usually can take.
See 2.5 Fetch a list of your private tests for how, via the API, you get the API calls you make to reach these private tests.
You have a limited number of credits per 4 weeks to do these re-tests. You can't overdraw; it's up to Webperf to stop you. So go for it.
POST
https://api.webperf.se/test_once/
https://api.webperf.se/0.1/test_once/
HTTP header
Key: api-key
Value: your-api-key
Key: site-id
Value: number
HTTP body
Key: urls
Value: url1
or
Value: url1, url2, url3 – url10
It might look like this if you use Webperf.se's demo account:
POST
https://api.webperf.se/test_once/
https://api.webperf.se/0.1/test_once/
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
Key: site-id
Value: 3843
HTTP body
Key: urls
Value: https://webperf.se/articles/nyhetsbrev-38/, https://webperf.se/tag/tillganglighet/
The response to your POST is status code 200 if it went well and a text along the lines of "A once only test for # URL's belonging to site-id 3843 will be performed in a couple of minutes. The endpoint(s) is/are: {6481: 'https://api.webperf.se/private_stats/3843/6481', 6479: 'https://api.webperf.se/private_stats/3843/6479', 6477: 'https://api.webperf.se/private_stats/3843/6477', 6475: 'https://api.webperf.se/private_stats/3843/6475'}".
If you get status code 400 you have exceeded your quota for the current 4 weeks.
2.5 Fetch a list of your private tests
These are called private tests because they are not openly accessible on Webperf.se or to other users of the API than those with the same permission as you.
With the API response below you get URIs to fetch all test results for a privately tested URL. This API URI requires you to supply your API key to get the response, see 2.6 Fetch test results for one of your private tests below.
GET
https://api.webperf.se/private_stats/number
https://api.webperf.se/0.1/private_stats/number
HTTP header
Key: api-key
Value: your-api-key
HTTP body
Key: urls
Value: url1
or
Value: url1, url2, url3 – url10
It might look like this if you use Webperf.se's demo account:
GET
https://api.webperf.se/private_stats/3843
https://api.webperf.se/0.1/private_stats/3843
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
Key: site-id
Value: 3843
HTTP body
Key: urls
Value: https://webperf.se/articles/nyhetsbrev-38/, https://webperf.se/tag/tillganglighet/
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- uri a string referencing which website on Webperf the test results belong to.
- result_count integer for how many different URLs were tested.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data lists all URLs:
- date_added ISO date (yyyy-mm-dd hh:mm:ss) for when the test was requested.
- uri the API address to call to reach the test details.
- url is the address that was evaluated in the tests.
2.6 Fetch test results for one of your private tests
Only those with API access to the website at Webperf or logged in to Premium can access these results. They are not shared openly.
GET
https://api.webperf.se/private_stats/number/test_id
https://api.webperf.se/0.1/private_stats/number/test_id
HTTP header
Key: api-key
Value: your-api-key
It might look like this if you use Webperf.se's demo account:
GET
https://api.webperf.se/private_stats/3843/6360
https://api.webperf.se/0.1/private_stats/3843/6360
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
The response you get from the API is along the lines of what 2.1 Fetch your latest scores gives you.
2.7 Your own URI gives you your latest overall scores
This endpoint has some similarities with 1.2 Persistent URI (for municipalities and regions), but with the difference that it applies to your own website. You also get a bit more data because you supply your API key.
Note! Mind the hyphen in api-key in this particular code example.
GET
https://api.webperf.se/item/number
For example the following for Webperf's demo account:
GET
https://api.webperf.se/item/3843
HTTP header
Key: api-key
Value: 989089bfe899d6992ff320a97
The response contains the following data:
- api_version a version number (decimal) that tells you which version of the API you reached. Useful as a reference if you save the result.
- timestamp date and time (timestamp) on the server side when the result was last updated.
- data lists information about the website:
- category a string that is either Municipality, i.e. a municipality, or Region if it is a region.
- sameAs a URI (string) referencing the organisation on Wikidata.
- title a string with the name of the organisation.
- uri a string referencing the organisation on Webperf. Work in progress. URLs to Webperf-internal content will be added in time.
- url a string with the organisation's start-page address on the web.
- scores lists the overall scores for the web page:
- a11y a decimal with two decimal places that summarises the page's accessibility
- infosec a decimal with two decimal places that summarises the page's information security and privacy
- overall a decimal with five decimal places that summarises the overall score
- pagespeed a decimal with two decimal places that rates the page's speed
- webstandard a decimal with two decimal places that summarises the page's compliance with web standards
The response you get from the API is along the lines of what 2.1 Fetch your latest scores gives you. But complemented with the scores node.
2.8 Get a text's readability index (LIX)
A text can be more or less easy to read. LIX is a measure of this and you, with the premium API, can easily check your texts via the API. Sooner or later LIX calculation will be included in the quota system with test credits.
GET
https://api.webperf.se/tools/lix/
https://api.webperf.se/0.1/tools/lix/
HTTP header
Key: api-key
Value: your-api-key
Key: site-id
Value: your-site-id-number
Body form-data
Key: content
Value: your text to readability-test
The response contains the following data:
- number is the number giving the LIX value.
- string a text version of how easy or hard the text is to read.
It might look like this:
[
{
"message": [
52,
"Svår, normalt värde för officiella texter"
]
},
200
]
If something goes wrong you will instead get False as the response and an error code.
2.9 The categories' average scores
The categories of websites that appear on Webperf.se have average scores in each score category. These you can fetch in a structured way with the premium API.
GET
https://api.webperf.se/categories/
https://api.webperf.se/0.1/categories/
HTTP header
Key: api-key
Value: your-api-key
The response contains the following data:
- categories lists all categories:
- cat_id is the category's id number, as a reference.
- title name of the category.
- rating_a11y average accessibility score.
- rating_infosec average score for information security.
- rating_pagespeed average speed score.
- rating_webstandard average score for web standards.
- rating_overall average total score.
2.10 Trigger a Premium Audit
For you with a Premium account, you can trigger a Premium Audit via the API. It can only be done every four weeks. Posting form-data with content is optional. If it isn't done, a selection of pages to test will be chosen via sitemap and crawling.
GET
https://api.webperf.se/audit/
https://api.webperf.se/0.1/audit/
HTTP headers
Key: api-key
Value: your-api-key
Key: site-id
Value: your-site-id-number
Body form-data
Key: content
Value: https://url.se/1, https://url.se/2, https://url.se/3
The response contains the following data:
[
{
"message": "Website with site-id nnnn will be audited in a couple of hours"
},
200
]
Or if you posted a new request too soon:
[
{
"message": "Fail since the website with site-id nnnn had an
audit the last four weeks. Most recent audit were 2025-05-27 23:23:53"
},
429
]
2.11 Fetch your Premium Audits or reviews
If you have already run a Premium Audit or want to know whether the one you ordered is done yet, you can use this endpoint. Under data you may get an empty result if nothing is finished, a single result as in the example below, or more than one result.
Variants of format are csv for primarily automated accessibility tests and audit.
This is how the results work:
- csv – gives you a comma-separated text ready to be loaded into a spreadsheet or for processing with code.
- audit – is, as in the example below, some metadata about a test result, and result_files gives you a list of JSON files. The content of the JSON files is what you would find from Google Lighthouse recently.
GET
https://api.webperf.se/audits/
https://api.webperf.se/0.1/audits/
HTTP headers
Key: api-key
Value: your-api-key
Key: site-id
Value: your-site-id-number
The response looks as follows (if you have access):
[{
"api_version": "0.1",
"data": [
{
"content": "{'date': 'YYYY-MM-DD', 'folder': '/static/results/webbplats.se-yyyy_mm_dd_hh-results/', 'base_url': 'https://webbplats.se'}",
"date_modified": "2025-05-12T22:20:01",
"format": "audit",
"result_files": [
"https://premium.webperf.se/static/results/webbplats.se-2025_05_12_18-results/accessibility_summary.json",
"https://premium.webperf.se/static/results/webbplats.se-2025_05_12_18-results/performance_summary.json",
"https://premium.webperf.se/static/results/webbplats.se-2025_05_12_18-results/seo_summary.json",
"https://premium.webperf.se/static/results/webbplats.se-2025_05_12_18-results/best-practices_summary.json"
],
"site_id": nnnn,
"title": "Audit Webbplats.se"
}
],
"result_count": 1,
"timestamp": "2025-05-28 21:43:02.311244"
}
3. Premium for web agencies
As a web agency there is a special premium access. Part of it is that you can manage both your own website and your clients'. Another is that it gives you access to information that can make your sales work easier. What is exclusive to web agencies' premium is listed below.
3.1 Which web analytics tools are used on websites Webperf follows
This API requires that you have Premium for web agencies.
GET
https://api.webperf.se/webanalytics?api-key=API-key
The response you get from the API is a CSV file, separated by semicolons. For just under 4000 websites important to a digital Nordics, primarily Sweden.
What output do you get? Well:
- title – what is the website's name?
- url – which address was tested?
- test_date – when was the website last tested?
- ga_or_gtm – is Google Analytics or Google Tag Manager present in the code?
- vizzit – is the cloud service Vizzit found in the code?
- siteimprove_analytics – does the website have Siteimprove Analytics?
- matomo – does Matomo Analytics exist for web analytics?
- piwik_pro – does the website have Piwik PRO (Core or Enterprise)
- fathom – is Fathom Analytics present on the website?
- plausible – is the website tracked with Plausible Analytics?
- monsido_statistics – is the website tracked with Monsido Statistics?
- hotjar – does the website have Hotjar?
4. Webhook for you with Webperf Premium
Webhooks are a way to have signals sent to your API when a SaaS service has something to tell you. As in this case, that one of Webperf's tests has run and has a test result for you. Read more about webhooks on Webperf.se
To benefit from webhooks via Webperf you first and foremost need to have a premium account. Set up an endpoint so you can receive the post from Webperf. Then you configure each website inside premium.webperf.se so we know where you want your result sent.
Below you have an example of what the content looks like that you get posted to your endpoint. The HTTP call will have a content-type of application/json and the payload below. You have two different signals about which page it concerns in the case of webhooks.
uri is the address you can later look up to check everything about the page as Webperf sees it. But if you test many pages continuously it's worth knowing that for webhooks there is also tested_url which directly tells you which page the test applies to. As usual, some tests don't evaluate that URL but instead go to your 404 page, check email settings, etc. But then you at least know which URL was fed in as the starting point.
{
"api_version": "undefined",
"uri": "https://api.webperf.se/item/3843",
"tested_url": "https://webperf.se",
"timestamp": "2024-01-13T22:34:11.519410",
"result_count": "1",
"data": {
"test_date": "2024-01-13T22:34:11.519410",
"type_of_test": 4,
"url": "https://webperf.se",
"rating": 4.95,
"check_report": "- Webbsidan kan ändå förbättras inom SEO.
- Tryckmålen har inte lämplig storlek: 99 % av tryckmålen har lämplig storlek ( 4.40 betyg )
- Alla bildelement har `[alt]`-attribut ( 5.00 betyg )
- Dokumentet har en metabeskrivning ( 5.00 betyg )
- Dokumentet har ett `<title>`-element ( 5.00 betyg )
- Dokumentet har ett giltigt `hreflang`-värde ( 5.00 betyg )
- Dokumentet har ett giltigt `rel=canonical`-värde ( 5.00 betyg )
- Dokumentet har läsliga teckenstorlekar ( 5.00 betyg )
- Dokumentet undviker plugin-program ( 5.00 betyg )
- Har en `<meta name="viewport">`-tagg med `width` eller `initial-scale` ( 5.00 betyg )
- Länkar har beskrivande text ( 5.00 betyg )
- Länkarna är genomsökningsbara ( 5.00 betyg )
- Sidan har en giltig HTTP-statuskod ( 5.00 betyg )
- Sidan är inte blockerad från indexering ( 5.00 betyg )
- robots.txt är giltig ( 5.00 betyg )",
"check_report_a11y": "",
"check_report_perf": "",
"check_report_stand": "",
"check_report_sec": "",
"json_check_data": "{}"
}
}
5. Version history
A brief look at the versions that have been released and what the plan is for the next version.
- 0.1 (2022-08-15) initial version with open data (municipalities and regions), plus three endpoints for premium; get your website's id number, fetch current test results in JSON format and historical average scores.
- 0.1.1 (2023-07-15) start a new run of your own website (Premium).
- 0.1.2 (2023-07-25) new features for premium and web agencies:
- Private tests of many pages on your website and get the results via API (Premium).
- Which websites use which web analytics tool? A list in CSV format of all public websites on Webperf.se and info about whether they use Google Analytics, Matomo, Plausible, Piwik PRO, Fathom, Siteimprove Analytics or Vizzit (requires the Premium for web agencies permission).
- 0.1.3 (2023-08-03) you can now also see whether the website uses Monsido Statistics (Premium for web agencies)
- 0.1.4 (2023-08-06) indicates whether the website uses Hotjar (Premium for web agencies)
- 0.1.5 (2023-08-25) if you have premium and post your API key to your own URI you get the calculated scores – the category scores (Premium).
- 0.1.6 (2023-09-08) BREAKING CHANGES!
- All HTTP headers that previously contained site_id or api_key must have their underscore changed to a hyphen. That is, site-id and api-key. This is due to the server-side framework which in newer versions can't handle underscores. (Premium)
- Calls for private tests now return which endpoints you'll find the tests at (Premium).
- More web analytics tools for you who want to know who uses what. Now there's also Adobe Analytics, New Relic, Mixpanel, Quantcast Measure, Fullstory, Cloudflare Insights, Snowplow, Klaviyo, Microsoft Clarity, Pingdom RUM and Crazyegg (requires the Premium for web agencies permission).
- 0.1.7 (2024-03-08) get readability index calculated for a text. (Premium)
- 0.1.8 (2024-03-25) BREAKING CHANGES!
- BREAKING: The endpoint https://api.webperf.se/stats/ and https://api.webperf.se/0.1/stats/ now gives a different response. See 2.1 Fetch your latest scores for how it works now
- A new feature is that if you have access to more than one website on Webperf's Premium you can reach all of them with the same API key. To see each website's endpoint, check the documentation under 2.1 Fetch your latest scores.
- 0.1.9 (2024-11-21) fetch the categories' average scores (Premium)
- 0.1.10 (2025-05-28) trigger an Audit (Premium)
- 1.0 (2025-08-04) refactored code, more stable operation and started supporting OpenAPI 3.
- 1.0.1 (2025-08-14) Supports OpenAPI 3 and Swagger UI so you can test the API without programming knowledge.
- 1.x (yyyy-mm-dd) faster response times and cache handling.
- 1.x (yyyy-mm-dd) new features for Webperf Premium, including:
- Support access to multiple premium websites.
- Through your API key get more data via the URIs you should have higher permission to (your own websites).
- Test an arbitrary URL (there will be some kind of credit system for the number of tests per month included at no extra cost).
6. Tips on tools and resources
To use Webperf's open data you can really just keep using your web browser. At least if you only want to download data. But for the premium API you need to send an API key in your request, which is most easily done with the Postman app if you're not building your call in some development environment.
- Postman to explore and work with APIs. Available for Mac, Linux and Windows, plus one you can run directly in the browser.
- Google Colab lets you run code directly in the browser via Google's cloud service. Supports Python code and the environment is a variant of Jupyter Notebook.
- Anaconda helps you with virtual environments with the various dependencies you may want, but is also a starting point for Jupyter Notebook to have an exploratory development environment directly in the browser. Available for Mac, Linux (including Raspberry Pi) and Windows.
- Visual Studio Code is a development environment for all sorts of languages. Available for Mac, Linux and Windows.
Resources:
- What every IT manager must know about APIs is a useful introduction to what APIs are good for (in Swedish)
- Sweden's data portal is a catalogue of data sources offered by DIGG.
- The official portal for European data lists 1.5 million datasets.
- Länkadedata.se offers a half-day course in DCAT-AP, semantic specifications, a white paper on linked open data, etc. (in Swedish)
- Sweden's data portal community is a good place for you who want to talk or collaborate about data sources.