Application Program Interface (API)

Web services are commonly referred to as an API (Application Programmer Interface). The API allows data users to access Statistics Canada aggregate data and metadata by connecting directly to our public facing databases.

The Web Data Service is an API service that will provide access to data and metadata released by Statistics Canada each business day. Web Data Service methods are the preferred mechanism for data users to consume a discrete amount of data points via the Statistics Canada website. This web service provides an access to the main Statistics Canada output database via a number of calls or methods that harvest the data and metadata in their raw forms and return them to the caller. There are two services for our main database: one returns data points in JavaScript Object Notation (JSON) language and the other returns Statistical Data and Metadata Exchange (SDMX) XML output. There are user guides for both our developer pages on the website as well as other reference APIs for other subjects.

For example the JSON API includes the following methods:

  • Product Change Listings
    • getChangedSeriesList
    • getChangedCubeList
  • Cube Metadata and Series Information:
    • getCubeMetadata
    • getSeriesInfoFromCubePidCoord
    • getSeriesInfoFromVector
  • Data Access; data changes for today, over time and full table
    • getChangedSeriesDataFromCubePidCoord
    • getChangedSeriesDataFromVector
    • getDataFromCubePidCoordAndLatestNPeriods
    • getDataFromVectorsAndLatestNPeriods
    • getBulkVectorDataByRange
    • getDataFromVectorByReferencePeriodRange
    • getFullTableDownloadCSV
    • getFullTableDownloadSDMX
  • Supplemental Information
    • getCodeSets

Please see the Web Data Service (WDS) user guide and documentation for more information.

Date modified: