# Baton Rouge & East Baton Rouge Parish Spending - Every Payment (`j0401/ebr-spending`) Actor

Every payment line the City-Parish of Baton Rouge has issued (public open data, 1.26M lines, FY2018-today): vendor and its diversity classification, department, fund, program, expense category and commodity, plus the invoice and check behind it. Filter by vendor, department, amount or date.

- **URL**: https://apify.com/j0401/ebr-spending.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 baton rouge 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

## Baton Rouge & East Baton Rouge Parish Spending - Every Payment

Every payment line the City of Baton Rouge / East Baton Rouge Parish has cut,
straight from the City-Parish's own accounting system. **1.26 million payment
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 Parish paid, with the money and the supplier's
profile attached to it:

- **Who was paid** - vendor name, city, state and ZIP, plus the vendor's
  diversity classification
- **Who spent** - the department, division, purchasing department, program,
  subprogram and government function
- **Out of what** - the fund
- **On what** - the expense category and the commodity code and description
- **How much** - the line amount, the check number and date, the invoice number
  and date, and the purchase order / contract the line draws against

### Supplier diversity is the deep part

Each line carries the Parish's own classification of the vendor as a set of
clean **Y/N** flags you can filter on directly:

- `minorityOwned`, `disadvantagedOwned`, `disabledVeteranOwned`
- `smallMinorityOwned`, `smallWomanOwned`, `smallVeteranOwned`,
  `smallMinorityWomanOwned`, `smallDisabledVeteran`, `smallDisadvantagedOwned`,
  `smallNonMinorityOwned`
- `independentContractor`

Slice a department's spend by the kinds of suppliers it actually reaches.

### Filter it

- **Vendor** - `vendorName="FIRE"` finds every payment to that supplier.
- **Department / division / program** - `department="LIBRARY"`,
  `division="FIRE PROTECT"`, `program="PUBLIC SAFETY"`.
- **Where the money came from** - `fund="GENERAL"`.
- **Amount** - `minAmount=10000` for five-figure lines (and up).
- **Date** - `checkFrom="2026-01-01"` for this year's checks.
- **Diversity** - `minorityOwned="Y"` for minority-owned suppliers only.

### Example inputs

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

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

**A department's year** - combine department and date.

```json
{ "department": "LIBRARY", "checkFrom": "2026-01-01", "maxResults": 50 }
```

**Minority-owned spend** - one flag.

```json
{ "minorityOwned": "Y", "maxResults": 50 }
```

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

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

### Or roll it up

Set `mode=aggregate` and get a rolled-up count by **fiscal year**,
**department**, **division**, **program**, **function**, **expense category**,
**payment type**, **payment status**, **vendor state**, **vendor type** or
**fund**. Every group comes back - this mode is not cut off by `maxResults`.

### Then follow the money

- Every line a supplier has been paid from the Parish, and for what.
- A department's spend by fund, by program, by expense category (aggregate mode
  counts the lines in each - one dimension per run).
- Diversity spend: filter to minority-, woman-, veteran-owned or small-business
  lines and compare the counts across runs.
- Recent checks first - the newest check date leads; use `minAmount` to zero in
  on larger payments.

### Example output

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

```json
{
 "platform": "ebr-spending",
 "source": "east-baton-rouge-parish-spending",
 "mode": "rows",
 "fiscalYear": "2026",
 "department": "FIRE PROTECTION DISTRICTS",
 "vendorName": "BROWNSFIELD FIRE DEPARTMENT",
 "checkNumber": "8055",
 "checkDate": "2026-10-02",
 "amount": "76.48",
 "expenseCategory": "EDUCATIONAL ALLOWANCES",
 "paymentStatus": "Cleared",
 "minorityOwned": "N",
 "vendorCity": "BATON ROUGE",
 "vendorState": "LA"
}
```

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

```
OTHER                            457,509
ENVIRONMENTAL SERVICES            96,097
FLEET MANAGEMENT                  78,569
CLERK OF COURT                    71,032
LIBRARY BOARD OF CONTROL          63,468
HUMAN DEVELOPMENT AND SERVICES    39,511
```

### Notes on the data, from the source

- **A row is an invoice line, not a payment.** One check pays many invoices and
  an invoice can carry many lines. `checkNumber` is the payment; the amount is
  the line.
- **Reversals are in here.** 10,656 rows are negative - real accounting
  entries, returned as they stand. Set `minAmount=0.01` for spending only.
