# Codecov Code Coverage Stats Scraper (`parseforge/codecov-stats-scraper`) Actor

Scrape Codecov public repository coverage stats: percent covered, branch coverage, lines hit/miss, latest commit, language breakdown. No API key required.

- **URL**: https://apify.com/parseforge/codecov-stats-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $27.22 / 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🧪 Codecov Code Coverage Stats Scraper

> 🚀 **Export Codecov coverage data in seconds across four levels.** Pull repo-level totals, every commit, every pull request with base/head coverage delta, or every file with line-level coverage. Public Codecov accounts on GitHub, GitLab, and Bitbucket. No API key, no registration.

> 🕒 **Last updated:** 2026-05-13 · **📊 4 modes**, repo + commit + pull + file granularity · **🌐 GitHub + GitLab + Bitbucket** · **⏳ 30-day trend per repo**

The **Codecov Code Coverage Stats Scraper** wraps the official Codecov public API (`api.codecov.io/api/v2`) and turns coverage telemetry into flat rows at four levels of granularity. The underlying platform is **Codecov**, the most widely adopted hosted code-coverage service, integrated into thousands of CI pipelines across the open-source ecosystem.

### 🎚️ Four modes, four levels of granularity

This is the differentiator. Pick the granularity that matches your analysis:

| Mode | One row per | Typical volume per active repo |
|---|---|---|
| 🏗️ **`repos`** | repository | 1 (one row per tracked repo, enriched with 30-day trend + best/worst file) |
| ⚙️ **`commits`** | commit | 700+ (full commit history with per-commit coverage, hits, misses, partials, branches) |
| 🔀 **`pulls`** | pull request | Hundreds (base vs head coverage and delta, per-PR patch stats) |
| 📄 **`files`** | file in the latest report | Dozens to thousands (per-file coverage, covered line numbers, uncovered line numbers) |

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Engineering leaders, DevEx and platform teams, OSS maintainers, internal audit, ML-on-code researchers, hiring teams, build-quality consultants | Coverage scorecards, CI/CD KPIs, regression tracking, OSS quality benchmarking, file-level hotspot analysis, build-quality reporting |

---

### 📋 What the Codecov Scraper does

Four targeted workflows in a single Actor:

- 🏗️ **`repos` mode.** For each tracked repo: name, language, branch, total coverage, line/branch/method coverage, hits, misses, partials, sessions, complexity, latest-commit pointer, and a **30-day coverage trend** with direction (rising / falling / stable) and delta. Also includes the **best-covered** and **worst-covered** file. One row per repo.
- ⚙️ **`commits` mode.** For each commit on every active repo: commit SHA, branch, message, timestamp, author, CI status, parent SHA, coverage, files, lines, hits, misses, partials, branches, methods, sessions, complexity. Hundreds of rows per active repo.
- 🔀 **`pulls` mode.** For each pull request: title, state, CI status, author, base coverage, head coverage, **coverage delta**, head lines/hits/misses/partials/files, and patch totals. Lets you see exactly how each PR moved coverage.
- 📄 **`files` mode.** For each file in the latest coverage report: filename, coverage percent, lines, hits, misses, partials, branches, methods, complexity, and the **full list of covered and uncovered line numbers**. Hotspot-grade detail.

Filter by `provider` (GitHub / GitLab / Bitbucket), `owner` (any public Codecov account), optional single `repo` to bypass pagination, and `activeOnly` to limit to repos currently receiving uploads.

