Starwell Sources API

The Sources API from Starwell — 7 operation(s) for sources.

GitHub OpenAPI

Operations 7

GET /v1/sources The official sources served, with dataset/series counts, cadence, and terms… #
GET /v1/sources/{source}/datasets Datasets (official releases/tables) in one source #
GET /v1/sources/{source}/datasets/{datasetId} One dataset with its served series and the citation block #
GET /v1/sources/{source}/series/{seriesId} Full series metadata, verification status with recent checks, license, citation #
GET /v1/sources/{source}/series/{seriesId}/observations The values, each with provenance; envelope carries verification, license… #
GET /v1/sources/{source}/series/{seriesId}/revisions Revision history: for each period the store has seen revised, every value it… #
GET /v1/sources/{source}/series/{seriesId}/stats Summary statistics: latest, previous, all-time min/max, mean, change vs… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/starwell-dev:starwell-dev-sources-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

starwell-dev-sources-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Starwell Sources API
  version: 1.0.0
  description: 'Verified official statistics for AI agents and applications: harmonized series with provenance on every observation, a verification status on every series, computed answers cited to the official source table, and webhooks on series movement. Series whose license does not permit redistribution are excluded from every surface; direct requests for them return 451.'
  termsOfService: https://starwell.dev/terms
servers:
- url: https://starwell.dev/api/starwell
security:
- apiKey: []
- {}
tags:
- name: Sources
paths:
  /v1/sources:
    get:
      summary: The official sources served, with dataset/series counts, cadence, and terms…
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: array
      tags:
      - Sources
      operationId: getV1Sources
      x-operation-id-source: derived
  /v1/sources/{source}/datasets:
    get:
      summary: Datasets (official releases/tables) in one source
      description: 'An indexed source holds thousands of datasets: page with limit + offset, or narrow with q. meta carries count/total/offset/hasMore.'
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: q
        in: query
        schema:
          type: string
          maxLength: 200
        description: Ranked search over this source’s dataset ids and titles.
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50000
        description: Defaults to 50 with q, else all remaining from offset.
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
        description: Skip the first N rows.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: array
                  meta:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Rows in THIS response.
                      total:
                        type: integer
                        description: Rows matching the query across all pages.
                      offset:
                        type: integer
                        description: The offset this page starts at (echoed back).
                      hasMore:
                        type: boolean
                        description: True when rows exist past this page — fetch them with offset = offset + the number of rows returned here.
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Sources
      operationId: getV1SourcesBySourceDatasets
      x-operation-id-source: derived
  /v1/sources/{source}/datasets/{datasetId}:
    get:
      summary: One dataset with its served series and the citation block
      description: 'A wide dataset holds thousands of series: data.series pages with limit + offset, and meta.series carries count/total/offset/hasMore for that list.'
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: datasetId
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 10000
        description: Cap the embedded series list. Defaults to all remaining from offset.
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
        description: Skip the first N series.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                  meta:
                    type: object
                    properties:
                      citation:
                        $ref: '#/components/schemas/Citation'
                      series:
                        type: object
                        properties:
                          count:
                            type: integer
                            description: Rows in THIS response.
                          total:
                            type: integer
                            description: Rows matching the query across all pages.
                          offset:
                            type: integer
                            description: The offset this page starts at (echoed back).
                          hasMore:
                            type: boolean
                            description: True when rows exist past this page — fetch them with offset = offset + the number of rows returned here.
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Sources
      operationId: getV1SourcesBySourceDatasetsByDatasetId
      x-operation-id-source: derived
  /v1/sources/{source}/series/{seriesId}:
    get:
      summary: Full series metadata, verification status with recent checks, license, citation
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: seriesId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
        '404':
          $ref: '#/components/responses/NotFound'
        '451':
          $ref: '#/components/responses/LicenseRestricted'
      tags:
      - Sources
      operationId: getV1SourcesBySourceSeriesBySeriesId
      x-operation-id-source: derived
  /v1/sources/{source}/series/{seriesId}/observations:
    get:
      summary: The values, each with provenance; envelope carries verification, license…
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: seriesId
        in: path
        required: true
        schema:
          type: string
      - name: start
        in: query
        schema:
          type: string
          format: date
      - name: end
        in: query
        schema:
          type: string
          format: date
      - name: latest
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 5000
        description: The latest N points (alternative to start/end).
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 5000
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
      - name: format
        in: query
        schema:
          type: string
          enum:
          - json
          - csv
        description: csv returns a spreadsheet-ready file with attribution comment lines.
      - name: asOf
        in: query
        schema:
          type: string
        description: 'Point-in-time read: YYYY-MM-DD (end of that UTC day) or an ISO 8601 instant. Returns, per period, the highest revision Starwell''s store held at that cutoff, ignoring later revisions; each observation then carries provenance.storedAt and revisedSince, and meta.asOf states the cutoff, the series'' firstIngestAt, and the claim boundary. Reconstructable from first ingest forward, at refresh granularity — a statement about Starwell''s store, not about what the agency displayed.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Observation'
                  meta:
                    type: object
                    properties:
                      series:
                        type: object
                      verification:
                        $ref: '#/components/schemas/Verification'
                      license:
                        $ref: '#/components/schemas/License'
                      citation:
                        $ref: '#/components/schemas/Citation'
                      returned:
                        type: integer
                        description: Rows in THIS response.
                      offset:
                        type: integer
                        description: The offset this page starts at; absent in latest=N mode.
                      hasMore:
                        type: boolean
                        description: True when rows exist past this page — fetch them with offset = offset + the number of rows returned here.
                      asOf:
                        type: object
                        description: Present only on asOf reads.
                        properties:
                          requested:
                            type: string
                            description: The asOf value as sent.
                          cutoff:
                            type: string
                            format: date-time
                            description: The instant applied (a bare date means the end of that UTC day, clamped to now).
                          basis:
                            type: string
                            enum:
                            - store
                            description: 'Always ''store'': the vintage is what Starwell''s store held, keyed on the database-assigned insert time.'
                          firstIngestAt:
                            type:
                            - string
                            - 'null'
                            format: date-time
                            description: When the store first held this series; no vintage exists before it.
                          periodsRevisedSince:
                            type: integer
                            description: Returned periods whose value has been revised since the cutoff.
                          note:
                            type: string
                            description: The claim boundary, in words.
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: asOf is earlier than the series' first ingest (code asof_before_first_ingest, with firstIngestAt). The store never answers a point-in-time ask with current values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '451':
          $ref: '#/components/responses/LicenseRestricted'
      tags:
      - Sources
      operationId: getV1SourcesBySourceSeriesBySeriesIdObservations
      x-operation-id-source: derived
  /v1/sources/{source}/series/{seriesId}/revisions:
    get:
      summary: 'Revision history: for each period the store has seen revised, every value it…'
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: seriesId
        in: path
        required: true
        schema:
          type: string
      - name: period
        in: query
        schema:
          type: string
          format: date
        description: One period's full history (the period start as served by /observations), even if it was never revised. Not combinable with start/end.
      - name: start
        in: query
        schema:
          type: string
          format: date
      - name: end
        in: query
        schema:
          type: string
          format: date
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 1000
        description: Revised periods per page, newest first (default 200).
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        period:
                          type: string
                          format: date
                        revisions:
                          type: array
                          description: Oldest first.
                          items:
                            type: object
                            properties:
                              revision:
                                type: integer
                              value:
                                type:
                                - number
                                - 'null'
                              status:
                                type: string
                              decimals:
                                type:
                                - integer
                                - 'null'
                              current:
                                type: boolean
                                description: True on the row /observations serves today.
                              provenance:
                                $ref: '#/components/schemas/Provenance'
                  meta:
                    type: object
                    properties:
                      series:
                        type: object
                      verification:
                        $ref: '#/components/schemas/Verification'
                      license:
                        $ref: '#/components/schemas/License'
                      citation:
                        $ref: '#/components/schemas/Citation'
                      returned:
                        type: integer
                        description: Periods in THIS response.
                      offset:
                        type: integer
                      hasMore:
                        type: boolean
                        description: True when rows exist past this page — fetch them with offset = offset + the number of rows returned here.
                      firstIngestAt:
                        type:
                        - string
                        - 'null'
                        format: date-time
                        description: When the store first held this series; history begins here.
                      note:
                        type: string
                        description: The claim boundary, in words.
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '451':
          $ref: '#/components/responses/LicenseRestricted'
      tags:
      - Sources
      operationId: getV1SourcesBySourceSeriesBySeriesIdRevisions
      x-operation-id-source: derived
  /v1/sources/{source}/series/{seriesId}/stats:
    get:
      summary: 'Summary statistics: latest, previous, all-time min/max, mean, change vs…'
      parameters:
      - name: source
        in: path
        required: true
        schema:
          type: string
      - name: seriesId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                  meta:
                    type: object
                    properties:
                      series:
                        type: object
                      verification:
                        $ref: '#/components/schemas/Verification'
                      license:
                        $ref: '#/components/schemas/License'
                      citation:
                        $ref: '#/components/schemas/Citation'
        '404':
          $ref: '#/components/responses/NotFound'
        '451':
          $ref: '#/components/responses/LicenseRestricted'
      tags:
      - Sources
      operationId: getV1SourcesBySourceSeriesBySeriesIdStats
      x-operation-id-source: derived
