Swedish Bibliometric Data Service
445M Works
97M Authors
3.5B Citations
277K Sources
145K Institutions
Swemetrics is a bibliometric analysis platform built on OpenAlex. The purpose of this project is to develop, evaluate and establish a national Swedish data source for bibliometric analyses, based on OpenAlex snapshot data, complemented with other sources that are relevant for analyses in a Swedish context. Such a data source would facilitate sharing of data and analysis workflows for bibliometric analysts at Swedish universities, research funders and other organizations related to the Swedish research ecosystem.
Swemetrics currently contains:
These data sources are co-located on the same server and interlinked. There are several ways to access and use the data (see below), through API, database connections, a web-based UI and MCP for use with AI/LLMs.
The project is currently in an early development and testing phase, at the moment mainly as a collaboration between KTH Royal Institute of Technology Library and Karolinska Institutet Library.
High-performance remote database access with Arrow results over HTTPS. Connect from R, DuckDB, Python (ADBC), Java (JDBC) or the HardCharger command line. Sign in with your institution account in the browser, or with a user and password in scripts.
hardcharger://db.swemetrics.se:443
HTTP API for SQL queries. Returns JSON results. Requires authentication. Read API docs:
Interactive SQL query interface. Explore data visually in your browser.
Download open data directly over HTTPS or S3 (path style, anonymous read): the fulltexts of selected works and a few extracts. The OpenAlex tables themselves are queried through the database clients below or the REST API
data.swemetrics.se/public/
Connect using desktop database clients (JDBC: jdbc:hardcharger://db.swemetrics.se:443), the browser UI, or programming languages like R, Python etc
try the web UI, the HardCharger drivers or dbeaver
API usage guide and recommendations for analysts, tool integrations or LLM usage
MCP configuration (Claude / Cursor / VS Code) — add the swemetrics MCP connection to your client's config:
{
"mcpServers": {
"swemetrics": {
"type": "http",
"url": "https://swemetrics.se/duckdb/mcp",
"headers": { "X-API-Key": "YOUR_KEY" }
}
}
}
Connect with DuckDB CLI using the adbc_scanner extension and the HardCharger ADBC driver (install the driver and its manifest first, see the Python line below; the full example is analysis/swemetrics_adbc_hardcharger.sql in the repository):
INSTALL adbc_scanner FROM community; LOAD adbc_scanner; -- DuckDB 2.0: from the Query.Farm repository
CREATE SECRET hc (TYPE adbc, SCOPE 'hardcharger://db.swemetrics.se:443', driver 'hardcharger',
uri 'hardcharger://db.swemetrics.se:443', username '...', password '...');
ATTACH 'hardcharger://db.swemetrics.se:443' AS hc (TYPE adbc);
CONNECT hc; -- from here on, statements go to the server as written, until DISCONNECT
FROM openalex.works LIMIT 10;
DISCONNECT;
-- or fetch one result into a local table: FROM adbc_scan('hc', 'FROM openalex.works LIMIT 10')
Table names include the catalog (openalex, swepub, gdp, openaire, snd, ror), for example openalex.works.
Connect with DuckDB CLI against the API:
-- read json, parquet or csv from the api
from read_json('https://swemetrics.se/duckdb/api/works?limit=10&api_key=your_key_here'), unnest(data) _(x) select x.work_id, x.title;
from read_parquet('https://swemetrics.se/duckdb/api/works?limit=10&default_format=parquet&api_key=your_key_here');
from read_csv('https://swemetrics.se/duckdb/api/works?limit=10&default_format=csv&api_key=your_key_here');
Connect with R using ADBC (HardCharger driver and adbi; bigint = "integer64" keeps the 64-bit ids intact):
library(DBI); library(dplyr)
con <- dbConnect(
adbi::adbi(adbcdrivermanager::adbc_driver("hardcharger")),
uri = "hardcharger://db.swemetrics.se:443",
username = Sys.getenv("HC_USER"), password = Sys.getenv("HC_PASS"),
bigint = "integer64"
)
tbl(con, dbplyr::in_catalog("openalex", "main", "works")) |> head(10) |> collect()
Or read CSV/JSON/parquet from the API:
# csv - read directly from API url using api_key
readr::read_csv("https://swemetrics.se/duckdb/api/institutions?limit=100&default_format=csv&api_key=your_api_key_here")
# parquet - typed, automatically retrieves bigint as integer64
arrow::read_parquet("https://swemetrics.se/duckdb/view/api_works_food?limit=100&default_format=parquet&api_key=your_api_key_here")
Connect with Python using ADBC:
# pip install adbc-driver-hardcharger
import adbc_driver_hardcharger.dbapi as hc
conn = hc.connect("hardcharger://db.swemetrics.se:443", username="...", password="...")
cursor = conn.cursor()
cursor.execute("FROM openalex.works SELECT * LIMIT 10")