Instabooks delivers fast read-only PostgreSQL access to QuickBooks Online data. Unlock ledger-backed analytics, agents and applications.
psql session in Terminal.
Access your company's books as SQL tables: transactions, lines, the chart of accounts, classes, departments, customers, and vendors. They stay in sync with QuickBooks Online the same way the rest of Instabooks does.
We support the PostgreSQL wire protocol: no plugin, no connector to install beyond your client's own Postgres driver.
Things to know before you start:
In Instabooks, click the gear next to your email, top right, to open Settings, then Database Access. Open the company you want to query and click Generate password. Give it a note describing what it is for, such as "monthly revenue script" or "Excel on my laptop", so you can tell your passwords apart later.
The password is shown once. Copy it when it appears. If you lose it, revoke it and generate another.
Every Postgres client asks for the same five things. The exact values for your company are on the Settings → Database Access page. This is what they mean:
| Field | Value |
|---|---|
| Host | db.instabooks.io |
| Port | 5432 |
| Database | Your company's numeric id. One company, one database. If you have several, each has its own. |
| User | Your Intuit email address. Visible in the top right corner when signed in to Instabooks. |
| Password | The password you generated above. |
TLS is required. The connection is always
encrypted; a client that asks for an unencrypted connection is
refused. Most clients do the right thing on their own. Where one
needs to be told, set its SSL mode to require.
Connect in one command, and use psql's schema commands to explore the tables.
Browse the tables and run queries in an editor with Postico, DBeaver, TablePlus, or pgAdmin.
Pull the books into a worksheet with Power Query, and refresh them on demand.
Python, Java, Go, Ruby, or anything else with a Postgres driver.
We've distilled the complex Quickbooks Online data model into a simple, powerful, and consistent double-entry SQL schema.
select date_trunc('month', l.date) as month,
sum(l.amount) as revenue
from transaction_lines l
join accounts a on l.account_oid = a.oid
where a.type = 'Income'
group by date_trunc('month', l.date)
order by month;
The full column-by-column reference, the supported SQL, and the gotchas worth knowing before you sum anything are in Tables & SQL.