components:
  responses:
    NotFound:
      description: Unknown source, dataset, or series.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    LicenseRestricted:
      description: The series exists but its license does not permit redistribution; no values are served.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Verification:
      type: object
      required:
      - status
      properties:
        status:
          type: string
          enum:
          - passing
          - stale
          - failing
          - unverified
          description: 'passing: golden-value + freshness checks pass against the live source. stale: newer official data exists (or the source has not been re-checked within its cadence window). failing: a golden check disagrees with the source — do not rely on it. unverified: not yet through the harness.'
        lastVerifiedAt:
          type:
          - string
          - 'null'
          format: date-time
    Error:
      type: object
      required:
      - success
      - error
      properties:
        success:
          type: boolean
          const: false
        code:
          type: string
          description: Machine-readable error code, when applicable.
        error:
          type: string
    Observation:
      type: object
      required:
      - period
      - value
      - provenance
      properties:
        period:
          type: string
          format: date
        value:
          type:
          - number
          - 'null'
          description: Null only when status explains it.
        status:
          type: string
          enum:
          - normal
          - missing
          - suppressed
          - terminated
        decimals:
          type:
          - integer
          - 'null'
        revision:
          type: integer
          description: Bumps when the source revises the period; history is append-only.
        provenance:
          $ref: '#/components/schemas/Provenance'
        revisedSince:
          type: boolean
          description: 'asOf reads only: true when this period has been revised since the cutoff (the current value differs).'
    Citation:
      type: object
      properties:
        source:
          type: string
        authority:
          type:
          - string
          - 'null'
        dataset:
          type: string
        datasetExternalId:
          type: string
        url:
          type:
          - string
          - 'null'
          description: Human-facing official table page.
        termsUrl:
          type:
          - string
          - 'null'
        text:
          type: string
          description: Ready-to-print citation line.
    Provenance:
      type: object
      description: Where this exact value came from — stored append-only, never inferred.
      required:
      - sourceUrl
      - retrievedAt
      - connectorVersion
      properties:
        sourceUrl:
          type: string
          description: The exact source API request or table URL.
        retrievedAt:
          type: string
          format: date-time
        connectorVersion:
          type: string
        releaseTime:
          type:
          - string
          - 'null'
          format: date-time
        storedAt:
          type: string
          format: date-time
          description: 'asOf reads and /revisions only: when Starwell''s store inserted this row (database-assigned, immutable) — the clock a point-in-time read keys on.'
    License:
      type: object
      properties:
        code:
          type: string
          enum:
          - public-domain
          - statcan-open
          - cc-by-4.0
          - open-government
          - third-party-restricted
          - unknown
        url:
          type:
          - string
          - 'null'
        attribution:
          type:
          - string
          - 'null'
          description: The exact attribution line to print alongside the data.
        redistributable:
          type: boolean
        trainingEligible:
          type: boolean
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'Optional: anonymous callers get per-IP preview limits; keys (dlk_live_...) get daily tier quotas with usage metering. Also accepted as X-API-Key. Free keys come with an account at /account.'