> 💡 **Why it matters:** Codecov scorecards usually live behind a manual UI flip-through. This Actor turns the entire telemetry stack into rows you can drop into a warehouse, a quality dashboard, or an ML feature store. The four-mode design means you can zoom out to a portfolio view or zoom in to specific uncovered line numbers in a single afternoon.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing all four modes against a popular OSS org._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>mode</code></td><td>enum</td><td><code>"repos"</code></td><td><code>repos</code>, <code>commits</code>, <code>pulls</code>, or <code>files</code>. Controls row granularity.</td></tr>
<tr><td><code>owner</code></td><td>string</td><td><code>"vercel"</code></td><td>GitHub / GitLab / Bitbucket user or organization slug. Examples: <code>apache</code> (3.1k repos), <code>vercel</code> (225), <code>openai</code> (170).</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>repo</code></td><td>string</td><td><code>""</code></td><td>Single repository name. If set, fetches that one repo only and ignores pagination.</td></tr>
<tr><td><code>provider</code></td><td>enum</td><td><code>"github"</code></td><td><code>github</code>, <code>gitlab</code>, or <code>bitbucket</code>.</td></tr>
<tr><td><code>activeOnly</code></td><td>boolean</td><td><code>false</code></td><td>When checked, only return repos currently sending coverage uploads. Tight filter; large orgs may drop from thousands to dozens.</td></tr>
</tbody>
</table>

**Example: every Vercel repo with current coverage stats.**

```json
{
    "mode": "repos",
    "provider": "github",
    "owner": "vercel",
    "maxItems": 50
}
````

**Example: every commit on the `vercel/edge-runtime` repo.**

```json
{
    "mode": "commits",
    "provider": "github",
    "owner": "vercel",
    "repo": "edge-runtime",
    "maxItems": 500
}
```

**Example: file-level coverage hotspots in a single repo.**

```json
{
    "mode": "files",
    "provider": "github",
    "owner": "vercel",
    "repo": "edge-runtime",
    "maxItems": 100
}
```

> ⚠️ **Good to Know:** Codecov returns telemetry only for repos that have uploaded reports. Many tracked repos show `null` coverage because they have never uploaded. Use `activeOnly: true` to skip them. Commits and files modes are most useful for orgs with active CI; pulls mode is most useful for repos with active PR review.

***

### 📊 Output

Each mode returns a different row shape. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema for `repos` mode (selected fields)

| Field | Type | Example |
|---|---|---|
| 📛 `name` | string | `"edge-runtime"` |
| 🔗 `fullName` | string | `"vercel/edge-runtime"` |
| 🌐 `url` | string | `"https://codecov.io/github/vercel/edge-runtime"` |
| 🏷️ `provider` | string | `"github"` |
| 💬 `language` | string | null | `"typescript"` |
| 🌿 `branch` | string | null | `"main"` |
| 🔓 `isPrivate` | boolean | `false` |
| ✅ `activated` / `active` | boolean | `true` |
| 📊 `totalCoverage` | number | null | `82.58` |
| 📊 `lineCoverage` | number | null | `82.58` |
| 🔢 `files` / `lines` / `hits` / `misses` | integer | null | `40` / `2434` / `2010` / `404` |
| 🚦 `coverageRiskLevel` | enum | null | `"low"` / `"medium"` / `"high"` |
| ⏳ `coverageTrend30dPoints` | array | 30 daily points (min/max/avg) |
| 📈 `coverageTrendDirection` | enum | `"rising"` / `"falling"` / `"stable"` |
| 📉 `coverageTrend30dDelta` | number | `+1.42` |
| 🏆 `topFile` | object | Best-covered file with name + coverage |
| 🔥 `worstFile` | object | Worst-covered file with name + coverage |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-13T00:13:47.650Z"` |

#### 🧾 Schema for `commits` mode

| Field | Type | Example |
|---|---|---|
| 🆔 `commitid` | string | `"2823f9481f54e75ee433cc040479ac4914bb567f"` |
| 🌿 `branch` | string | null | `"readme"` |
| 💬 `message` | string | null | `"docs: tweaks"` |
| 🕒 `timestamp` | ISO 8601 | null | `"2023-01-09T15:51:01Z"` |
| 👤 `authorUsername` | string | null | `"Kikobeats"` |
| ✅ `ciPassed` | boolean | null | `true` |
| 📊 `coverage` | number | null | `82.58` |
| 🔢 `files` / `lines` / `hits` / `misses` / `partials` | integer | null | `40` / `2434` / `2010` / `404` / `20` |
| 🔗 `url` | string | `"https://app.codecov.io/github/vercel/edge-runtime/commit/2823f948..."` |

#### 🧾 Schema for `pulls` mode

