# GitHub Archive Events Scraper — Historical GH Events by Date (`logiover/github-archive-events-scraper`) Actor

Download the full historical firehose of public GitHub events from GH Archive by date and hour. Extract pushes, stars, forks, pull requests, issues, releases and comments since 2011. Filter by repo, actor, org and event type. No API key, no login.

- **URL**: https://apify.com/logiover/github-archive-events-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## GitHub Archive Events Scraper — Historical Public GitHub Events by Date & Hour

![Apify Actor](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Developer Tools](https://img.shields.io/badge/Category-Developer%20Tools-6E5494?logo=github&logoColor=white) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

Download the **complete historical firehose of every public GitHub event** — pushes, stars, forks, pull requests, issues, releases and comments — straight from the **GH Archive** ([data.gharchive.org](https://www.gharchive.org/)) bulk record, queryable **by date and hour** with rich filters. Unlike the GitHub REST Events API (which only returns the last ~90 recent events for a repo or user), this Actor reads the full public **event history since February 2011**, one hour at a time, and gives you clean flat rows ready for analysis. **No API key, no login, no token, no GitHub account.**

---

### 🏆 What this Actor does

The GitHub Archive Events Scraper streams **gzip-compressed hourly archive files** from GH Archive (URL pattern `https://data.gharchive.org/YYYY-MM-DD-H.json.gz`). Each file is newline-delimited JSON holding **hundreds of thousands of public GitHub events** for that single UTC hour. The Actor pipes each file through `gunzip` and a line reader, parses every event, applies your filters (event type, repository, actor login, organization), and writes matching events as flat dataset rows — **without ever loading a whole 70 MB file into memory**.

This is the same public firehose that powers star-history charts, the [GitHub Innovation Graph](https://github.blog/), OSS trend dashboards and developer-ecosystem research. Because the events follow the standard **GitHub Events API v3 schema**, you get `PushEvent`, `WatchEvent` (a star), `ForkEvent`, `PullRequestEvent`, `IssuesEvent`, `ReleaseEvent` and more, with their full payloads flattened into tidy columns. Point it at any date range since 2011 and pull the exact slice of GitHub history you need.

### 👥 Who is it for?

- **Developer-ecosystem & OSS researchers** studying how projects, languages and communities grow over time.
- **Data scientists & ML teams** building datasets of commits, stars, PRs and issues for trend models or LLM training corpora.
- **Recruiters & dev-lead sourcers** finding active contributors to specific repos, orgs or technologies by their public activity.
- **Security & supply-chain analysts** tracking new repo creations, releases and package-adjacent activity for threat intelligence.
- **Founders, VCs & market analysts** measuring project momentum (star velocity, fork growth, contributor counts) for due diligence.

### 🎯 Use cases

- **Star-history & trend analysis** — pull every `WatchEvent` for a repo or org across a date window to reconstruct exact star-growth curves GitHub no longer exposes.
- **Contributor sourcing** — extract all actors who opened PRs or pushed commits to a target repository in a given month, for recruiting or community outreach.
- **Release & changelog tracking** — collect every `ReleaseEvent` across an ecosystem to build a historical release timeline.
- **Supply-chain & security research** — monitor `CreateEvent` repo creations and `ReleaseEvent` publishes for suspicious or newly-appearing projects.
- **OSS health metrics** — quantify issue open/close rates, PR merge rates and push frequency for a portfolio of repositories over time.

### ✨ Why use the GitHub Archive Events Scraper?

- 🔓 **Fully keyless** — GH Archive is a public static file host. No GitHub token, no OAuth, no login, no rate-limited REST API.
- 🗄️ **True historical depth** — every public event since **2011-02-12**, not just the ~90 recent events the GitHub REST Events API caps you at.
- 🌊 **Firehose volume** — a single hour holds **hundreds of thousands of events**; one run can yield thousands to millions of filtered rows.
- 🎛️ **Precise filters** — narrow by **event type, repository (substring or owner/ prefix), actor login and organization** so you only pay for the rows you want.
- 🧠 **Memory-safe streaming** — files are gunzipped and parsed **line by line**, never buffered whole, so huge windows run in 1 GB of memory.
- 📤 **Clean flat export** — every event becomes one row with a typed set of columns, ready for **CSV, JSON, Excel, HTML, XML or JSONL** and pay-per-result pricing.

### 📊 What data can you extract?

Every matching public event is saved as a single flat row. Fields are populated based on the event type — a `PushEvent` fills `commitCount` and `commitMessages`, a `PullRequestEvent` fills the `pr*` fields, an `IssuesEvent` fills the `issue*` fields, and so on. Unused fields for a given event type are simply omitted.

| Field | Type | Description |
|-------|------|-------------|
| `eventId` | string | Unique GitHub event ID. |
| `eventType` | string | Event type: `PushEvent`, `WatchEvent`, `ForkEvent`, `PullRequestEvent`, `IssuesEvent`, `ReleaseEvent`, `CreateEvent`, etc. |
| `action` | string | Payload action where applicable (`opened`, `closed`, `started`, `created`, `published`). |
| `createdAt` | string | UTC timestamp of the event (ISO 8601). |
| `actorLogin` | string | GitHub username that performed the event. |
| `actorId` | string | Numeric GitHub user ID of the actor. |
| `actorUrl` | string | GitHub profile URL of the actor. |
| `repoName` | string | Repository full name (`owner/name`). |
| `repoUrl` | string | `https://github.com/<owner/name>` link. |
| `orgLogin` | string | Organization login, if the event belongs to one. |
| `refType` | string | For Create/Delete events: `repository`, `branch` or `tag`. |
| `ref` | string | Git ref (branch or tag name) for push/create/delete events. |
| `commitCount` | string | Number of commits in a push event. |
| `commitMessages` | string | Joined commit messages for a push event. |
| `prNumber` | string | Pull request number. |
| `prTitle` | string | Pull request title. |
| `prState` | string | Pull request state (`open`/`closed`). |
| `prMerged` | string | Whether the PR was merged (`true`/`false`). |
| `issueNumber` | string | Issue number. |
| `issueTitle` | string | Issue title. |
| `issueState` | string | Issue state (`open`/`closed`). |
| `forkedTo` | string | Full name of the new fork for a `ForkEvent`. |
| `releaseTag` | string | Tag name of a published release. |
| `releaseName` | string | Human-readable release name. |
| `commentBody` | string | Body text of an issue, commit or PR review comment. |
| `hourFile` | string | Source GH Archive hourly file (e.g. `2024-06-15-15`). |

#### Example output row (a star / `WatchEvent`)

```json
{
  "eventId": "39326469018",
  "eventType": "WatchEvent",
  "action": "started",
  "createdAt": "2024-06-15T15:00:00Z",
  "actorLogin": "TLReber",
  "actorId": "3442398",
  "actorUrl": "https://github.com/TLReber",
  "repoName": "TLReber/LSPT-TextTransformation",
  "repoUrl": "https://github.com/TLReber/LSPT-TextTransformation",
  "hourFile": "2024-06-15-15"
}
````

### 🚀 How to use

You can drive the Actor two ways, and they combine freely.

#### Option A — Grab a whole date window (bulk firehose)

Set `startDate` and `endDate` and (optionally) restrict `eventTypes`. The Actor downloads every hour file in the range and saves matching events until `maxItems` is reached. Great for "all stars across June 2024" or "every release in Q1".

```json
{
  "startDate": "2024-06-15",
  "endDate": "2024-06-15",
  "eventTypes": ["WatchEvent"],
  "maxItems": 5000
}
```

#### Option B — Focus on specific repos, orgs or developers

Add `repoFilter`, `orgFilter` or `actorFilter` to keep only the events you care about. Filters are case-insensitive; `repoFilter` matches on a substring (so `facebook/` catches every Facebook repo, and `react` catches any repo with "react" in its name).

```json
{
  "startDate": "2024-06-15",
  "endDate": "2024-06-15",
  "hours": [9, 12, 15, 18],
  "eventTypes": ["PullRequestEvent", "IssuesEvent", "PushEvent"],
  "repoFilter": ["facebook/react", "vuejs/"],
  "orgFilter": ["microsoft"],
  "maxItems": 20000
}
```

**Steps**

1. Open the Actor, set your `startDate` / `endDate` (keep the window small at first — one day is 24 files of ~70 MB each).
2. Optionally set an `hours` whitelist and `eventTypes` to keep the run cheap while you experiment.
3. Add any `repoFilter` / `actorFilter` / `orgFilter` you need, and a sensible `maxItems` cap.
4. Click **Start**. Watch the log — each hour reports how many matching events it added.
5. Open the **Output** tab and export to JSON, CSV, Excel, HTML, XML or JSONL, or pull it via the Apify API.

### ⚙️ Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startDate` | string | `2024-06-15` | Inclusive UTC start date (`YYYY-MM-DD`). |
| `endDate` | string | `2024-06-15` | Inclusive UTC end date (`YYYY-MM-DD`). Every hour from `startDate` 00:00 to `endDate` 23:00 is fetched. |
| `hours` | array | `[]` | Optional whitelist of UTC hours `0`–`23`. Empty = all 24 hours per day. |
| `eventTypes` | array | `["WatchEvent","PullRequestEvent"]` | Event types to keep. Empty = all types. |
| `repoFilter` | array | `[]` | Keep events whose `owner/name` contains any entry (case-insensitive substring). Empty = all repos. |
| `actorFilter` | array | `[]` | Keep events by these actor logins (case-insensitive exact). Empty = all users. |
| `orgFilter` | array | `[]` | Keep events under these organizations (case-insensitive exact). Empty = all orgs. |
| `maxItems` | integer | `5000` | Global hard cap on saved events. Raise for bulk exports. |
| `proxyConfiguration` | object | `{ "useApifyProxy": true }` | Apify Proxy. Datacenter is sufficient (public static host). |

#### Full input example

```json
{
  "startDate": "2024-06-01",
  "endDate": "2024-06-02",
  "hours": [],
  "eventTypes": ["ReleaseEvent", "PushEvent", "PullRequestEvent"],
  "repoFilter": ["kubernetes/"],
  "actorFilter": [],
  "orgFilter": ["kubernetes"],
  "maxItems": 50000,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### 📤 Output example

A fully-populated `PullRequestEvent` row:

```json
{
  "eventId": "39326470112",
  "eventType": "PullRequestEvent",
  "action": "opened",
  "createdAt": "2024-06-15T15:00:02Z",
  "actorLogin": "octocat",
  "actorId": "583231",
  "actorUrl": "https://github.com/octocat",
  "repoName": "facebook/react",
  "repoUrl": "https://github.com/facebook/react",
  "orgLogin": "facebook",
  "prNumber": "28911",
  "prTitle": "Fix hydration warning in Suspense boundary",
  "prState": "open",
  "prMerged": "false",
  "hourFile": "2024-06-15-15"
}
```

### 💡 Tips for best results

- **Start with a single hour** — set `startDate` = `endDate` and `hours: [15]` with a tight `eventTypes` list to preview the data cheaply before scaling up.
- **Always keep a `maxItems` cap.** One hour is hundreds of thousands of events; without a cap a multi-day run can pull millions.
- **Filter early with `eventTypes`.** Stars (`WatchEvent`) and PRs are a small fraction of the firehose (most events are `PushEvent`), so filtering slashes cost.
- **`repoFilter` is a substring match** — use `owner/name` for an exact repo, `owner/` for a whole account, or a bare word to catch a family of repos.
- **`actorFilter` and `orgFilter` are exact matches** on the login, not substrings — pass the precise username or org slug.
- **Hours have no zero-padding** in GH Archive (`...-9.json.gz`, not `...-09`), but you can enter `9` or `"9"` in the `hours` list — both work.
- **Very recent hours may 404** for a short window until GH Archive publishes them; the Actor logs a warning and skips them gracefully.
- **Time zone is UTC.** A "day" is 24 UTC hours, so `createdAt` is in UTC and your date bounds are UTC too.
- **For star history**, combine `eventTypes: ["WatchEvent"]` + `repoFilter: ["owner/repo"]` across the months you care about, then group by day in your spreadsheet.
- **Widen the window, not the memory** — streaming keeps memory flat, so covering more days just takes more time, not more RAM.

### 🔌 Integrations

Send your extracted events anywhere Apify connects:

- **Google Sheets** — push rows straight into a spreadsheet for star-history charts or contributor lists.
- **Slack** — get notified when a run finishes or when a target repo crosses a threshold.
- **Zapier & Make** — trigger downstream automations (CRM enrichment, alerting) from new dataset items.
- **Webhooks** — POST finished datasets to your own API or data warehouse.
- **Schedule** — run daily/weekly to keep a rolling archive of a repo, org or ecosystem's activity.

### 🧑‍💻 API usage

Run the Actor programmatically with the Apify API or clients.

**cURL**

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~github-archive-events-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2024-06-15",
    "endDate": "2024-06-15",
    "hours": [15],
    "eventTypes": ["WatchEvent"],
    "maxItems": 2000
  }'
```

**Node.js (apify-client)**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('logiover/github-archive-events-scraper').call({
    startDate: '2024-06-15',
    endDate: '2024-06-15',
    eventTypes: ['PullRequestEvent', 'IssuesEvent'],
    repoFilter: ['facebook/react'],
    maxItems: 10000,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python (apify-client)**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("logiover/github-archive-events-scraper").call(run_input={
    "startDate": "2024-06-15",
    "endDate": "2024-06-15",
    "eventTypes": ["WatchEvent"],
    "orgFilter": ["microsoft"],
    "maxItems": 10000,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["repoName"], item["actorLogin"], item["createdAt"])
```

### 🤖 Use with AI agents (MCP)

This Actor works as a tool for AI agents through the **Apify MCP server**, so an LLM assistant can pull GitHub history on demand. Point your MCP-compatible client (Claude, Cursor, or the Apify Tester MCP client) at the Apify MCP server and the agent can call this Actor directly.

> Example prompt: *"Use the GitHub Archive Events Scraper to get every star (WatchEvent) for the repo `vercel/next.js` on 2024-06-15, then tell me how many there were and list the top 10 users who starred it."*

### ❓ FAQ

#### Is the GitHub Archive Events Scraper keyless — do I need a GitHub token or login?

No. GH Archive is a public static file host, so the Actor needs no GitHub token, OAuth, API key or account. Just set a date range and run.

#### How is this different from the GitHub REST Events API?

The GitHub REST Events API only returns the **~90 most recent events** for a repo or user and is heavily rate-limited. GH Archive is the **full historical bulk record of every public event since 2011**, so you can query any date in the past and pull unlimited history.

#### How far back does the data go?

GH Archive publishes hourly files from **2011-02-12** to roughly the current hour. You can request any date in that range. Dates before 2011-02-12 have no files and are skipped.

#### How much data can one run return?

A single UTC hour contains **hundreds of thousands of events**. With filters you typically pull thousands to tens of thousands of rows per day; without filters a run can reach millions. Use `maxItems` and `eventTypes` to control volume and cost.

#### Why did my run return zero results?

Usually one of three reasons: (1) the date/hour isn't published yet (very recent hours 404 briefly), (2) your `eventTypes` / `repoFilter` / `actorFilter` / `orgFilter` matched nothing in that window, or (3) the range was empty. Widen the window, clear filters, or pick a fully-published past date.

#### Why are some fields empty on a row?

Fields are event-type specific. A `WatchEvent` (star) has no PR or issue data, so those columns are omitted; a `PushEvent` fills `commitCount`/`commitMessages` but not `prTitle`. Each row only carries the fields relevant to its `eventType`.

#### What is a WatchEvent — is it a star?

Yes. In the GitHub Events schema a **star** is recorded as a `WatchEvent` with `action: "started"`. To reconstruct star history, filter `eventTypes: ["WatchEvent"]` for your target repo across a date range.

#### Can I export to CSV, JSON or Excel?

Yes. After a run, download the dataset from the Apify Console as **CSV, JSON, Excel, HTML, XML or JSONL**, or pull it through the Apify API. Every event is a flat row, so it imports cleanly into spreadsheets and databases.

#### How fast is it, and how much does it cost?

Speed is bound by download size — each hour file is ~70 MB gzipped. Restricting `hours` and `eventTypes` makes runs faster and cheaper. Pricing is pay-per-result, so tight filters keep cost low.

#### Is scraping GitHub Archive data legal?

GH Archive is a public, openly published dataset of already-public GitHub events. This Actor only reads that public data. You are responsible for using it in line with GitHub's terms, GH Archive's terms and applicable laws such as GDPR.

#### How often is the data updated?

GH Archive adds a new file roughly every hour, so recent activity becomes available within a short delay. Schedule this Actor to keep a rolling, up-to-date archive of any repo, org or ecosystem.

#### Which other GitHub scrapers pair well with this one?

Combine it with the **GitHub Repository Scraper** (repo metadata, stars, topics, languages) and **GitHub Activity Stream** (a specific user's or repo's recent activity) for a complete GitHub dataset. See the related scrapers below.

### ⚖️ Is it legal?

This Actor extracts only **publicly available, openly published** data from GH Archive — a public dataset of GitHub's own public event stream. It is intended for legitimate research, analytics, recruiting and monitoring use. You are responsible for complying with **GitHub's Terms of Service**, GH Archive's terms, GDPR and any applicable local laws and privacy regulations when you store or process the results, particularly any personal data such as usernames.

### 🔗 Related scrapers by logiover

Building a wider developer-data pipeline? Pair this with the rest of the logiover developer-tools suite:

- **[GitHub Repository Scraper](https://apify.com/logiover/github-repository-scraper)** — repo metadata, stars, forks, topics, languages and more by name or search.
- **[GitHub Activity Stream](https://apify.com/logiover/github-activity-stream)** — a specific user's or repo's recent public activity feed.
- **[npm Package Intelligence Scraper](https://apify.com/logiover/npm-package-intelligence-scraper)** — npm registry metadata, versions, dependencies and download stats.
- **[PyPI Package Scraper](https://apify.com/logiover/pypi-package-scraper)** — Python package metadata, releases and maintainer data.
- **[Docker Hub Scraper](https://apify.com/logiover/docker-hub-scraper)** · **[crates.io Scraper](https://apify.com/logiover/crates-io-scraper)** · **[CVE Security Advisory Monitor](https://apify.com/logiover/cve-security-advisory-monitor)**

👉 Browse all **[logiover scrapers on Apify Store](https://apify.com/logiover)** — 230+ actors across developer tools, real estate, jobs, crypto, social media and B2B data.

***

### 📝 Changelog

#### 2026-07-22

- 🎉 Initial release. Streams GH Archive hourly files (`data.gharchive.org`), gunzips and parses newline-delimited JSON line by line, and saves flat event rows.
- Filters by event type, repository (substring), actor login and organization, with a global `maxItems` cap and per-file dedupe by event ID.
- Memory-safe streaming (no whole-file buffering), graceful 404 skips for unpublished hours, and fresh-IP retries with exponential backoff on transient errors.

# Actor input Schema

## `startDate` (type: `string`):

Inclusive UTC start date in YYYY-MM-DD format. The scraper iterates every hourly archive file from this date onward. GH Archive publishes data from 2011-02-12 to the current hour. Example: '2024-06-15'

## `endDate` (type: `string`):

Inclusive UTC end date in YYYY-MM-DD format. Every hour file from startDate 00:00 up to endDate 23:00 is downloaded. Keep the range small (one day = 24 files, each ~70 MB gzipped) unless you raise maxItems. Leave equal to startDate for a single day. Example: '2024-06-15'

## `hours` (type: `array`):

Optional list of UTC hours (0 to 23) to download. Empty = all 24 hours of each day. Restricting to a few hours keeps runs small and cheap while you experiment. Example: \[9, 12, 15, 18]

## `eventTypes` (type: `array`):

GitHub event types to keep. Empty = ALL event types. Valid values: PushEvent, WatchEvent (a repository STAR), ForkEvent, PullRequestEvent, IssuesEvent, IssueCommentEvent, CreateEvent, DeleteEvent, ReleaseEvent, PullRequestReviewEvent, PullRequestReviewCommentEvent, MemberEvent, PublicEvent, GollumEvent, CommitCommentEvent.

## `repoFilter` (type: `array`):

Only keep events whose repo full name (owner/name) matches one of these entries (case-insensitive substring, so 'facebook/react' or just 'facebook/' or 'react' all work). Empty = every repository. Example: \['facebook/react', 'vuejs/', 'kubernetes']

## `actorFilter` (type: `array`):

Only keep events performed by these GitHub actor logins (case-insensitive exact match). Empty = every user. Great for tracking specific developers' public activity. Example: \['torvalds', 'gaearon']

## `orgFilter` (type: `array`):

Only keep events under these GitHub organizations (case-insensitive exact match on the org login). Empty = every org. Example: \['microsoft', 'google', 'apache']

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

Total hard cap on the number of matching events saved across the whole run. A single hour holds hundreds of thousands of events, so this defaults to a sane 5000 to avoid accidentally pulling millions. Raise it (or set a tight filter) for bulk exports. Must be greater than 0.

## `proxyConfiguration` (type: `object`):

Apify Proxy (ON by default). GH Archive is a public static file host; datacenter proxy is sufficient and cheapest. A fresh IP is used per hour file, and transient 5xx errors are retried with backoff. Switch to RESIDENTIAL only if you hit persistent throttling.

## Actor input object example

```json
{
  "startDate": "2024-06-15",
  "endDate": "2024-06-15",
  "hours": [
    "15"
  ],
  "eventTypes": [
    "WatchEvent",
    "PullRequestEvent"
  ],
  "repoFilter": [],
  "actorFilter": [],
  "orgFilter": [],
  "maxItems": 5000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `eventId` (type: `string`):

Unique GitHub event ID.

## `eventType` (type: `string`):

GitHub event type (PushEvent, WatchEvent, ForkEvent, PullRequestEvent, IssuesEvent, etc.).

## `action` (type: `string`):

Payload action where applicable (e.g. opened, closed, started, created, published).

## `createdAt` (type: `string`):

UTC timestamp when the event occurred (ISO 8601).

## `actorLogin` (type: `string`):

GitHub username that performed the event.

## `actorId` (type: `string`):

Numeric GitHub user ID of the actor.

## `actorUrl` (type: `string`):

GitHub profile URL of the actor.

## `repoName` (type: `string`):

Repository full name (owner/name).

## `repoUrl` (type: `string`):

https://github.com/\<owner/name> link to the repository.

## `orgLogin` (type: `string`):

Organization login the event belongs to, if any.

## `refType` (type: `string`):

For Create/Delete events: repository, branch or tag.

## `ref` (type: `string`):

Git ref (branch or tag name) for push/create/delete events.

## `commitCount` (type: `string`):

Number of commits in a push event.

## `commitMessages` (type: `string`):

Joined commit messages for a push event.

## `prNumber` (type: `string`):

Pull request number for PullRequest / review / review-comment events.

## `prTitle` (type: `string`):

Pull request title.

## `prState` (type: `string`):

Pull request state (open or closed).

## `prMerged` (type: `string`):

Whether the pull request was merged (true/false).

## `issueNumber` (type: `string`):

Issue number for Issues / issue-comment events.

## `issueTitle` (type: `string`):

Issue title.

## `issueState` (type: `string`):

Issue state (open or closed).

## `forkedTo` (type: `string`):

Full name of the new fork for a ForkEvent.

## `releaseTag` (type: `string`):

Tag name of a published release.

## `releaseName` (type: `string`):

Human-readable name of a published release.

## `commentBody` (type: `string`):

Body text of an issue, commit or PR review comment.

## `hourFile` (type: `string`):

GH Archive hourly file this event was parsed from (e.g. 2024-06-15-15).

# 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 = {
    "startDate": "2024-06-15",
    "endDate": "2024-06-15",
    "hours": [
        "15"
    ],
    "eventTypes": [
        "WatchEvent",
        "PullRequestEvent"
    ],
    "maxItems": 5000
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/github-archive-events-scraper").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 = {
    "startDate": "2024-06-15",
    "endDate": "2024-06-15",
    "hours": ["15"],
    "eventTypes": [
        "WatchEvent",
        "PullRequestEvent",
    ],
    "maxItems": 5000,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/github-archive-events-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startDate": "2024-06-15",
  "endDate": "2024-06-15",
  "hours": [
    "15"
  ],
  "eventTypes": [
    "WatchEvent",
    "PullRequestEvent"
  ],
  "maxItems": 5000
}' |
apify call logiover/github-archive-events-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/github-archive-events-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitHub Archive Events Scraper — Historical GH Events by Date",
        "description": "Download the full historical firehose of public GitHub events from GH Archive by date and hour. Extract pushes, stars, forks, pull requests, issues, releases and comments since 2011. Filter by repo, actor, org and event type. No API key, no login.",
        "version": "1.0",
        "x-build-id": "sFkahqQHb8Yca1PmV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~github-archive-events-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-github-archive-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~github-archive-events-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-github-archive-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~github-archive-events-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-github-archive-events-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startDate": {
                        "title": "Start Date (UTC)",
                        "type": "string",
                        "description": "Inclusive UTC start date in YYYY-MM-DD format. The scraper iterates every hourly archive file from this date onward. GH Archive publishes data from 2011-02-12 to the current hour. Example: '2024-06-15'",
                        "default": "2024-06-15"
                    },
                    "endDate": {
                        "title": "End Date (UTC)",
                        "type": "string",
                        "description": "Inclusive UTC end date in YYYY-MM-DD format. Every hour file from startDate 00:00 up to endDate 23:00 is downloaded. Keep the range small (one day = 24 files, each ~70 MB gzipped) unless you raise maxItems. Leave equal to startDate for a single day. Example: '2024-06-15'",
                        "default": "2024-06-15"
                    },
                    "hours": {
                        "title": "Hours Whitelist (0-23)",
                        "type": "array",
                        "description": "Optional list of UTC hours (0 to 23) to download. Empty = all 24 hours of each day. Restricting to a few hours keeps runs small and cheap while you experiment. Example: [9, 12, 15, 18]",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "eventTypes": {
                        "title": "Event Types",
                        "type": "array",
                        "description": "GitHub event types to keep. Empty = ALL event types. Valid values: PushEvent, WatchEvent (a repository STAR), ForkEvent, PullRequestEvent, IssuesEvent, IssueCommentEvent, CreateEvent, DeleteEvent, ReleaseEvent, PullRequestReviewEvent, PullRequestReviewCommentEvent, MemberEvent, PublicEvent, GollumEvent, CommitCommentEvent.",
                        "default": [
                            "WatchEvent",
                            "PullRequestEvent"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "repoFilter": {
                        "title": "Repository Filter",
                        "type": "array",
                        "description": "Only keep events whose repo full name (owner/name) matches one of these entries (case-insensitive substring, so 'facebook/react' or just 'facebook/' or 'react' all work). Empty = every repository. Example: ['facebook/react', 'vuejs/', 'kubernetes']",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "actorFilter": {
                        "title": "Actor (User) Filter",
                        "type": "array",
                        "description": "Only keep events performed by these GitHub actor logins (case-insensitive exact match). Empty = every user. Great for tracking specific developers' public activity. Example: ['torvalds', 'gaearon']",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "orgFilter": {
                        "title": "Organization Filter",
                        "type": "array",
                        "description": "Only keep events under these GitHub organizations (case-insensitive exact match on the org login). Empty = every org. Example: ['microsoft', 'google', 'apache']",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max Items (Global Cap)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Total hard cap on the number of matching events saved across the whole run. A single hour holds hundreds of thousands of events, so this defaults to a sane 5000 to avoid accidentally pulling millions. Raise it (or set a tight filter) for bulk exports. Must be greater than 0.",
                        "default": 5000
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify Proxy (ON by default). GH Archive is a public static file host; datacenter proxy is sufficient and cheapest. A fresh IP is used per hour file, and transient 5xx errors are retried with backoff. Switch to RESIDENTIAL only if you hit persistent throttling.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
