# Los Angeles City Checkbook - Every City Payment, Line by Line (`j0401/la-city-checkbook`) Actor

Checkbook L.A. - every transaction the City of Los Angeles has paid (public open data, 6.52M invoice lines, FY2018-today): vendor, department, fund, account, expenditure type and payment method, plus the purchase order behind each line. Filter by vendor, department, amount or date.

- **URL**: https://apify.com/j0401/la-city-checkbook.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 los angeles payment records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Los Angeles City Checkbook - Every City Payment, Line by Line

Checkbook L.A. - every transaction the City of Los Angeles has paid, straight
from the Controller's open checkbook. **6.52 million invoice lines**, from
fiscal 2018 through today.

### Low cost

**From $0.00005 per record, down to $0.00003 at Gold.** Pay only for the records
you actually receive - the whole register stays queryable, you are never billed
for the scan behind it.

### What you get

One row per invoice line the City paid, with the full procurement chain attached
to it:

- **Who was paid** - vendor name, vendor id and supplier city/country
- **Who spent** - the department, program, business unit and buying organization
- **Out of what** - the fund group, fund type, fund, account and account code
- **On what** - the expenditure type, item code and description
- **How much** - the line amount, the payment method and status
- **Tied back to** - the purchase order and its date, the invoice and its due
  date, and the line number on each

### Filter it

- **Vendor** - `vendorName="HEIL"` finds every payment to that supplier.
- **Vendor by id** - `vendorId="100004988"` follows one supplier across its
  name variants.
- **Department / program** - `departmentName="POLICE"`,
  `program="SENIOR SERVICES"`.
- **Where the money came from** - `fundType="SPECIAL REVENUE"`,
  `fundName="OMBUDSMAN"`.
- **Amount** - `minAmount=1000000` for seven-figure lines.
- **Date** - `txnFrom="2026-01-01"` for this year's payments.
- **Fiscal year** - `fiscalYear=2026`.

### Example inputs

**Payments to one supplier** - `vendorName` is a substring match.

```json
{ "vendorName": "HEIL", "maxResults": 25 }
```

**One department, one year** - combine department and date.

```json
{ "departmentName": "PUBLIC WORKS - STREET SERVICES", "txnFrom": "2026-01-01", "maxResults": 50 }
```

**The largest payments** - seven figures and up.

```json
{ "minAmount": 1000000, "maxResults": 50 }
```

**Where the money goes** - `mode=aggregate` returns one count row per department;
every group comes back.

```json
{ "mode": "aggregate", "groupBy": "departmentName" }
```

### Or roll it up

Set `mode=aggregate` and get a rolled-up count by **fiscal year**,
**department**, **fund type**, **fund group**, **government activity**,
**expenditure type** or **payment method**. Every group comes back - this mode
is not cut off by `maxResults`.

### Then follow the money

- Every line a supplier has been paid by the City, and for what.
- A department's spend by fund, by expenditure type, by month.
- Enterprise (Water and Power, Harbor) vs. General Fund spend, side by side.
- The biggest payments - newest first.

### Example output

**One payment line** - `vendorName=HEIL`:

```json
{
 "platform": "la-city-checkbook",
 "source": "los-angeles-city-checkbook",
 "mode": "rows",
 "transactionDate": "2026-09-09",
 "transactionId": "EPAY26270000000585",
 "vendorName": "THE HEIL CO",
 "vendorId": "000045316",
 "amount": "150",
 "departmentName": "GENERAL SERVICES",
 "fundType": "GENERAL FUND",
 "expenditureType": "SUPPLIES & OTHER SERVICES",
 "paymentMethod": "EFT",
 "paymentStatus": "PAID",
 "poNumber": "CPO40270000407919"
}
```

**`mode=aggregate`, `groupBy=departmentName`** - one count row per department:

```
GENERAL SERVICES                       1,434,908
WATER AND POWER                          836,701
RECREATION AND PARKS                     565,070
POLICE                                   373,112
NON-DEPARTMENTAL - APPROPRIATIONS       314,295
PUBLIC WORKS - STREET SERVICES           304,092
FIRE                                     265,807
```

### Notes on the data, from the source

