# GitHub Issues & PR Scraper: Threads & Monitor (`amygraphics/github-issue-pr-intelligence`) Actor

Search public GitHub issues and pull requests, export discussions and reviews, analyze linked issues, and monitor changes with source evidence.

- **URL**: https://apify.com/amygraphics/github-issue-pr-intelligence.md
- **Developed by:** [Zakaria el bouami](https://apify.com/amygraphics) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / 1,000 issue or pr 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/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

## GitHub Issue & PR Intelligence

Collect **public GitHub issues and pull requests** from repository names, exact issue URLs, organizations, or search queries. Export source-linked records, optionally fetch discussions, reviews and changed-file details, and monitor selected fields across runs. This independent tool is not affiliated with GitHub.

### Quick start

```json
{"repositories":["psf/requests"],"state":"open","includeIssues":true,"includePullRequests":true,"maxResults":20}
```

Each row includes the full issue body, author, labels, assignees, milestone, reactions, issue or PR URL, creation/update/close timestamps, original search query and a Markdown representation. Optional `analysis` fields use transparent keyword matching, source labels and observed activity; they are **not validated severity, sentiment, or customer-intent predictions**. `referencedIssues` are links inferred from `#123` mentions, not verified relationships.

### Deep discussion and review context

```json
{"issueUrls":["https://github.com/psf/requests/pull/7619"],"state":"all","includeComments":true,"includeTimeline":true,"includePRDetails":true,"includeReviews":true,"includeFiles":true,"maxComments":10,"maxDeepResults":1}
```

Optional enrichment retrieves issue/PR comments, event timeline, PR merge status and counts, reviews, inline review comments, and changed-file metadata. Patches are truncated to 10,000 characters per file. The `maxComments` cap applies to each endpoint independently (up to 10,000); pagination continues up to 10,000 items per endpoint and `enrichmentCoverage` reports endpoint failures or possible truncation. Enrichment also has a shared 2.5 MB normalized-enrichment safety budget per row; the request budget and GitHub rate limits can stop it earlier. These limits may prevent full capture. `maxDeepResults` caps enriched rows; later rows explicitly mark the omitted enrichment. Deep rows use a separate event rate; inspect the live Pricing tab. A null search-result `mergedAt` does not establish whether a PR was merged; request PR details when needed.

### Search and source selection

- `repositories`: up to 100 public `owner/name` values or repository URLs. `issueUrls` accepts exact GitHub issue and pull-request URLs. Direct URLs are processed first.
- `organizations`: enumerate the latest public repositories up to `maxOrgRepos`; cap is reported. `searchQueries` supports GitHub issue search, including `user:` or `org:` qualifiers, and labels, open/closed state, and updated-since date. Existing `created:` or `updated:` qualifiers override `since`.
- GitHub limits each search to 1,000 results. `autoSplit` can partition a broad query by creation date, with `maxPartitions` and request limits. Single-day overflow, an existing `created:` qualifier, mutable data, request failures, or a reached cap may prevent complete output. Partitioned results are not globally sorted. See `RUN_SUMMARY.runDiagnostics` before making coverage claims.
- An optional `githubToken` is stored as a secret and sent only to `api.github.com`; redirects outside that host are refused. The Actor requires **public** resources even with a token and verifies repository visibility before output. It does not support private issue exports.

### Watch changes

```json
{"issueUrls":["https://github.com/psf/requests/issues/5185"],"state":"all","watch":true,"watchName":"requests-5185","baselineOnly":true}
```

The first run normally saves a baseline; later runs emit new rows and changed fields with before/after evidence, including state, title, labels, assignees, reaction counts, last update and a body hash. Set `state: "all"` and avoid open/closed qualifiers so a closure is observable. `mergedAt` in GitHub search can be missing; changed merge state is not guaranteed unless the source supplies it. Requested deep context is attached to emitted rows, not stored as a full conversation history.

State is saved only when the collection is not marked incomplete, requested enrichment is not partial, and the event budget has not stopped the run. Check `RUN_SUMMARY.watchStateSaved`. No deletion/removal alerts, no exactly-once guarantee after failures, no parallel runs with the same watch name, and a 10,000-item state cap. Changes outside the chosen query or caps can be missed. Narrow searches and run responsibly; see GitHub's recommendations on conditional requests and polling.

### Rates and responsible use

Check the live Pricing tab for the current plan-specific `issue-result`, `deep-result` and Actor start rates. Platform usage treatment is shown in the Pricing tab. Use a small `maxResults`, `maxRequests` and enrichment cap; the Actor respects the run's event spending limit. GitHub's unauthenticated API limit is typically 60 general requests/hour/IP and 10 search requests/minute/IP; authenticated limits and secondary limits vary. No proxy rotation, bypass, or automatic retry is used. Public text may contain personal information or copyrighted material; respect privacy and applicable terms before redistribution, model training, or outreach.

Sources: https://docs.github.com/en/rest/issues, https://docs.github.com/en/rest/pulls, https://docs.github.com/en/rest/search/search and https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api.

# Actor input Schema

## `repositories` (type: `array`):

Up to 100 owner/repository names or public GitHub repository URLs. Processed after direct URLs.

## `issueUrls` (type: `array`):

Optional exact github.com issue or pull-request URLs, processed first.

## `organizations` (type: `array`):

Up to 3 organizations; enumerate recent public repositories, with a bounded cap.

## `searchQueries` (type: `array`):

Up to 100 GitHub issue search expressions. Public-only enforced.

## `labels` (type: `array`):

Optional label filters added to searches. GitHub matching semantics apply.

## `state` (type: `string`):

Open, closed or all. Watch mode requires all.

## `since` (type: `string`):

Optional ISO date/time normalized to UTC date; ignored when query contains created or updated filter.

## `watchName` (type: `string`):

Required when watching. Letters, digits, hyphen and underscore. Do not run same watch concurrently.

## `githubToken` (type: `string`):

Optional secret token to increase public API rate limit. Private repositories are excluded.

## `includeIssues` (type: `boolean`):

Return issues.

## `includePullRequests` (type: `boolean`):

Return pull requests.

## `autoSplit` (type: `boolean`):

Partition searches over 1,000; still bounded and can be incomplete.

## `includeComments` (type: `boolean`):

Fetch bounded comments. Deep result rate applies.

## `includeTimeline` (type: `boolean`):

Fetch bounded timeline events. Deep result rate applies.

## `includePRDetails` (type: `boolean`):

Fetch merged status, branches and change counts. Deep result rate applies.

## `includeReviews` (type: `boolean`):

Fetch reviews and inline review comments. Deep result rate applies.

## `includeFiles` (type: `boolean`):

Fetch bounded file metadata and patches, limited to 10,000 characters per patch. Deep result rate applies.

## `watch` (type: `boolean`):

Persistent snapshot of selected fields. Requires state all.

## `baselineOnly` (type: `boolean`):

Store current IDs without output; later runs emit new or changed rows.

## `maxResults` (type: `integer`):

Cap across all sources, 1 to 10,000.

## `maxRequests` (type: `integer`):

Hard cap on GitHub API calls across collection and enrichment.

## `maxSearchRequests` (type: `integer`):

Maximum GitHub search requests per run; cap and rate limits can limit coverage.

## `maxDeepResults` (type: `integer`):

Requested deep fields apply only to this many emitted rows.

## `maxComments` (type: `integer`):

Maximum comments, timeline, reviews and files fetched per enriched row; paginated up to this cap; shared byte and request limits also apply.

## `maxOrgRepos` (type: `integer`):

Maximum first-page repositories per organization; cap is reported.

## `maxPages` (type: `integer`):

At most 10 pages of 100. GitHub search caps results at 1,000 per query.

## `maxPartitions` (type: `integer`):

Maximum child date buckets created. Single-day overflow and caps are reported.

## Actor input object example

```json
{
  "state": "open",
  "includeIssues": true,
  "includePullRequests": true,
  "autoSplit": false,
  "includeComments": false,
  "includeTimeline": false,
  "includePRDetails": false,
  "includeReviews": false,
  "includeFiles": false,
  "watch": false,
  "baselineOnly": true,
  "maxResults": 50,
  "maxRequests": 100,
  "maxSearchRequests": 10,
  "maxDeepResults": 10,
  "maxComments": 30,
  "maxOrgRepos": 20,
  "maxPages": 10,
  "maxPartitions": 20
}
```

# 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("amygraphics/github-issue-pr-intelligence").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("amygraphics/github-issue-pr-intelligence").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 amygraphics/github-issue-pr-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,amygraphics/github-issue-pr-intelligence"
        }
    }
}
```

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/CfOrByzoY7HtrnhVL/builds/yjh3X90TN5Ef2Tncw/openapi.json