- **The diversity flags follow the vendor, so they are present on the ~86% of
  lines that carry a vendor name** - the same coverage as `vendorName`. Where the
  Parish holds a fuller profile, `vendorGender`, `vendorEthnicity` and
  `vendorClass` are added, and read as sentinel text ("NOT PROVIDED") rather than
  blank.
- **Not every line has a vendor.** ~86% carry a `vendorName`; the rest are
  internal transfers with no supplier.
- **`sourceUpdatedAt` carries the newest check 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. 'FIRE' or 'LLC'.

## `department` (type: `string`):

Substring match on the spending department, e.g. 'LIBRARY'.

## `division` (type: `string`):

Substring match on the division, e.g. 'FIRE PROTECT'.

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

Substring match on the budget program.

## `function` (type: `string`):

Substring match on the government function, e.g. 'PUBLIC SAFETY'.

## `purchasingDepartment` (type: `string`):

Substring match on the procuring department's name.

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

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

## `expenseCategory` (type: `string`):

Substring match on the expense category, e.g. 'EDUCATIONAL'.

## `commodityCode` (type: `string`):

Prefix match on the NIGP-style commodity code.

## `commodityDescription` (type: `string`):

Substring match on the commodity description.

## `paymentType` (type: `string`):

Substring match on the payment type code.

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

Cleared = the check has cleared; Not Cleared = outstanding.

## `fiscalYear` (type: `string`):

Four-digit fiscal-year label, matched exactly, e.g. '2026'.

## `vendorCity` (type: `string`):

Substring match on the vendor's city.

## `vendorState` (type: `string`):

Two-letter state code, matched exactly.

## `vendorZip` (type: `string`):

Exact vendor ZIP code.

## `vendorType` (type: `string`):

Substring match on the vendor type code.

## `checkNumber` (type: `string`):

Exact check number (digits only).

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

Substring match on the invoice number.

## `sourceDocumentNumber` (type: `string`):

Substring match on the purchase order / contract number the line draws against.

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

Smallest line amount in dollars. Leave blank to include refunds/reversals (negative rows).

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

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

## `checkFrom` (type: `string`):

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

## `checkTo` (type: `string`):

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

## `minorityOwned` (type: `string`):

Y = minority-owned supplier only.

## `disadvantagedOwned` (type: `string`):

Y = disadvantaged-business-enterprise only.

## `disabledVeteranOwned` (type: `string`):

Y = disabled-veteran-owned only.

## `smallDisabledVeteran` (type: `string`):

Y = small disabled-veteran business only.

## `smallMinorityOwned` (type: `string`):

Y = small minority-owned only.

## `smallMinorityWomanOwned` (type: `string`):

Y = small minority-woman-owned only.

## `smallNonMinorityOwned` (type: `string`):

Y = small non-minority-owned only.

## `smallDisadvantagedOwned` (type: `string`):

Y = small disadvantaged-owned only.

## `smallVeteranOwned` (type: `string`):

Y = small veteran-owned only.

## `smallWomanOwned` (type: `string`):

Y = small woman-owned only.

## `independentContractor` (type: `string`):

Y = payments to independent contractors.

## `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": "",
  "department": "",
  "division": "",
  "program": "",
  "function": "",
  "purchasingDepartment": "",
  "fund": "",
  "expenseCategory": "",
  "commodityCode": "",
  "commodityDescription": "",
  "paymentType": "",
  "paymentStatus": "",
  "fiscalYear": "",
  "vendorCity": "",
  "vendorState": "",
  "vendorZip": "",
  "vendorType": "",
  "checkNumber": "",
  "invoiceNumber": "",
  "sourceDocumentNumber": "",
  "checkFrom": "",
  "checkTo": "",
  "minorityOwned": "",
  "disadvantagedOwned": "",
  "disabledVeteranOwned": "",
  "smallDisabledVeteran": "",
  "smallMinorityOwned": "",
  "smallMinorityWomanOwned": "",
  "smallNonMinorityOwned": "",
  "smallDisadvantagedOwned": "",
  "smallVeteranOwned": "",
  "smallWomanOwned": "",
  "independentContractor": "",
  "mode": "rows",
  "groupBy": "department",
  "maxResults": 50
}
```

# Actor output Schema

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

Baton Rouge & East Baton Rouge Parish Spending - Every Payment 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/ebr-spending").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/ebr-spending").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/ebr-spending --silent --output-dataset

```

## MCP server setup

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

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/RKsQArr5KNR13I9RE/builds/MH4R0ZgZS5ngLgV1L/openapi.json