- **A row is an invoice line, not a payment.** One payment authorization pays
  many invoices and an invoice carries many lines. `transactionId` is the
  payment; the amount is the line.
- **Reversals are in here.** A low tens of thousands of rows are negative - real
  accounting entries, returned as they stand. Set `minAmount=0.01` for spending
  only.
- **The fiscal year column carries a few stray rows** - a handful in 2006-2011
  against the hundreds of thousands in a real year. Filtering `fiscalYear` is
  exact, so those rows only appear if you ask for them.
- **`sourceUpdatedAt` carries the newest transaction date**, the freshness
  signal an agent can read without running the actor.

# Actor input Schema

## `vendorName` (type: `string`):

Substring match on the payee, e.g. 'HEIL' or 'LLC'.

## `vendorId` (type: `string`):

Substring match on the City vendor number.

## `departmentName` (type: `string`):

Substring match on the department, e.g. 'POLICE'.

## `program` (type: `string`):

Substring match on the City program, e.g. 'SENIOR SERVICES'.

## `fundType` (type: `string`):

Substring match on the fund type, e.g. 'GENERAL FUND'.

## `fundGroupName` (type: `string`):

Substring match on the fund group.

## `fund` (type: `string`):

Substring match on the fund code.

## `fundName` (type: `string`):

Substring match on the fund name.

## `accountName` (type: `string`):

Substring match on the account name.

## `governmentActivity` (type: `string`):

Substring match on the activity.

## `expenditureType` (type: `string`):

Substring match on the expenditure type, e.g. 'SUPPLIES'.

## `paymentMethod` (type: `string`):

Substring match on the payment method, e.g. 'EFT'.

## `paymentStatus` (type: `string`):

Substring match on the payment status.

## `authority` (type: `string`):

Substring match on the spending authority.

## `supplierCity` (type: `string`):

Substring match on the supplier's city.

## `description` (type: `string`):

Substring match on the line description.

## `poNumber` (type: `string`):

Substring match on the PO number.

## `invoiceNumber` (type: `string`):

Substring match on the invoice number.

## `transactionId` (type: `string`):

Exact payment (EFT / warrant) identifier.

## `fiscalYear` (type: `integer`):

Exact City fiscal year, e.g. 2026.

## `minAmount` (type: `number`):

Smallest line amount in dollars. Leave blank to include refunds/reversals.

## `maxAmount` (type: `number`):

Largest line amount in dollars. Blank = no upper bound.

## `txnFrom` (type: `string`):

Earliest transaction date, YYYY-MM-DD. Blank = any.

## `txnTo` (type: `string`):

Latest transaction date, YYYY-MM-DD. Blank = any.

## `mode` (type: `string`):

rows = records matching your filters (default). aggregate = one count row per group (see groupBy).

## `groupBy` (type: `string`):

Which dimension to aggregate over (mode=aggregate). Blank = the default dimension. Every group is returned - aggregate mode is not cut off by maxResults.

## `maxResults` (type: `integer`):

Cap the number of records returned (0 = default 50). Records are charged individually; there is no per-run charge cap.

## Actor input object example

```json
{
  "vendorName": "",
  "vendorId": "",
  "departmentName": "",
  "program": "",
  "fundType": "",
  "fundGroupName": "",
  "fund": "",
  "fundName": "",
  "accountName": "",
  "governmentActivity": "",
  "expenditureType": "",
  "paymentMethod": "",
  "paymentStatus": "",
  "authority": "",
  "supplierCity": "",
  "description": "",
  "poNumber": "",
  "invoiceNumber": "",
  "transactionId": "",
  "txnFrom": "",
  "txnTo": "",
  "mode": "rows",
  "groupBy": "departmentName",
  "maxResults": 50
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

Los Angeles City Checkbook - Every City Payment, Line by Line records - as JSON

## `datasetUrl` (type: `string`):

No description

## `runUrl` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("j0401/la-city-checkbook").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("j0401/la-city-checkbook").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call j0401/la-city-checkbook --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,j0401/la-city-checkbook"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XutW5zXocqDVN7HpH/builds/UZ7WBL8JfBDlhWJ2c/openapi.json
