What you need
- An Outcrawl API key in
OUTCRAWL_API_KEY. - One profile per portal, signed in and labelled
ap-<vendor>(ap-aws,ap-zoom…). Sign each one in once: from TypeScript withoc.browser({ profile }), or with an agent run that types your password from a text secret, reading any emailed code through an inbox integration such as AgentMail. - Optional:
SHEET_WEBHOOK_URL, an endpoint of yours that appends rows to your sheet or accounting system, for example a Google Apps Script web app.
How it works
1
Every portal at once, inside your limit
Every key on your account shares one browser slot count. Browsers, agent runs, crawls, searches and scrapes that aren’t served from cache each hold a slot. The program keeps
MAX_AT_ONCE portals going, below your plan’s count. A submit over the limit is refused with ConcurrencyLimitError, and the program waits 20 seconds and tries again; a QuotaExceededError for requests per minute says how long to wait in retryAfterSeconds.2
An agent reads each billing page
3
The invoice text, read as the same user
Once a run ends its profile is free, and a scrape of each PDF link with that profile reads the invoice as the signed-in user. Its text is saved as
invoices/2026-08/<vendor>-<number>.md.4
Filed as a CSV
Every row goes into
invoices/2026-08/invoices.csv, and, if you set SHEET_WEBHOOK_URL, to your own endpoint as JSON.Outcrawl does not hand you the PDF file itself: files go into a run, never out. What you keep is the invoice’s text, read from its link. A scanned PDF with no text layer, or a link that has expired, is marked
unread in the stored column; a portal that builds the PDF in the browser and shows no link leaves it empty. Download those ones yourself.The program
What you get back
invoices/2026-08/invoices.csv:
What it costs
An agent run is billed for the model’s usage, browser time and proxy usage, and a scrape is 1 credit a page, per pricing. A typical agent run costs about 15 credits a minute all in, proxy usage included. That is an estimate: the real figure depends on the task, and a page-heavy portal costs more.- Each portal takes about 2 minutes: about 30 credits.
- Each invoice PDF is about 1 credit.
caps.budget is 150.
Make it yours
- File straight into your accounting: replace the sheet POST with one call per row to your accounting system’s API to create a bill.
- Run it on the 3rd of every month from your own scheduler (cron, a CI schedule) and set
MONTHfrom the date. - Catch what is unpaid: post every row whose
statusisdueoroverdueto Slack. - Let a run sign back in when a session has lapsed: give it your password as a secret and an inbox integration for the code.
Related
Profiles
One signed-in browser per portal.
Agents
Runs, caps and typed results.
Scrape
Read a page or a PDF as text.
Files
What goes into a run, and why nothing comes out.