# Public Competition & Hackathon Finder (`deliberate_probity/public-competition-hackathon-finder`) Actor

Find public competitions and hackathons and export structured, keyword-filtered results.

- **URL**: https://apify.com/deliberate\_probity/public-competition-hackathon-finder.md
- **Developed by:** [Shang Liu](https://apify.com/deliberate_probity) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 competition results

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

## Public Competition & Hackathon Finder

An inexpensive Apify Actor for discovering public competitions, hackathons, and developer events. It reads public list pages, filters records by keyword, removes duplicates, and writes structured results to the default dataset.

It intentionally does **not** log in, bypass anti-bot systems, use residential proxies, or collect private/restricted data. Crawlee's `robots.txt` support is enabled, blocked URLs are skipped, and local/private-network source URLs are rejected.

### What it extracts

Each dataset item contains:

- `title`, `url`, `deadline`
- `startDate`, `endDate`
- `organizer`, `prize`
- `location`, `online`
- `summary`
- `sourceUrl`, `sourceName`, `scrapedAt`

Missing information is returned as `null`; the Actor does not invent prizes, deadlines, or organizers.

### Supported pages

The extractors run in this order:

1. The current public Major League Hacking season page (built-in adapter).
2. Standard Schema.org `Event` JSON-LD, which is the most maintainable format.
3. Optional CSS selectors supplied in the input.
4. A conservative generic event-card fallback.

When `sourceUrls` is empty, the Actor automatically chooses the current MLH season page. It makes one HTTP request per source page and does not follow event links.

### Input example

```json
{
  "sourceUrls": [],
  "keywords": ["AI", "open source", "data"],
  "maxItems": 20,
  "includePast": false,
  "requestTimeoutSecs": 30,
  "selectors": {}
}
```

For a custom public list page without JSON-LD:

```json
{
  "sourceUrls": ["https://example.org/public-competitions"],
  "keywords": ["AI"],
  "maxItems": 50,
  "selectors": {
    "itemSelector": ".competition-card",
    "titleSelector": "h2",
    "urlSelector": "a.details",
    "deadlineSelector": ".deadline",
    "organizerSelector": ".organizer",
    "prizeSelector": ".prize",
    "locationSelector": ".location",
    "summarySelector": "p.summary"
  }
}
```

Selectors are shared across all URLs in one run. Use separate tasks/runs when different websites need different selector sets.

### Run locally

Requirements: Node.js 22+ and npm.

```bash
npm install
npm test
npm start
```

Local input is read from `storage/key_value_stores/default/INPUT.json`. Results appear under `storage/datasets/default/`.

To test Pay Per Event logging locally:

```bash
ACTOR_TEST_PAY_PER_EVENT=true ACTOR_USE_CHARGING_LOG_DATASET=true npm start
```

The local charging log appears under `storage/datasets/charging-log/`. Local test events use a placeholder price; real prices are configured in Apify Console.

### Deploy to Apify

1. Install and authenticate the Apify CLI: `npm install -g apify-cli`, then `apify login`.
2. From this project folder, run `apify push`.
3. In Apify Console, open the Actor, build it, and run it first with a small `maxItems` value.
4. Inspect the Output table and logs before publishing it to Apify Store.

The `.actor` directory includes the current input, output, and dataset schemas required for a Store-ready Actor definition.

### Pay Per Event setup

The code saves each visible dataset item with the custom event name `competition-result`:

```js
await Actor.pushData(event, 'competition-result');
```

In the Actor's **Monetization / Pricing** setup in Apify Console:

1. Choose **Pay per event**.
2. Keep the recommended synthetic `apify-actor-start` event. Apify currently defaults it to `$0.00005` per start and covers the first five seconds of compute.
3. Add a custom event named exactly `competition-result` with a title such as “Competition result”.
4. Start testing around `$0.001`–`$0.003` per result, then adjust only after measuring real run costs and comparable Store Actors. This range is a starting hypothesis, not a revenue guarantee.
5. Set a small minimum maximum-charge amount that covers one start and at least one result.
6. For clearer buyer pricing and agentic-payment eligibility, leave **Pay per event + usage** off after your cost tests are complete.

Do not also enable the synthetic `apify-default-dataset-item` event while the custom `competition-result` event is active, or one dataset item may be charged twice.

The SDK returns a `ChargeResult`; the Actor stops saving results when the user's run spending limit prevents another charge.

### Publishing checklist

- Replace example screenshots and add a clear Store description.
- Test with 5, 20, and 100 results and record compute cost per result.
- Confirm each default/custom source permits the intended automated access and attribution.
- Keep memory at 256 MB unless real runs show it is insufficient.
- State that source pages can change and that missing fields remain `null`.
- Complete Apify identity and payout requirements before expecting paid Store distribution.

### 中文快速开始

这个 Actor 默认抓取当前 MLH 赛季的公开黑客松列表；`sourceUrls` 留空即可。先修改 `storage/key_value_stores/default/INPUT.json`，然后运行 `npm install && npm test && npm start`。上传时执行 `apify login` 和 `apify push`。

计费请在 Apify Console 里选 Pay per event，并新建名称完全一致的 `competition-result` 事件。建议先小规模跑几次测真实成本，再定价；不要同时开启 `apify-default-dataset-item`，否则可能重复计费。

### License

MIT

# Actor input Schema

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

Public competition, hackathon, or event-list pages. No login pages, private data, or URLs blocked by robots.txt.

## `keywords` (type: `array`):

Keep a result if any keyword appears in its title, summary, organizer, prize, or location. Leave empty to keep all results.

## `maxItems` (type: `integer`):

Maximum number of unique dataset items to save.

## `includePast` (type: `boolean`):

Include events whose deadline or end date has already passed.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for one public source page.

## `selectors` (type: `object`):

Optional selectors for a source that has no JSON-LD Event data. itemSelector, titleSelector, and urlSelector are the usual minimum.

## Actor input object example

```json
{
  "sourceUrls": [],
  "keywords": [],
  "maxItems": 100,
  "includePast": false,
  "requestTimeoutSecs": 30,
  "selectors": {}
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("deliberate_probity/public-competition-hackathon-finder").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("deliberate_probity/public-competition-hackathon-finder").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 deliberate_probity/public-competition-hackathon-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deliberate_probity/public-competition-hackathon-finder"
        }
    }
}

```

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/8da3TULxmkeMxhHWq/builds/iChweadu7SY4nVkI8/openapi.json
