What YNAB API Actually Is

YNAB API Interface

YNAB's API launched in June 2018. It's a REST API that spits out JSON - standard stuff if you've used any API before. Base URL is https://api.ynab.com/v1 and everything comes back wrapped in a data object. The team documented how they use OpenAPI/Swagger to build their interactive docs, which is why their API documentation actually works.

Personal Tokens vs OAuth

Personal tokens are way easier for personal projects. Go to your YNAB settings, generate a token, done. Never expires unless you revoke it. Perfect for automating your own budget or pulling reports.

OAuth is required if you're building an app for other people. Standard OAuth 2.0 flow - nothing weird here. You start in "restricted mode" (25 users max) until YNAB manually approves your app. Takes a few days typically. The starter kit shows how OAuth works if you need examples.

Use personal tokens unless you hate yourself and want to deal with OAuth. Way easier - the setup is 5 minutes vs 2 hours.

What Actually Works

The API hits the main YNAB features you actually care about: Budgets - list them, get metadata, the usual stuff. Accounts - balances, transactions, everything you'd expect. Categories - read budgeted amounts, modify them (this is where it gets useful). Transactions - create, update, delete, full CRUD on everything. Payees - manage who you pay money to. All the endpoints are documented if you want the full reference.

Delta sync saves your ass - only returns what changed since your last request. Saves bandwidth and makes everything faster. Learned this when I was hitting rate limits every 10 minutes debugging transaction imports - switched to delta requests and suddenly my problems went away. The OpenAPI specification includes all the technical details if you need to generate your own client.

Rate Limits and Gotchas

API Rate Limiting

200 requests per hour in a rolling window. Hit the limit, get a 429 error, wait it out. The limit is fine for most personal projects - I've never hit it building automation scripts. But if you're polling every 5 minutes, you'll run into trouble. The official rate limiting docs explain how to check your remaining requests in response headers.

Pro tip: Cache responses and use delta requests. Don't be the person fetching all transactions every time when you only need the new ones.

Milliunits confused the shit out of me for like a week: $100.50 becomes 100500 milliunits. Why? Because JavaScript's floating point math is garbage and YNAB didn't want transaction amounts to randomly change by a penny. More details here.

Error handling is pretty good - actual useful messages instead of generic 500s. The API docs are solid too, with interactive examples you can test right in your browser. For more context on the API design decisions, check out YNAB's support overview which explains the philosophy behind their developer tools.

Getting Started - The Real Way

Development Workflow

5-Minute Setup (Actually This Time)

  1. Go to YNAB settings
  2. Click "New Token", enter your password
  3. Copy the token somewhere safe (you can't see it again)
  4. Test your token with this curl command (replace YOUR_TOKEN with your actual token):
## Replace YOUR_TOKEN with your real token from step 3
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.ynab.com/v1/budgets"

Success means JSON with your budgets. A 401 means your token is wrong. You can also test using the interactive API explorer in your browser which handles authentication for you.

SDKs That Actually Work

Programming Languages

The official SDKs actually work - don't reinvent the wheel:

JavaScript (npm): Works in browsers and Node. The starter kit is worth looking at if you need OAuth examples. TypeScript definitions included.

Ruby (gem): Clean API, handles auth headers automatically. Better than the community alternatives.

Python (PyPI): Official library that finally replaces the janky community versions. Works with Python 3.8+.

For other languages, community SDKs exist but they're hit-or-miss quality-wise.

Milliunits Will Break Your Brain

Every dollar amount is multiplied by 1000. $50.00 = 50000 milliunits. $0.01 = 10 milliunits.

This confused the absolute hell out of me when I first started. I kept thinking my transactions were showing amounts 1000x too large. The API docs explain why - it's because JavaScript math with decimals is garbage and YNAB didn't want transaction amounts to randomly drift by a penny due to floating point errors.

// Wrong
const amount = 50.00;

// Right  
const amount = 50000; // $50.00 in milliunits

Real-World Gotchas I've Hit

Error 429 during development: The 200/hour limit hits fast when you're debugging. Cache your responses or you'll be sitting there waiting.

Subscription lapses: If someone's YNAB subscription expires, you get 403s immediately. Handle this gracefully or users will think your app is broken.

Date format strictness: Use ISO format (YYYY-MM-DD) or transactions fail silently. date-fns handles this better than Moment.js (which is deprecated now). Learned this the hard way when half my imports randomly failed.

Category deletion: You can't delete categories through the API. Had to tell users to do it manually in YNAB, then sync. Fucking annoying.

Production nightmare I had: Deployed to production and realized all transaction amounts were showing 1000x too large because I forgot to convert from milliunits. Took down the app for 2 hours while I fixed it at 3am. Always test your milliunit conversions.

Community Tools Worth Using

The Works with YNAB showcase has 30+ apps, but most are abandoned projects or demos. These actually work:

  • Sync for YNAB: European bank import. Saves you from scraping bank websites.
  • Bank2YNAB: CSV conversion tool for US banks. Open source.
  • Toolkit for YNAB: Browser extension that adds features YNAB should have built.

Debug Like a Pro

API Debugging

Turn on request logging in whatever HTTP client you're using. YNAB's error messages are actually helpful:

{
  "error": {
    "id": "400.1", 
    "name": "invalid_request",
    "description": "Budget not found"
  }
}

Way better than generic 400s. The status page shows if the API is having issues.

Pro tip: Use the browser dev tools on api.ynab.com/v1 to test calls interactively. Built-in Swagger UI that actually works.

YNAB API vs The Competition (What Actually Matters)

Feature

YNAB API

PocketSmith API

Tiller

Setup/Authentication

Personal tokens work in 5 minutes. OAuth takes 30 minutes if you need it.

OAuth-only setup is a pain in the ass for personal projects

  • takes 30 minutes minimum.

It's Google Sheets API authentication

  • if you've done that before, you know the pain takes 2+ hours.

Rate Limits

200 requests/hour is fine unless you're debugging (then you'll hit it fast).

