# Economy God Mode public SF inputs (`shivanginarayan/economy-public-sf`) Actor

Collect provenance-backed San Francisco cafe menu prices or the official minimum wage for economic simulations. Fixed public sources, timestamped numeric records, and limited permissions. Prices cover one venue; the statutory wage is not average earnings.

- **URL**: https://apify.com/shivanginarayan/economy-public-sf.md
- **Developed by:** [Shivangi Narayan](https://apify.com/shivanginarayan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 94.4% 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

## Economy public SF Actor

Custom Python Actor for Economy God Mode. It collects public numerical observations that actually initialize business prices and household wage references in new simulations. It runs with limited permissions. No Apify SDK, browser, proxy, or general-purpose scraper is required.

### Input

Run once for each category:

```json
{"category":"prices"}
```

```json
{"category":"wages"}
```

Only these categories are accepted. The sources are fixed in code. Caller-supplied URLs, executable scraping functions and arbitrary storage destinations are unsupported.

### Output and scope

The default dataset contains records with `item`, numeric `value`, `unit`, `kind`, `source_url` and UTC `observed_at`.

| Category | Source | Additional fields | Interpretation |
| --- | --- | --- | --- |
| prices | Cafe Seventy8 public menu | `variant`, `venue` | Posted drink-price options at one venue. Sizes and taxes are not inferred. |
| wages | SF official minimum-wage page | `effective_date` | General statutory minimum wage, not average earnings. |

Source changes can alter counts or cause parsing to fail. A successful historical collection had 29 menu-price options and one wage reference. These counts are evidence of that run, not a permanent output contract. The consumer records Actor/run/dataset IDs and applies the explicit eight-hour workday conversion; the Actor itself returns hourly USD.

### Collection behavior

The Actor checks source robots.txt, ignores script/style content, parses known patterns and fails rather than fabricating missing observations. Public requests do not receive the Apify token. Platform requests use the run token to read its own input and write its default dataset. Logs report only category/count.

The application's runner requests 128 MB, a 120-second timeout, no restart and no proxy. See [collection limits and provenance](https://github.com/shivanginarayan/CalHacks/blob/main/docs/APIFY.md) for usage, cache and deduplication behavior. The charge option is not an all-inclusive billing cap.

### Deploy and demonstrate

Configure the private root environment as described in [setup](https://github.com/shivanginarayan/CalHacks/blob/main/docs/APIFY.md), then run from repository root:

```powershell
.\.venv\Scripts\python.exe -m scripts.deploy_apify
```

This command creates or updates the configured Actor and starts a build. Use it for initial deployment or deliberate source updates, not each app launch. The app automatically loads saved observations and collects missing/stale inputs. Each new world freezes the complete sample and checksum; forks and resets preserve it. Financial identities, opening balances, employment relationships and behavior remain synthetic.

### Use in Economy God Mode

The app loads saved public observations automatically, refreshes stale sources, and freezes inputs in each new simulated world. Bank balances, households, employment relationships and rescue outcomes are synthetic simulation state, not observations collected by this Actor.

Project source and setup: https://github.com/shivanginarayan/CalHacks

### Example record

This is an actual historical observation, not a promise about the next run:

```json
{"item":"HOUSE COFFEE","value":3.95,"unit":"usd_item","kind":"listed_menu_price_before_unspecified_tax_or_surcharges","source_url":"https://www.cafeseventy8.com/","observed_at":"2026-10-25T12:29:03.043599+00:00","variant":"listed option 1 (size unspecified)","venue":"Cafe Seventy8, 78 29th Street, San Francisco"}
```

### Cost and limitations

No rental or per-result fee is configured by the author. Standard Apify platform usage charges may apply. Use 128 MB and a 120-second timeout for this bounded collector. Source availability and page structure can change; missing observations fail explicitly. This is a narrow public reference collector, not a national economic forecast or personal credit dataset.

# Actor input Schema

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

Prices: posted drink options at Cafe Seventy8. Wages: official SF statutory minimum wage, not average earnings. Fixed sources only.

## Actor input object example

```json
{
  "category": "prices"
}
```

# Actor output Schema

## `observations` (type: `string`):

Numeric values with units, interpretation, source URL and UTC collection timestamp in the default dataset.

# 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 = {
    "category": "prices"
};

// Run the Actor and wait for it to finish
const run = await client.actor("shivanginarayan/economy-public-sf").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 = { "category": "prices" }

# Run the Actor and wait for it to finish
run = client.actor("shivanginarayan/economy-public-sf").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 '{
  "category": "prices"
}' |
apify call shivanginarayan/economy-public-sf --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shivanginarayan/economy-public-sf"
        }
    }
}
```

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/dQa3e0pZnc0FSj276/builds/7QiCCz9aoGRSRXEhL/openapi.json
