# EventPulse (`onsra888/sceneshift-eventpulse`) Actor

San Francisco event aggregator for SceneShift. Combines Eventbrite, Partiful, Luma (via Store Actors) with DoTheBay and SF Funcheap into one normalized event schema.

- **URL**: https://apify.com/onsra888/sceneshift-eventpulse.md
- **Developed by:** [Simran Bhatia](https://apify.com/onsra888) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## EventPulse — trustworthy San Francisco events for SceneShift

Collect attributed public event listings for a live SF discovery map. SceneShift helps residents and newcomers explore local culture and gives organizers visibility beyond their followers.

### Release status

This repository now contains the source retrieved from owner Actor version 0.0 and a proposed 0.1 quality update. The existing live build is 0.0.13. Do not claim this update is cloud-verified until its build/run evidence is recorded below. Local source includes tests and a reproducible npm lockfile.

### Sources

- Eventbrite through the Store Actor (`aitorsm/eventbrite`): source-local times require a supplied timezone; inconsistent free/paid evidence becomes unknown with a review warning.
- Luma through `aitorsm/luma-events`: retains sourced coordinates and dates. Ticket availability is raw evidence, not a verified application claim.
- DoTheBay: custom Crawlee/Cheerio adapter, Pacific calendar days, bounded/rate-limited crawling, ongoing-event overlap, optional exact-address geocoding.
- Partiful through `heliostech/partiful-event-scraper`: optional adapter; records without a public SF address go to diagnostics. Current evidence does not establish usable Partiful coverage. Do not infer hidden locations.
- Funcheap: not supported in this release. The old implementation contained an unused/unvalidated scraper; it has been removed rather than presented as working coverage.

### Input example

```json
{"enabledSources":["eventbrite","luma","dothebay"],"maxEventbriteEvents":2,"maxLumaEvents":2,"maxDoTheBayEvents":2,"daysAhead":14,"resolveCoordinates":true,"maxGeocodeRequests":2}
```

Defaults: 5 events per source, SF city slugs, 14-day overlap window, geocoding off by default; up to 3 requests only when explicitly enabled. Source caps 1–1000; DoTheBay alone retains legacy 0 meaning no event cap, bounded by days/requests. maxGeocodeRequests is 0–10. Individual source failures produce diagnostics without fabricating success. Enabled sources are explicit; \[] permits an offline Actor initialization smoke check. No proxy settings are added.

### Output and uncertainty

Flat records preserve source, title, shortDescription, startDateTime/endDateTime (UTC), venue/address, priceStatus/priceText, canonical url, collectedAt, categories, tags, coordinates, and extra. Missing ends stay null; a labeled three-hour fallback is used only to decide window overlap. Invalid or ambiguous required dates are excluded with diagnostics. Repeated DST times are rejected instead of guessing. In-run deduplication uses URL + occurrence start; downstream consumers must also preserve distinct recurring occurrences when a source reuses URLs.

Categories use documented keyword rules over title, description and venue; they are classification, not new event facts. Unmatched events have an empty category list. Coordinates come from the listing, or a bounded exact house-number/road/San Francisco geocoder match. Fuzzy matches, wrong cities, ambiguous results and unavailable geocoding remain null. No city-center fallback. Preserve attribution to © OpenStreetMap contributors if using derived coordinates.

Nominatim requests identify this Actor, run sequentially at least 1.1 seconds apart, and successful lookups are cached for 30 days in sceneshift-eventpulse-geocodes. Run only one geocoding Actor at a time across this account to respect the public service's global 1 request/second limit. Lookup is off by default. Enable only for coordinated single-run prototype use; use a dedicated geocoding service for public concurrent workloads. Public service availability is not guaranteed.

DIAGNOSTICS in the run's default key-value store records source counts/errors, excluded URLs with reasons, accepted count, and geocoder request count. Output excludes guest/attendance statistics and personal attendee information. An event absent from a later crawl is never inferred cancelled. Explicit cancellation reconciliation is still a gap in these source adapters and must be added before claiming comprehensive lifecycle coverage.

### Convex handoff

This Actor only supplies data. It has no Convex credentials and never approves or publishes records. The protected importer validates/upserts records as pending and unverified, preserves provenance, and calculates mapEndsAt. Availability booleans must not become sold-out labels without explicit source evidence and the actual check time. Source quality warnings need human review.

### Development and costs

```sh
npm ci
npm test
npm run build
apify validate-schema
apify run --user-agent apify-codex-plugin/apify-actor-development
```

Put input in storage/key_value_stores/default/INPUT.json. Local data never becomes cloud run evidence. Live source tests require authenticated access for nested Store Actors and incur their fees plus compute/storage. Use small source caps and maxGeocodeRequests. A parent run budget does not guarantee a total cap on nested Actor fees. Never hardcode or log APIFY_TOKEN. The platform supplies it to the Actor.

### Evidence

Existing 0.0.13 run ieoWQtqh2UjhguSoG succeeded and produced three records imported into development Convex; repeat import inserted zero duplicates. The six-record earlier dataset exposed the issues this update addresses. See ../../docs/APIFY_INTEGRATION.md for IDs and review evidence. This 0.1 update's local/cloud validation results must be recorded separately.

# Actor input Schema

## `maxEventsPerSource` (type: `integer`):

Fallback cap for Eventbrite, Partiful, and Luma when their own caps are not set.

## `maxEventbriteEvents` (type: `integer`):

Maximum Eventbrite events to collect. Leave empty to use the default.

## `maxPartifulEvents` (type: `integer`):

Maximum Partiful events to collect. Leave empty to use the default. Partiful events are dropped by the address filter.

## `maxLumaEvents` (type: `integer`):

Maximum Luma events to collect. Leave empty to use the default.

## `maxDoTheBayEvents` (type: `integer`):

Maximum DoTheBay events to keep. 0 means no cap.

## `daysAhead` (type: `integer`):

Keep upcoming and ongoing events overlapping now through this many days. DoTheBay uses Pacific calendar dates.

## `eventbriteCity` (type: `string`):

City slug used for Eventbrite (country is fixed to United States).

## `lumaCity` (type: `string`):

City slug used for Luma.

## `enabledSources` (type: `array`):

Explicit supported adapters. Funcheap is not yet validated and cannot be selected. An empty array performs a local smoke check without scraping.

## `resolveCoordinates` (type: `boolean`):

Opt-in prototype exact-address lookup; requires one geocoding run at a time across all callers. Off by default; unresolved listings remain pending.

## `maxGeocodeRequests` (type: `integer`):

At most one request per 1.1 seconds, with persistent caching. No fuzzy or city-center substitution.

## Actor input object example

```json
{
  "maxEventsPerSource": 5,
  "maxEventbriteEvents": 5,
  "maxPartifulEvents": 5,
  "maxLumaEvents": 5,
  "maxDoTheBayEvents": 5,
  "daysAhead": 14,
  "eventbriteCity": "san-francisco",
  "lumaCity": "sf",
  "enabledSources": [
    "eventbrite",
    "partiful",
    "luma",
    "dothebay"
  ],
  "resolveCoordinates": false,
  "maxGeocodeRequests": 3
}
```

# Actor output Schema

## `results` (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 = {
    "maxEventbriteEvents": 5,
    "maxPartifulEvents": 5,
    "maxLumaEvents": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("onsra888/sceneshift-eventpulse").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 = {
    "maxEventbriteEvents": 5,
    "maxPartifulEvents": 5,
    "maxLumaEvents": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("onsra888/sceneshift-eventpulse").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 '{
  "maxEventbriteEvents": 5,
  "maxPartifulEvents": 5,
  "maxLumaEvents": 5
}' |
apify call onsra888/sceneshift-eventpulse --silent --output-dataset

```

## MCP server setup

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

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/6sdtaCC2do1B7febX/builds/fAke5l4Y8RsUTQHtG/openapi.json