3,600/hour limit is overkill.

No rate limits because it's just spreadsheets.

CRUD Capabilities

Full CRUD on everything.

Read-only sucks if you want to write data.

You can write data but it's complicated.

Cost

$109/year but you need YNAB anyway.

$10-19/month.

$79/year.

Best For

You're already using YNAB. The ecosystem is solid and the API works well. Personal tokens make development painless.

You need multi-currency support or read-only access to global bank connections. Their forecasting features are better than YNAB's.

You're a spreadsheet person and want ultimate flexibility. But you'll spend way more time on data wrangling than app features.

Bank Connections

Sync for YNAB covers most European banks if you're using YNAB.

wins globally

N/A

Historical Data

They all keep everything.

They all keep everything.

They all keep everything.

Real-time Updates

YNAB has delta sync

PocketSmith has webhooks

Tiller updates when you tell it to.

Data Quality

YNAB forces zero-based budgeting (love it or hate it).

PocketSmith is flexible.

Tiller is "whatever you put in the spreadsheet."

Questions Developers Actually Ask

Q

Do I need a YNAB subscription to use the API?

A

Yeah, obviously. The API is free but you need an active YNAB subscription ($109/year as of 2025). No subscription = no API access. You get 403 errors immediately if your subscription lapses.

Q

Personal tokens vs OAuth - which one should I use?

A

Personal tokens for your own stuff. They're way easier

  • generate once, use forever. Perfect for automating your own budget or pulling reports.OAuth only if you're building an app for other people. Standard OAuth flow, nothing weird. Just more setup work and you start limited to 25 users until YNAB approves your app. OAuth is a pain in the ass but required if you're building for other people.
Q

Am I gonna hit this 200/hour rate limit?

A

Nah, not unless you're doing something stupid. I've built scripts that sync every 30 minutes and never hit the limit. But when you're debugging? You'll blow through 200 requests in 10 minutes and wonder why your calls are failing.The limit exists because YNAB doesn't want people hammering their servers. Use delta requests and caching

  • be a good API citizen.
Q

What's the deal with milliunits - why is my $50 transaction showing as 50000?

A

$50.00 = 50000 milliunits. Everything is multiplied by 1000.This confuses literally everyone for like an hour when they first start. The reason is JavaScript's floating point math is garbage for financial calculations, so YNAB uses integers.javascript// Your first transaction will look wrong{"amount": 50000 // This is actually $50.00}

Q

Can I actually modify transactions or is this read-only garbage?

A

Yes, full CRUD on transactions. Create splits, transfers, whatever. The transaction docs have examples.Gotcha: You can't delete categories through the API. Users have to do that manually in YNAB, then your app can sync the changes.

Q

Multi-currency support?

A

Nope. Each YNAB budget is single-currency. If you need multi-currency, you're looking at separate budgets or using PocketSmith instead.

Q

What happens when someone's subscription expires?

A

Immediate 403 errors with "subscription_lapsed" in the error message. Handle this gracefully or users will think your app is broken.You'll see something like this (actual error I got last week):json{"error": {"id": "403.1","name": "subscription_lapsed", "description": "Subscription required for API access"}}

Q

Are there webhooks or real-time updates?

A

No webhooks. You poll endpoints or use delta requests. Delta is way better

  • only returns what changed since your last sync.Most budget apps don't need real-time updates anyway. Polling every few minutes is fine.
Q

Can I build reports with the API?

A

The API gives you raw data, you build the reports.

Transactions, categories, accounts

  • it's all there. Way more flexible than YNAB's built-in reports.Check out Toolkit for YNAB for examples of what's possible.
Q

How do I debug API issues?

A

YNAB's error messages are actually helpful (unlike most APIs):json{"error": {"id": "400.1","name": "budget_not_found","description": "Budget with id 'fake-id' not found"}}Use the interactive docs at api.ynab.com/v1 to test calls. Way faster than Postman.

Q

Which programming language should I use?

A

The official SDKs (JavaScript, Ruby, Python) are solid. Use those.For other languages, community libraries exist but quality varies. Sometimes it's easier to just hit the REST endpoints directly.

Q

How do I handle OAuth for multiple budgets?

A

OAuth apps can access all budgets the user authorizes. Users can set a "default" budget in their settings, which is useful for apps that only need one budget.Most personal finance apps work with one budget at a time anyway.

