Compare key figures with the industry
curl --request GET \
--url https://lens-api.tic.io/companies/{id}/industry-comparison \
--header 'x-api-key: <api-key>'import requests
url = "https://lens-api.tic.io/companies/{id}/industry-comparison"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lens-api.tic.io/companies/{id}/industry-comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lens-api.tic.io/companies/{id}/industry-comparison",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/companies/{id}/industry-comparison"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lens-api.tic.io/companies/{id}/industry-comparison")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/companies/{id}/industry-comparison")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"covered": true,
"notCoveredReason": "<string>",
"latestScbYear": 123,
"years": [
{
"period": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"employees": 123,
"scbYear": 123,
"scbYearIsFiscalYear": true,
"comparable": true,
"figures": [
{
"keyFigure": "<string>",
"name": "<string>",
"unit": "<string>",
"higherIsBetter": true,
"value": 123,
"lowerQuartile": 123,
"median": 123,
"upperQuartile": 123,
"position": "<string>",
"group": {
"sniVersion": "<string>",
"sni": "<string>",
"sniName": "<string>",
"sniDigits": 123,
"minEmployees": 123,
"maxEmployees": 123,
"year": 123,
"companies": 123
}
}
]
}
]
}Companies
Compare key figures with the industry
Compares the company’s annual-report key figures, fiscal year by fiscal year, with Statistics Sweden’s industry quartiles (branschnyckeltal) for the same industry, size class and year.
GET
/
companies
/
{id}
/
industry-comparison
Compare key figures with the industry
curl --request GET \
--url https://lens-api.tic.io/companies/{id}/industry-comparison \
--header 'x-api-key: <api-key>'import requests
url = "https://lens-api.tic.io/companies/{id}/industry-comparison"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lens-api.tic.io/companies/{id}/industry-comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lens-api.tic.io/companies/{id}/industry-comparison",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://lens-api.tic.io/companies/{id}/industry-comparison"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lens-api.tic.io/companies/{id}/industry-comparison")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lens-api.tic.io/companies/{id}/industry-comparison")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"covered": true,
"notCoveredReason": "<string>",
"latestScbYear": 123,
"years": [
{
"period": 123,
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"employees": 123,
"scbYear": 123,
"scbYearIsFiscalYear": true,
"comparable": true,
"figures": [
{
"keyFigure": "<string>",
"name": "<string>",
"unit": "<string>",
"higherIsBetter": true,
"value": 123,
"lowerQuartile": 123,
"median": 123,
"upperQuartile": 123,
"position": "<string>",
"group": {
"sniVersion": "<string>",
"sni": "<string>",
"sniName": "<string>",
"sniDigits": 123,
"minEmployees": 123,
"maxEmployees": 123,
"year": 123,
"companies": 123
}
}
]
}
]
}Enterprise+ tier
Compares the company’s key figures with its industry (Statistics Sweden’s industry key figures, branschnyckeltal), fiscal year by fiscal year. For each year and key figure you get the company’s value, the industry’s lower quartile, median and upper quartile, and where the company falls among them.
years sets how many fiscal years are returned, newest first (1-10, default 5). With an API key, names (name, group.sniName) are in Swedish.
Key figures
The company’s figures are calculated from its annual report with Statistics Sweden’s definitions and closing balances, so they are comparable with the industry’s quartiles. They can differ from the key figures in the annual report financials, which follow other definitions.keyFigure | unit | Calculated as |
|---|---|---|
EquityRatio | percent | Adjusted equity / total assets |
ReturnOnEquity | percent | Net result / adjusted equity |
ReturnOnAssets | percent | (Operating result + financial income) / total assets |
OperatingMargin | percent | Operating result / net sales |
NetMargin | percent | Net result / net sales |
QuickRatio | percent | (Current assets - inventories) / current liabilities |
DebtEquityRatio | times | (Provisions + long-term and current liabilities + deferred tax on untaxed reserves) / adjusted equity |
NetSalesPerEmployee | thousandSek | Net sales / number of employees |
- Adjusted equity is equity plus untaxed reserves after corporate tax. Net result is the result after financial items, after corporate tax.
valueis null when the annual report lacks an item or a denominator is zero or negative.higherIsBetteris false only forDebtEquityRatio, where a lower value is stronger.
Position and group
positionisBelowLowerQuartile,LowerQuartileToMedian,MedianToUpperQuartileorAboveUpperQuartile. It is null when the company has no value or the industry has no figure.group(per key figure) describes the companies compared with:- the SNI version and code;
- the size class by employees (
minEmployeesandmaxEmployees; both null means all sizes, andmaxEmployeesnull means at leastminEmployees); - the year and the number of companies.
- The code is the company’s main industry code when the fiscal year ended. A figure the industry key figures do not have for the 5-digit code is compared with its 4, 3 or 2-digit group, so
sniDigitscan differ between key figures. The size class is the narrowest one holding the year’semployees, otherwise all sizes.
Years
- A fiscal year is compared with the industry figures for the calendar year it ended in (
scbYear). - A fiscal year newer than the latest published year (
latestScbYear) is compared with that latest year, andscbYearIsFiscalYearis false. - The industry figures describe companies with net sales. A year without net sales has
comparablefalse: its figures are returned, without positions. coveredis false, withnotCoveredReason, for legal forms without industry key figures, such as sole traders and partnerships.
Authorizations
Path Parameters
Internal company ID
Query Parameters
Number of fiscal years, newest first (1-10, default 5)