pxwebapi-v2

Search and retrieve statistical data from PxWebApi v2 using Python.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables you to easily access and analyze official statistics from various national statistical institutions using the PxWebApi v2, simplifying data retrieval and analysis.

Core Features & Use Cases

  • Data Retrieval: Search and retrieve data from multiple statistical databases.
  • Metadata Exploration: View and understand table structures, variables, and codelists.
  • Data Querying: Build complex queries to fetch specific datasets.
  • Use Case: For instance, if you need to get the latest population data for a specific region from Statistics Norway (SSB), this Skill can assist in constructing the right query and retrieving the data.

Quick Start

Use the pxwebapi-v2 skill to retrieve the latest population data for the region '01' from Statistics Norway.

Frequently Asked Questions about pxwebapi-v2

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

FAQPage Schema
How do I retrieve official statistical data from PxWebApi v2 using Python?

Retrieve official statistical data from PxWebApi v2 by using Python to interact with the API, enabling you to search databases and fetch datasets from national statistical agencies. The Skill constructs queries and handles JSON-stat2 formatted responses.

Can I explore table structures and metadata before querying a statistical database?

Yes, you can explore table structures, variables, and codelists from statistical databases before data querying. This metadata exploration helps you understand the available data points and build complex queries to fetch specific datasets.

Do I need Python to access national statistics through PxWebApi v2?

Yes, Python is required to access national statistics through PxWebApi v2. The Skill relies on Python for API interaction and handling the JSON-stat2 formatted responses returned by various national statistical institutions.

What's the best way to get population data from Statistics Norway (SSB) via PxWebApi v2?

The best way to get population data from Statistics Norway (SSB) is to build a specific data query targeting region '01'. This Skill assists in constructing the right query parameters and retrieving the official statistical data via PxWebApi v2.

Why does my PxWebApi v2 data retrieval return JSON-stat2 format?

PxWebApi v2 data retrieval returns JSON-stat2 format because it is the standard response structure used by the API for statistical datasets. You must handle these JSON-stat2 formatted responses using Python to properly parse and analyze the official statistics.

What limitations should I expect when building complex queries for official statistics?

When building complex queries for official statistics, you are constrained by the available table structures, variables, and codelists of the specific PxWebApi v2 installation. You must construct queries that match the metadata of the target national statistical agency.