| Field | Type | Example |
|---|---|---|
| 🔢 `pullid` | integer | `123` |
| 📛 `title` | string | null | `"feat: handle X"` |
| 🏷️ `state` | string | null | `"merged"` |
| 📊 `baseCoverage` / `headCoverage` | number | null | `81.20` / `82.58` |
| 📈 `coverageDelta` | number | null | `+1.38` |
| 🔢 `headFiles` / `headLines` / `headHits` / `headMisses` | integer | null | `40` / `2434` / `2010` / `404` |

#### 🧾 Schema for `files` mode

| Field | Type | Example |
|---|---|---|
| 📄 `filename` | string | `"src/handler.ts"` |
| 📊 `coverage` | number | null | `92.5` |
| 🔢 `lines` / `hits` / `misses` / `partials` | integer | null | `120` / `111` / `9` / `0` |
| ✅ `coveredLineNumbers` | integer\[] | `[1, 2, 3, 7, 8, ...]` |
| ❌ `uncoveredLineNumbers` | integer\[] | `[42, 43, 87]` |
| 🔗 `url` | string | `"https://app.codecov.io/github/.../blob/HEAD/src/handler.ts"` |

#### 📦 Sample record (`commits` mode)

<details>
<summary><strong>⚙️ Commit on vercel/edge-runtime: docs tweak</strong></summary>