Related Tools & Recommendations

tool
Similar content

Binance API - Build Trading Bots That Actually Work

The crypto exchange API with decent speed, horrific documentation, and rate limits that'll make you question your career choices

Binance API
/tool/binance-api/overview
100%
compare
Recommended

Stripe vs Plaid vs Dwolla vs Yodlee - Which One Doesn't Screw You Over

Comparing: Stripe | Plaid | Dwolla | Yodlee

Stripe
/compare/stripe/plaid/dwolla/yodlee/payment-ecosystem-showdown
88%
tool
Similar content

Interactive Brokers TWS API: Code Real Trading Strategies

TCP socket-based API for when Alpaca's toy limitations aren't enough

Interactive Brokers TWS API
/tool/interactive-brokers-api/overview
71%
tool
Similar content

Insomnia API Client: Open-Source REST/GraphQL Tool Overview

Kong's Open-Source REST/GraphQL Client for Developers Who Value Their Time

Insomnia
/tool/insomnia/overview
69%
tool
Similar content

Alpaca Trading API Overview: Build Bots & Trade Commission-Free

Actually works most of the time (which is better than most trading platforms)

Alpaca Trading API
/tool/alpaca-trading-api/overview
63%
tool
Similar content

Perplexity AI API: Real-World Review, Setup & Hallucination Fix

I've been testing this shit for 6 months and it finally solved my "ChatGPT makes up facts about stuff that happened yesterday" problem

Perplexity AI API
/tool/perplexity-api/overview
58%
review
Recommended

Zapier Enterprise Review - Is It Worth the Insane Cost?

I've been running Zapier Enterprise for 18 months. Here's what actually works (and what will destroy your budget)

Zapier
/review/zapier/enterprise-review
57%
tool
Similar content

Gemini AI Overview: Google's Multimodal Model, API & Cost

Explore Google's Gemini AI: its multimodal capabilities, how it compares to ChatGPT, and cost-effective API usage. Learn about Gemini 2.5 Flash and its unique a

Google Gemini
/tool/gemini/overview
53%
tool
Similar content

Apollo GraphQL Overview: Server, Client, & Getting Started Guide

Explore Apollo GraphQL's core components: Server, Client, and its ecosystem. This overview covers getting started, navigating the learning curve, and comparing

Apollo GraphQL
/tool/apollo-graphql/overview
53%
tool
Similar content

Prisma ORM: TypeScript Client, Setup Guide, & Troubleshooting

Database ORM that generates types from your schema so you can't accidentally query fields that don't exist

Prisma
/tool/prisma/overview
53%
tool
Similar content

Kibana - Because Raw Elasticsearch JSON Makes Your Eyes Bleed

Stop manually parsing Elasticsearch responses and build dashboards that actually help debug production issues.

Kibana
/tool/kibana/overview
53%
tool
Recommended

Plaid Link Implementation - The Real Developer's Guide

competes with Plaid Link

Plaid Link
/tool/plaid-link/implementation-guide
53%
integration
Recommended

Stripe + Plaid Identity Verification: KYC That Actually Catches Synthetic Fraud

KYC setup that catches fraud single vendors miss

Stripe
/integration/stripe-plaid/identity-verification-kyc
53%
tool
Similar content

KrakenD API Gateway: Fast, Open Source API Management Overview

The fastest stateless API Gateway that doesn't crash when you actually need it

Kraken.io
/tool/kraken/overview
50%
tool
Similar content

GPT4All - ChatGPT That Actually Respects Your Privacy

Run AI models on your laptop without sending your data to OpenAI's servers

GPT4All
/tool/gpt4all/overview
50%
howto
Popular choice

How to Actually Get GitHub Copilot Working in JetBrains IDEs

Stop fighting with code completion and let AI do the heavy lifting in IntelliJ, PyCharm, WebStorm, or whatever JetBrains IDE you're using

GitHub Copilot
/howto/setup-github-copilot-jetbrains-ide/complete-setup-guide
50%
tool
Similar content

Ollama: Run Local AI Models & Get Started Easily | No Cloud

Finally, AI That Doesn't Phone Home

Ollama
/tool/ollama/overview
48%
tool
Similar content

Arbitrum Orbit: Launch Your Own L2/L3 Chain - Get Started Guide

Learn how to launch your own dedicated L2/L3 chain with Arbitrum Orbit. This guide covers what Orbit is, its deployment reality, and answers common FAQs for beg

Arbitrum Orbit
/tool/arbitrum-orbit/getting-started
48%
howto
Popular choice

Build Custom Arbitrum Bridges That Don't Suck

Master custom Arbitrum bridge development. Learn to overcome standard bridge limitations, implement robust solutions, and ensure real-time monitoring and securi

Arbitrum
/howto/develop-arbitrum-layer-2/custom-bridge-implementation
48%
tool
Recommended

Stripe Terminal React Native SDK - Turn Your App Into a Payment Terminal That Doesn't Suck

integrates with Stripe Terminal React Native SDK

Stripe Terminal React Native SDK
/tool/stripe-terminal-react-native-sdk/overview
48%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization