Beancount.io Graph QL API
Beancount.io GraphQL API - blog, docs, and ledger queries
Beancount.io GraphQL API - blog, docs, and ledger queries
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/beancount-io:beancount-io-graph-ql-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. 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: Beancount.io GraphQL API
description: Plain-Text Accounting. Powerful, Precise, Auditable. — Plain-text double-entry accounting with git versioning, BQL queries, CSV import, and MCP integration. Use scoped API keys or OAuth 2.1. See /mcp for Model Context Protocol and /graphql for the GraphQL endpoint. Free tier available; sandbox at https://beancount.io/demo.
version: 1.0.0
contact:
name: Beancount.io
url: https://beancount.io
email: hello@beancount.io
license:
name: MIT
url: https://opensource.org/license/mit
servers:
- url: https://beancount.io
description: Production
security:
- ApiKeyAuth: []
- OAuth2:
- read
- write
tags:
- name: Graph QL
description: Beancount.io GraphQL API - blog, docs, and ledger queries
paths:
/graphql:
post:
operationId: executeGraphQL
summary: Execute GraphQL query
description: 'Primary API for Beancount.io content and ledger data. Supports 12 operations over 22 types: blogPosts, blogPost, blogTags, researchLogPosts, etc. Requires scoped API key (X-API-Key) or OAuth 2.1 Bearer. Rate limited: 60 req/min; check RateLimit headers and Retry-After on 429. Cost directives documented per operation.'
tags:
- Graph QL
security:
- ApiKeyAuth: []
- OAuth2:
- read
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- query
properties:
query:
type: string
description: GraphQL query string
variables:
type: object
additionalProperties: true
description: Query variables
operationName:
type: string
description: Operation name when query contains multiple operations
examples:
blogPosts:
value:
query: 'query { blogPosts(page: 1, pageSize: 5) { posts { slug title } totalCount } }'
parameters:
- name: X-API-Key
in: header
description: Scoped API key - request only the scopes you need (read, write, admin). Self-serve at /pricing or /contact for sandbox keys.
schema:
type: string
responses:
'200':
description: GraphQL response
headers:
RateLimit-Limit:
description: Requests per minute
schema:
type: integer
RateLimit-Remaining:
description: Remaining requests in window
schema:
type: integer
RateLimit-Reset:
description: Seconds until window resets
schema:
type: integer
content:
application/json:
schema:
type: object
properties:
data:
type: object
nullable: true
description: Operation result
errors:
type: array
items:
$ref: '#/components/schemas/Error'
'400':
description: Bad request - structured JSON error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - missing or invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limited - check Retry-After
headers:
Retry-After:
description: Seconds to wait before retry
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
get:
operationId: graphqlIntrospection
summary: GraphQL introspection (GET)
description: Introspection via GET for tooling. Same auth and rate limits as POST. Returns typed schema with 22 types and cost directives.
tags:
- Graph QL
security:
- ApiKeyAuth: []
- OAuth2:
- read
parameters:
- name: query
in: query
required: true
schema:
type: string
description: GraphQL query string (URL-encoded)
responses:
'200':
description: Introspection result
content:
application/json:
schema:
type: object
'429':
description: Rate limited
headers:
Retry-After:
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Error:
type: object
required:
- code
- message
properties:
code:
type: string
description: Machine-readable error code, e.g. BAD_REQUEST, UNAUTHORIZED, RATE_LIMITED
message:
type: string
description: Human-readable message
hint:
type: string
description: Resolution hint - what to do next
details:
type: object
additionalProperties: true
description: Optional structured details
ErrorResponse:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: 'Scoped API key. Roles: read (query content/ledgers), write (ledger edits), admin (full). Request only needed scopes. Self-serve keys via dashboard; free tier and sandbox available at /demo. Rotate via API.'
OAuth2:
type: oauth2
description: OAuth 2.1 with PKCE for MCP and GraphQL. Scopes enforce least privilege.
flows:
authorizationCode:
authorizationUrl: https://beancount.io/oauth/authorize
tokenUrl: https://beancount.io/oauth/token
scopes:
read: Read ledgers, queries, and content
write: Edit ledgers and commit changes
admin: Full administrative access
clientCredentials:
tokenUrl: https://beancount.io/oauth/token
scopes:
read: Read ledgers, queries, and content
write: Edit ledgers and commit changes