```json
{
    "commitid": "2823f9481f54e75ee433cc040479ac4914bb567f",
    "repo": "edge-runtime",
    "fullName": "vercel/edge-runtime",
    "url": "https://app.codecov.io/github/vercel/edge-runtime/commit/2823f9481f54e75ee433cc040479ac4914bb567f",
    "branch": "readme",
    "message": "docs: tweaks",
    "timestamp": "2023-01-09T15:51:01Z",
    "authorUsername": "Kikobeats",
    "authorName": "Kiko",
    "state": "complete",
    "ciPassed": true,
    "parent": "eef6b34c56dd5f50e8912f4bd6bbc976291b7563",
    "coverage": 82.58,
    "files": 40,
    "lines": 2434,
    "hits": 2010,
    "misses": 404,
    "partials": 20,
    "branches": 198,
    "methods": 84,
    "sessions": 1,
    "scrapedAt": "2026-05-13T00:13:47.650Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🎚️ | **4 levels of granularity.** Repos, commits, pulls, files. Pick the row shape that matches your analysis. |
| 📈 | **30-day trend per repo.** Coverage direction and delta computed for you in `repos` mode. |
| 🔥 | **File-level hotspots.** `files` mode returns the exact line numbers that are uncovered. |
| 🔀 | **PR coverage delta.** `pulls` mode shows base vs head coverage so you can quantify each PR. |
| 🌐 | **Multi-provider.** GitHub, GitLab, and Bitbucket public Codecov accounts. |
| 🏆 | **Best / worst file.** `repos` mode auto-surfaces the most and least covered file. |
| ⚡ | **Fast and concurrent.** Repo enrichment runs 5 calls in parallel per repo. |
| 🚫 | **No authentication.** Public Codecov accounts only. No API key needed. |

> 📊 Coverage tells you whether your tests run. Combining it with trend, PR delta, and per-file hotspots tells you whether your engineering org is improving.

***

### 📈 How it compares to alternatives

| Approach | Cost | Granularity | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Codecov Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **4 modes (repo/commit/pull/file)** | **Live per run** | provider, owner, repo, active-only | ⚡ 2 min |
| Codecov web UI | Free | Single page at a time | Live | UI filters | 🐢 Slow, no automation |
| Custom Codecov API client | Free | Custom | Live | Custom | 🛠️ Hours to engineer 4 endpoints |
| Enterprise quality platforms | $$$$ | Multi-source | Vendor cadence | Vendor-specific | ⏳ Days |

Pick this Actor when you want all four levels of Codecov telemetry in flat rows with a single input form.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Codecov Code Coverage Stats Scraper page on the Apify Store.
3. 🎚️ **Pick a mode.** `repos` for portfolio view, `commits` / `pulls` / `files` for detail.
4. 🎯 **Set owner + repo.** Plug in any public Codecov account and an optional single repo name.
5. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
6. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🏗️ Engineering Leadership

- Org-wide coverage scorecards across hundreds of repos
- 30-day trend tracking for quality reviews
- Engineering KPIs tied to test discipline
- Quarterly business reviews on code quality

</td>
<td width="50%" valign="top">

#### 🛠️ DevEx & Platform Teams

- Identify under-tested repos before they break
- File-level hotspot reports for refactor planning
- PR-by-PR coverage delta tracking
- CI/CD pipeline health dashboards

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🧑‍💻 OSS Maintainers

- Public coverage badges sourced from real data
- Contributor recognition by tests-added
- Compare your project against peer projects
- Quality reporting for grant applications

</td>
<td width="50%" valign="top">

#### 🔍 Build-Quality Consulting

- Pre-engagement audits of client repos
- Before/after engagement comparison reports
- Benchmarking client coverage vs OSS peers
- Detailed file-level recommendations

</td>
</tr>
</table>

***

### 🔌 Automating Codecov Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Nightly portfolio refreshes or per-PR coverage capture both work.

***

### 🌟 Beyond business use cases

The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- ML-on-code datasets with paired coverage and SHA
- Empirical software-engineering studies
- Reproducible coursework on test-quality metrics
- Cross-language coverage comparisons

</td>
<td width="50%">

#### 🎨 Personal and creative

- Portfolio dashboards showing your OSS quality
- Personal coverage trends over time
- Side projects benchmarking your favorite libraries
- Visualizations of test discipline across orgs

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Public-interest reports on civic-tech repo health
- Foundation-level quality benchmarking
- Volunteer-onboarding hotspot guides
- Long-term sustainability tracking for OSS

</td>
<td width="50%">

#### 🧪 Experimentation

- Train models on coverage patterns vs bug counts
- Validate quality-platform product hypotheses
- Prototype LLM agents that recommend tests to add
- Test BI dashboards with live coverage feeds

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20Codecov%20Stats%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20Codecov%20Stats%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20Codecov%20Stats%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20Codecov%20Stats%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

The Actor hits the public Codecov API (`api.codecov.io/api/v2`), paginates through results, and returns one structured row per repo, commit, pull, or file. The shape depends on the `mode` you pick. Repo mode enriches each row with commits, branches, 30-day trend, and best/worst file via 4 parallel API calls.

#### 🎚️ What does each mode do?

- `repos` returns one row per tracked repo, enriched with 30-day coverage trend, best file, and worst file.
- `commits` returns one row per commit (700+ rows for active repos). Coverage, hits, misses, branches, CI status.
- `pulls` returns one row per pull request with base/head coverage and the delta.
- `files` returns one row per file in the latest report with covered and uncovered line numbers.

#### 🌐 Which providers are supported?

GitHub, GitLab, and Bitbucket public Codecov accounts. Set the `provider` input. Default is GitHub.

#### 🔓 Does it work on private repos?

No. This Actor uses the unauthenticated public Codecov API. Private repos require an API token, which is out of scope for this Actor.

#### 🚦 Why does coverage show null on some repos?

Codecov returns telemetry only for repos that have uploaded reports. Repos that are tracked but never uploaded show `null`. Set `activeOnly: true` to skip them.

#### 📈 What is `coverageRiskLevel`?

A categorical bucket computed from `totalCoverage`. `low` >= 80, `medium` 60-79, `high` < 60. Useful for quick scorecard summaries.

#### 📊 What is `coverageTrend30dDelta`?

The numeric change in average coverage over the last 30 days (head minus tail). Positive = rising, negative = falling, near-zero = stable.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily, weekly) and keep a downstream database in sync.

#### ⚖️ Is this data legal to use?

Codecov public accounts are intentionally exposed for community visibility. The Actor accesses only public endpoints. Review Codecov terms of use for any platform-specific restrictions before commercial redistribution.

#### 💼 Can I use this data commercially?

Yes. Coverage data on public accounts is public information and can be used in commercial products. Cite Codecov as the source.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit to 1,000,000 records.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

Codecov Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Coverage-drop alerts in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe coverage into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Alert your team in Slack when coverage on a tracked repo drops below a threshold.

***

### 🔗 Recommended Actors

- [**🤖 Hugging Face Model Scraper**](https://apify.com/parseforge/hugging-face-model-scraper) - ML model registry metadata
- [**📦 Stripe App Marketplace Scraper**](https://apify.com/parseforge/stripe-marketplace-scraper) - Stripe ecosystem catalog
- [**📦 AWS Marketplace Scraper**](https://apify.com/parseforge/aws-marketplace-scraper) - AWS catalog and pricing
- [**🛒 Hubspot Marketplace Scraper**](https://apify.com/parseforge/hubspot-marketplace-scraper) - HubSpot integration catalog
- [**✈️ OurAirports Global Airport Database Scraper**](https://apify.com/parseforge/ourairports-scraper) - Reference dataset benchmark

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Codecov or Sentry. All trademarks mentioned are the property of their respective owners. Only publicly available data from the official Codecov public API is collected.

# Actor input Schema

## `mode` (type: `string`):

What to scrape. repos = one row per tracked repo (default). commits = one row per commit across active repos (hundreds per repo). pulls = one row per pull request (with base/head coverage). files = one row per file in the latest report (with line-level coverage).

## `owner` (type: `string`):

GitHub / GitLab / Bitbucket user or organization slug, e.g. apache (3.1k repos), vercel (225), openai (170), torvalds.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `repo` (type: `string`):

Single repository name. If set, fetches that one repo only and ignores pagination.

## `provider` (type: `string`):

Git host backing the Codecov account.

## `activeOnly` (type: `boolean`):

When checked, only return repos currently sending coverage uploads to Codecov. Unchecked = include every tracked repo (default). Tight filter; large orgs may drop from thousands to dozens.

## Actor input object example

```json
{
  "mode": "repos",
  "owner": "vercel",
  "maxItems": 10,
  "repo": "",
  "provider": "github",
  "activeOnly": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete 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 = {
    "mode": "repos",
    "owner": "vercel",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/codecov-stats-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 = {
    "mode": "repos",
    "owner": "vercel",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/codecov-stats-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 '{
  "mode": "repos",
  "owner": "vercel",
  "maxItems": 10
}' |
apify call parseforge/codecov-stats-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Codecov Code Coverage Stats Scraper",
        "description": "Scrape Codecov public repository coverage stats: percent covered, branch coverage, lines hit/miss, latest commit, language breakdown. No API key required.",
        "version": "0.0",
        "x-build-id": "AXvZmdu0K5okheCGX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~codecov-stats-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-codecov-stats-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/parseforge~codecov-stats-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-codecov-stats-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/parseforge~codecov-stats-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-codecov-stats-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",
                "required": [
                    "owner"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "repos",
                            "commits",
                            "pulls",
                            "files"
                        ],
                        "type": "string",
                        "description": "What to scrape. repos = one row per tracked repo (default). commits = one row per commit across active repos (hundreds per repo). pulls = one row per pull request (with base/head coverage). files = one row per file in the latest report (with line-level coverage).",
                        "default": "repos"
                    },
                    "owner": {
                        "title": "Owner",
                        "type": "string",
                        "description": "GitHub / GitLab / Bitbucket user or organization slug, e.g. apache (3.1k repos), vercel (225), openai (170), torvalds.",
                        "default": "vercel"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "repo": {
                        "title": "Repository (optional)",
                        "type": "string",
                        "description": "Single repository name. If set, fetches that one repo only and ignores pagination.",
                        "default": ""
                    },
                    "provider": {
                        "title": "Provider",
                        "enum": [
                            "github",
                            "gitlab",
                            "bitbucket"
                        ],
                        "type": "string",
                        "description": "Git host backing the Codecov account.",
                        "default": "github"
                    },
                    "activeOnly": {
                        "title": "Only currently active repos",
                        "type": "boolean",
                        "description": "When checked, only return repos currently sending coverage uploads to Codecov. Unchecked = include every tracked repo (default). Tight filter; large orgs may drop from thousands to dozens.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
