# CA State & Local Grants - Open Opportunities & Awards (`j0401/ca-grants`) Actor

California Grants Portal (data.ca.gov, public): ~1,994 state/local grant programs ever listed + post-award disclosures per fiscal year. Find money open right now - filter ~169 active grants by agency / category / applicant type / deadline; research who won what.

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

## Pricing

$1.00 / 1,000 california grant records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## CA Grants Portal - open California state & local grants

California publishes its whole state/local **grant catalog** plus **who-won-what** as open data (data.ca.gov, under AB 132, run by the CA State Library). This actor turns it into a queryable, charged-per-record API - **great for grant writers, nonprofits, and government-relations teams hunting money that is open right now**.

### What it covers

- **Grant opportunities** - every program the portal lists, tagged with its current lifecycle status:
  - **`active` (~169):** open to apply **right now**. 128 of these accept applications on a rolling "Ongoing" basis; the rest have a hard application deadline.
  - **`forecasted` (2):** announced, not yet open.
  - **`closed` (1,823):** past programs - useful historical reference (agency, typical amounts, who it targeted).
  - Each row: agency, title, type (grant / loan), categories, purpose, applicant type, geography, funding source, **estimated funds**, open date, application deadline, grant URL, contact, and the portal's **change trail** (`ChangeNotes` + last-updated).
- **Grant awards** - post-award disclosures per fiscal year (2022-23 / 2023-24 / 2024-25): recipient name + type, agency, **award amount**, counties served, project status, and dollars used so far. Search by recipient or filter by agency / recipient type / county.
- **Aggregate mode** - one summary row per group (agency / status / type, or recipient type / county) with record counts per group.

### Typical questions

- "Which **state grants are open right now** that I can apply to?"
- "Grants in **water / food & nutrition / housing / tribal** with a deadline in the next 60 days?"
- "Who won **Housing grants** last fiscal year and for how much?"
- "Which agencies run the most open grants - where's the money concentrated?"

### Low cost

**From $0.001 per record** - a tenth of a cent, billed only for the rows you actually use, with a per-run charge cap so a broad pull can't surprise-bill.

This joins the portal's **live opportunity list** (open / forecasted / archived) to its **post-award disclosures across three fiscal years** - awards that the state files in separate tables per FY, which we union into one queryable corpus. The catalog is messier than it looks: award amounts are published as *text* (`$360,000`), deadlines as *text* that can literally read "Ongoing", and the underlying datastore rejects the usual SQL coercions - so filters, recency sorts and counts are built around those quirks rather than against them. You query one grants corpus - from what is open right now to who won what across three fiscal years; the FY-table unions and text-typed dates stay on our side.

### Inputs (all optional except when noted)

| Input | What it does |
|---|---|
| `corpus` | `opportunities` (default) or `awards` |
| `status` | opportunities: `active` (default) / `forecasted` / `closed` / `all` |
| `keywords` | match title/purpose/description/categories/agency |
| `agency` | agency name, substring |
| `category` | opportunities category, substring |
| `deadlineBefore` | only grants whose deadline is on/before `YYYY-MM-DD` |
| `fiscalYear` | awards: `2022-2023` / `2023-2024` / `2024-2025` (default newest) |
| `recipientName` / `recipientType` | awards filter |
| `aggregate` | return one row per group with a count instead of records |
| `groupBy` | aggregate dimension (opportunities: agency/status/type; awards: agency/recipientType/projectStatus/county) |
| `maxResults` | cap records pushed (default 200) |

**Default run = the active-now list** (~169 grants sorted by nearest deadline) - the single most useful pull, and fast enough for Apify's daily auto-test.

### Source & license

[California Grants Portal](https://www.grants.ca.gov/) open data on [data.ca.gov](https://data.ca.gov) (CA State Library, AB 132). Official public data - no login, no scraping.

# Actor input Schema

## `corpus` (type: `string`):

opportunities = grant programs currently listed on the portal (status active/closed/forecasted). awards = post-award disclosures for one fiscal year (recipient, amount, counties served).

## `status` (type: `string`):

active = open to apply now (~169). forecasted = announced, not yet open. closed = past programs (1,823, historical reference). all = every status.

## `keywords` (type: `string`):

Substring, case-insensitive, matched against title / purpose / description / categories / agency. E.g. "water", "housing", "tribal".

## `agency` (type: `string`):

Department or agency name, substring. E.g. "Fish and Wildlife", "Housing".

## `category` (type: `string`):

Program category, substring. E.g. "Food & Nutrition", "Environment".

## `deadlineBefore` (type: `string`):

Opportunities only: only grants whose application deadline is on/before this date (urgent). Ignored for 'Ongoing' rolling grants.

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

Awards only: which fiscal year's grant-award disclosures to search.

## `recipientName` (type: `string`):

Awards only: recipient organization name, substring. E.g. "Pivot Sac".

## `recipientType` (type: `string`):

Awards only: recipient type, substring. E.g. "Nonprofit", "Public Agency", "Local Government".

## `aggregate` (type: `boolean`):

When on, returns one summary row per group (agency / status / type for opportunities; agency / recipient type / project status / county for awards) with a record count - a compact overview.

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

Dimension for the aggregate. Valid per corpus: opportunities = agency/status/type; awards = agency/recipientType/projectStatus/county.

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

Cap the number of records pushed (0 = up to ~10k per run; each record is metered individually, so there is no per-run charge cap). Active grants are ~169; the larger award-FY tables run ~7.6-15k rows — filter by recipient/agency/type to pull a slice, or run per slice to cover a full FY.

## Actor input object example

```json
{
  "corpus": "opportunities",
  "status": "active",
  "fiscalYear": "2024-2025",
  "aggregate": false,
  "groupBy": "agency",
  "maxResults": 50
}
```

# Actor output Schema

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

California grant 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/ca-grants").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/ca-grants").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/ca-grants --silent --output-dataset

```

## MCP server setup

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

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/PJ4uT8pQLHekyZOeg/builds/ciqPQpeGLHMresQ3H/openapi.json
