scb-pxwebapi-v2

Retrieve and present Swedish public statistics via the PxWebApi v2.

10|1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/janbrus/ssb-api-v2-examples --skill scb-pxwebapi-v2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scb-pxwebapi-v2
Source: https://github.com/janbrus/ssb-api-v2-examples/tree/main/scb-pxwebapi-v2-skill
Command: npx skills add https://github.com/janbrus/ssb-api-v2-examples --skill scb-pxwebapi-v2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the problem of retrieving and presenting Swedish public statistics from the SCB via the PxWebApi v2, making complex data accessible and actionable for users.

Core Features & Use Cases

  • Data Retrieval: Search, explore, and fetch data from the SCB's Statistical Database using the PxWebApi v2.
  • Metadata Handling: Interact with table metadata, including variables, codes, and selection defaults.
  • Query Execution: Execute data queries, filter by criteria, and handle complex operations.
  • Data Presentation: Format and present data in a user-friendly manner, with clear sources and units.
  • Use Case: For instance, a user can query the latest population numbers for a specific city or region in Sweden.

Quick Start

To retrieve the latest population data for Stockholm, use the scb-pxwebapi-v2 skill with the command "Get population data for Stockholm, latest available."

Frequently Asked Questions about scb-pxwebapi-v2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve Swedish public statistics from SCB using an API?

This Skill retrieves Swedish public statistics from SCB using PxWebApi v2 by handling metadata retrieval, query execution, and data presentation in both Swedish and English with support for filtering and selection.

How do I query population data for a specific Swedish city or region?

Query population data for a specific Swedish city by executing filtered data queries against the SCB Statistical Database via PxWebApi v2, for example by requesting the latest available population numbers for Stockholm.

Can I filter and select specific variables when fetching data from the SCB Statistical Database?

Yes, you can filter and select specific variables when fetching SCB data because the Skill interacts directly with table metadata, allowing you to manage variables, codes, and selection defaults before executing your query.

Does the PxWebApi v2 support retrieving statistics metadata like variables and codes?

Yes, PxWebApi v2 supports retrieving statistics metadata by allowing you to interact with table metadata, which includes accessing variables, codes, and selection defaults to structure your data queries effectively.

What is the best way to present Swedish statistics fetched via PxWebApi v2?

The best way to present Swedish statistics fetched via PxWebApi v2 is using the Skill's built-in data presentation feature, which formats retrieved data in a user-friendly manner complete with clear sources and units.

Are there limitations when accessing SCB public statistics through PxWebApi v2?

When accessing SCB public statistics through PxWebApi v2, limitations may arise from the complexity of structuring query filters and handling specific table metadata, though the Skill guides metadata retrieval to mitigate these issues.