# Local Business Change & Event API (`rustic_soybean/local-business-event-api`) Actor

Normalize public business licenses, building permits, explicit closures, and local business changes into one recurring machine-ready event feed for lead generation, monitoring, and automation.

- **URL**: https://apify.com/rustic_soybean/local-business-event-api.md
- **Developed by:** [Chris Johnson](https://apify.com/rustic_soybean) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 normalized business events

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?

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

## Local Business Change & Event API

Normalize fragmented local public records into one recurring business-change feed. This Actor reads public business-license, building-permit, registration, and compatible JSON/Socrata sources and returns consistent machine-readable events instead of forcing every sales system, data pipeline, or automation to understand each jurisdiction's schema.

### What this local business API does

The Actor normalizes records into stable event types such as BUSINESS_LICENSE_ISSUED, TEMPORARY_LICENSE_ISSUED, PROJECT_PERMIT_ISSUED, explicit BUSINESS_CLOSURE events when the source actually says closed, and PUBLIC_RECORD_EVENT as a cautious fallback. A license is never automatically mislabeled as a grand opening.

### Who uses it

- B2B sales and lead-generation teams watching new local business signals.
- Agencies and local service providers building prospect lists.
- Market researchers tracking business changes by place or category.
- Developers and automation teams unifying multiple public-record feeds.
- AI-agent workflows that need normalized local business events instead of raw jurisdiction-specific records.

### Recurring monitoring

Use a stable stateKey for each independent watchlist. The Actor fingerprints prior records and suppresses unchanged items after the first run. Choose baseline_only when you want to establish state without returning the current backlog, then schedule future runs to receive only meaningful changes.

### Filters and cost control

Filter by business/project keywords and location terms. sourceUrls accepts compatible public JSON/Socrata sources; the defaults include Chicago business-license and permit feeds. maxSourceRows caps source pagination, while maxEvents caps emitted dataset rows and therefore limits chargeable results. The SUMMARY record reports source counts, truncation, events found, and events emitted.

### Output and integrations

Output includes change type, event type, entity ID/name, project or business address, city/state/ZIP, coordinates when supplied by the source, category, description, status, event date, source type, source URL, confidence, and detection time. Consume the dataset through Apify API, exports, webhooks, schedules, CRM automations, or AI workflows. Public-record events are prospecting signals, not guarantees; verify important records before acting on them.

# Actor input Schema

## `sourceUrls` (type: `array`):

Optional public JSON/Socrata URLs. Defaults to Chicago business-license and permit feeds.

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

Optional comma-separated terms matched only against entity name, category, and event description.

## `locationTerms` (type: `string`):

Optional comma-separated city, state, ZIP, neighborhood, or job-site address terms. Contact addresses are not treated as project locations.

## `maxSourceRows` (type: `integer`):

Safety cap per source. Socrata feeds are paged in 1,000-row batches; SUMMARY reports source truncation.

## `maxEvents` (type: `integer`):

Caps chargeable dataset results per run. Matching rows are still baselined for deduplication.

## `stateKey` (type: `string`):

Use a different name for each independent recurring watch.

## `firstRunBehavior` (type: `string`):

Choose whether the first run should emit current matching events or only create the baseline for future changes.

## `demoMode` (type: `boolean`):

Return one synthetic normalized event for testing.

## Actor input object example

```json
{
  "maxSourceRows": 5000,
  "maxEvents": 100,
  "stateKey": "default",
  "firstRunBehavior": "return_matches",
  "demoMode": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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("rustic_soybean/local-business-event-api").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("rustic_soybean/local-business-event-api").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 rustic_soybean/local-business-event-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rustic_soybean/local-business-event-api"
        }
    }
}
```

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/syT7Qd3QpEXTUAavz/builds/EEsMUIKLYkKp6xS76/openapi.json
