StackData Boards API
Saved boards of answer-cards, owner-scoped by key. Pure DB, never metered.
Saved boards of answer-cards, owner-scoped by key. Pure DB, never metered.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/stackdata-io:stackdata-io-boards-api"
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.
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: 3.2.0
info:
title: StackData Boards API
version: 0.1.0
summary: Public datasets from multilateral sources, searchable in any language, resolvable into tables and charts.
description: 'StackData indexes open government and public data and resolves a plain-language
question into a table or chart drawn from that data. Every answer links back to
its source.
Beyond the 50k-dataset catalog, the API serves **stored corpora** (China
population and economic censuses, Statistical Yearbooks 2004–2013 — 14k+ tables
with English overlays; see `GET /v1/table/{id}`), an **as-of customs-tariff API**
across the EU, US, UK and Japan with legal citations (`GET /v1/tariff`), and an
**MCP server** at `POST /mcp` so agent frameworks can mount the whole API as
tools. Machine-readable coverage lives at `/.well-known/data-manifest.json`.
## The contract this API keeps (and most don''t)
- **Unknown query parameters are a `400`, never silently ignored.** The error names
the offending parameter and lists what is allowed.
- **Every JSON response carries `meta.harvest`** — the last successful harvest time of
each source, so staleness is visible without asking.
- **Counts are typed** `{ "value": N, "exact": true|false }`, never a bare integer.
- **Empty is distinguishable from failed.** An honest empty result has a `status`; a
missing resource is a `404`; an upstream failure is a `502`. A zero is never faked.
## Authentication
Send your key in the `X-API-Key` header. **It is optional** — with no key you are on
the free tier, identified by IP address, subject to a lower daily limit. A key raises
your limit and draws on prepaid credits.
## Metering
Metered endpoints: `GET /v1/resolve`, `GET /v1/data`, `GET /v1/table/{id}`,
`POST /v1/series` and `GET /v1/tariff`. The billed unit is a single *uncached upstream fetch* (for stored
corpora: the table render / tariff lookup) — cached answers, refusals, empties and
errors are free. All other endpoints (search, boards, coverage, health) are never metered.
## Paying per answer as an agent (x402)
**x402** is an open, HTTP-native payment standard — an x402 Foundation
project under the Linux Foundation. A server answers a request it won''t serve for free with
HTTP `402 Payment Required` plus machine-readable payment terms; the caller pays from a
wallet and retries the same request. No account, no API key, no card — the payment itself is
the authorization, which is why it suits autonomous agents.
**The flow here.** When an **anonymous** caller is over the free daily quota, `GET /v1/data`
returns `402` (not a hard `429`) with the terms in the body — amount, asset, network, `payTo`
and resource. The agent signs a stablecoin authorization and reissues the request with an
`X-PAYMENT` header (base64-encoded JSON of the signed authorization). The server verifies it
through a facilitator, serves the answer, and returns the settlement receipt in the
`X-PAYMENT-RESPONSE` header (the JSON body also gains a `payment` object).
- **Price** — $0.05 per uncached answer (one upstream pull); $0.25 for premium sources (tariff schedules, China statistics). The live 402 quote is always authoritative.
- **Asset & network** — USDC on Base, settled on-chain.
- **You pay only for work** — cached answers, refusals, empties and errors are free; money moves only if the answer actually cost an uncached fetch.
- **Single-use** — each signed authorization buys exactly one answer; replaying it returns `402`.
This flow is active only when the server has `X402_PAY_TO` configured.
**Learn more:** x402.org · developer docs · reference implementation · the HTTP status itself is `402 Payment Required`.'
contact:
name: StackData
email: hello@stackdata.io
url: https://stackdata.io/contact.html
license:
name: Underlying data is licensed per-source (open government / CC BY 4.0 and equivalents)
url: https://stackdata.io/attribution.html
servers:
- url: https://api.stackdata.io
description: Production (set to your deployed API host)
- url: http://localhost:8080
description: Local development (uvicorn api:app --app-dir serve --port 8080)
security:
- {}
- ApiKeyAuth: []
tags:
- name: Boards
description: Saved boards of answer-cards, owner-scoped by key. Pure DB, never metered.
paths:
/v1/dashboards:
get:
tags:
- Boards
operationId: listBoards
summary: List your boards
responses:
'200':
description: Your boards, newest first.
content:
application/json:
schema:
type: object
properties:
dashboards:
type: array
items:
$ref: '#/components/schemas/BoardSummary'
meta:
$ref: '#/components/schemas/Meta'
post:
tags:
- Boards
operationId: createBoard
summary: Create a board
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
title:
type: string
description: Board title (defaults to "Untitled", trimmed to 120 chars).
example: Labour market
responses:
'200':
description: The created board.
content:
application/json:
schema:
$ref: '#/components/schemas/Board'
/v1/dashboards/{did}:
parameters:
- $ref: '#/components/parameters/BoardId'
get:
tags:
- Boards
operationId: getBoard
summary: Get one board
description: 'The owner sees their board fully. Anyone may read a **public** board (`is_owner: false`).
A private board owned by someone else returns `404` — its existence is never leaked.'
responses:
'200':
description: The board and its items.
content:
application/json:
schema:
$ref: '#/components/schemas/Board'
'404':
description: No such board, or it is private and not yours.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
tags:
- Boards
operationId: updateBoard
summary: Rename a board and/or set its visibility
description: Send `title`, `visibility`, or both. A free-tier board stays public regardless of `visibility`.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
title:
type: string
visibility:
type: string
enum:
- public
- private
responses:
'200':
description: Updated.
content:
application/json:
schema:
$ref: '#/components/schemas/Ok'
'404':
description: Not yours, or not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Ok'
delete:
tags:
- Boards
operationId: deleteBoard
summary: Delete a board
responses:
'200':
description: Deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/Deleted'
'404':
description: Not yours, or not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Deleted'
/v1/dashboards/{did}/fork:
parameters:
- $ref: '#/components/parameters/BoardId'
post:
tags:
- Boards
operationId: forkBoard
summary: Fork a public board into your own
description: Copies the QUESTIONS (prompt + params) of a public board — or your own — into a new board. Never copies data.
responses:
'200':
description: The new board (id, title, item count).
content:
application/json:
schema:
type: object
properties:
id:
type: string
title:
type: string
items:
type: integer
description: Number of items copied.
'404':
description: Board not found or not public.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/dashboards/{did}/items:
parameters:
- $ref: '#/components/parameters/BoardId'
post:
tags:
- Boards
operationId: addBoardItem
summary: Add an answer-card to a board
description: 'Stores the **question** (prompt + resolved params), never the data. On load the app
re-runs `/v1/data` for each item, so a board is always live.'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- prompt
properties:
prompt:
type: string
description: The question to save (trimmed to 500 chars).
example: unemployment rate in Japan
params:
type: object
description: Resolved parameters for the prompt (start, end, dataset, …).
additionalProperties: true
responses:
'200':
description: The created item.
content:
application/json:
schema:
type: object
properties:
item_id:
type: integer
position:
type: integer
'404':
description: No such board (or not yours), or an empty prompt.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/dashboards/{did}/items/{iid}:
parameters:
- $ref: '#/components/parameters/BoardId'
- name: iid
in: path
required: true
description: The item id (integer).
schema:
type: integer
delete:
tags:
- Boards
operationId: deleteBoardItem
summary: Remove an item from a board
responses:
'200':
description: Deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/Deleted'
'404':
description: Not found, or not yours.
content:
application/json:
schema:
$ref: '#/components/schemas/Deleted'
/v1/feed:
get:
tags:
- Boards
operationId: feed
summary: The public feed
description: 'Recent **public** boards from other users, for inspiration. Free-tier boards are always
here; paid boards only if their owner made them public. Authors are anonymised — no key
or IP is ever exposed. Never your own boards.'
responses:
'200':
description: Public boards, newest first.
content:
application/json:
schema:
type: object
properties:
feed:
type: array
items:
$ref: '#/components/schemas/FeedItem'
meta:
$ref: '#/components/schemas/Meta'
components:
schemas:
Ok:
type: object
properties:
ok:
type: boolean
Deleted:
type: object
properties:
deleted:
type: boolean
Board:
type: object
properties:
id:
type: string
title:
type: string
updated_at:
type: string
visibility:
type: string
enum:
- public
- private
public:
type: boolean
forced_public:
type: boolean
is_owner:
type: boolean
author:
type: string
description: Anonymised author handle (user-<hash>).
items:
type: array
items:
$ref: '#/components/schemas/BoardItem'
BoardItem:
type: object
properties:
item_id:
type: integer
position:
type: integer
prompt:
type: string
params:
type: object
additionalProperties: true
Error:
type: object
properties:
error:
type: string
note:
type: string
required:
- error
example:
error: no dataset 'x'
note: absent is not an empty success
Meta:
type: object
description: Attached to every JSON response. `harvest` maps each source id to its last successful harvest timestamp.
properties:
harvest:
type: object
additionalProperties:
type: string
api_version:
type: string
example:
harvest:
ilo: '2026-08-10 03:14:22'
wb: '2026-08-10 03:15:01'
api_version: '0.1'
FeedItem:
type: object
properties:
id:
type: string
title:
type: string
author:
type: string
description: Anonymised handle — never a key or IP.
updated_at:
type: string
items:
type: integer
preview:
type: string
description: First prompt on the board, as a teaser.
BoardSummary:
type: object
properties:
id:
type: string
title:
type: string
updated_at:
type: string
items:
type: integer
description: Number of items on the board.
visibility:
type: string
enum:
- public
- private
public:
type: boolean
description: Effective public state (a forced-public free board is public even if visibility says otherwise).
forced_public:
type: boolean
description: True when the free-tier rule forces this board public.
parameters:
BoardId:
name: did
in: path
required: true
description: Board id, of the form `db_` followed by hex.
schema:
type: string
pattern: ^db_[0-9a-f]+$
example: db_1a2b3c4d5e
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: Your StackData API key. Optional — omit it to use the free tier (identified by IP).
SessionCookie:
type: apiKey
in: cookie
name: sd_session
description: The httpOnly session cookie set at sign-in (production, same-site).
BearerAuth:
type: http
scheme: bearer
description: 'The session token returned in the login body, sent as `Authorization: Bearer <token>` (the app''s cross-origin path).'