# KEGG Pathways Scraper (`parseforge/kegg-pathways-scraper`) Actor

Export biological pathway data from KEGG, the reference encyclopedia of genes, proteins, and metabolic networks. List, fetch, or search entries from pathway, module, KO, genome, compound, glycan, reaction, enzyme, drug, and disease databases.

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

## Pricing

from $18.00 / 1,000 result items

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)

## 🧬 KEGG Pathways Scraper

> 🚀 **Export biological pathway data from KEGG in seconds.** List, search, or fetch entries across **18 KEGG databases** (pathway, module, KO, compound, glycan, reaction, enzyme, drug, disease, and more). No login, no API key.

> 🕒 **Last updated:** 2026-05-22 · **📊 20 fields** per record · **🧬 18 KEGG databases** · **🔬 Live KEGG feed** · **🔍 3 query modes**

The **KEGG Pathways Scraper** taps KEGG (Kyoto Encyclopedia of Genes and Genomes), the reference resource for understanding biological systems from genomes and pathways to drugs and diseases. The Actor returns **20 structured fields per record**, including the entry ID, name, organism, definition, description, classification, cross-references to modules, diseases, drugs, pathways, genes, compounds, reactions, enzymes, and literature citations.

The catalog covers **18 KEGG databases**, from `pathway` and `module` to `compound`, `glycan`, `reaction`, `rclass`, `enzyme`, `network`, `variant`, `disease`, `drug`, `dgroup`, plus the organism-specific KO orthology and viral/addendum genomes. This Actor exposes three query modes (list, find, get) so you can browse, search, or pull full detail with the same predictable schema.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Systems biologists, drug-discovery scientists, metabolic engineers, bioinformaticians, computational biologists, pharma research, biotech startups | Pathway enrichment analysis, drug-target identification, metabolic network modelling, disease-gene mapping, ortholog assignment, KEGG-driven LLM grounding |

---

### 📋 What the KEGG Pathways Scraper does

Three query workflows across 18 databases in a single Actor:

- 📑 **List mode.** Enumerate every entry in a database (e.g. all human pathways, all compounds, all drugs).
- 🔎 **Find mode.** Free-text keyword search across a database (e.g. `glycolysis`, `insulin`, `tuberculosis`).
- 🧾 **Get mode.** Retrieve full entry detail by ID (e.g. `hsa00010+hsa00020` for human glycolysis and TCA cycle).
- 🧬 **Organism filter.** Restrict pathway/module/KO queries to one organism via KEGG codes (`hsa` human, `mmu` mouse, `eco` E. coli, `sce` yeast).

Each record includes the entry ID, name, organism, definition, description, classification hierarchy, plus structured cross-references to modules, diseases, drugs, related pathways, genes, compounds, reactions, enzymes, and literature references. The raw KEGG flat-file text is also preserved.

> 💡 **Why it matters:** KEGG is the most widely cited pathway resource in systems biology, but its REST API returns plain-text flat files that need a custom parser per database. This Actor delivers a single normalized schema, so you can move from query to dashboard or model in minutes.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<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>mode</code></td><td>enum</td><td><code>"list"</code></td><td>One of <code>list</code>, <code>find</code>, <code>get</code>.</td></tr>
<tr><td><code>database</code></td><td>enum</td><td><code>"pathway"</code></td><td>One of 18 KEGG databases.</td></tr>
<tr><td><code>organism</code></td><td>string</td><td><code>"hsa"</code></td><td>KEGG organism code. Applies to list mode with pathway/module/ko.</td></tr>
<tr><td><code>query</code></td><td>string</td><td><code>""</code></td><td>Keyword for find mode, or <code>+</code>-joined IDs for get mode.</td></tr>
</tbody>
</table>

**Example: list all human pathways.**

```json
{
    "maxItems": 500,
    "mode": "list",
    "database": "pathway",
    "organism": "hsa"
}
````

**Example: fetch full detail for glycolysis and TCA cycle.**

```json
{
    "maxItems": 2,
    "mode": "get",
    "database": "pathway",
    "query": "hsa00010+hsa00020"
}
```

**Example: search for tuberculosis-related drugs.**

```json
{
    "maxItems": 50,
    "mode": "find",
    "database": "drug",
    "query": "tuberculosis"
}
```

> ⚠️ **Good to Know:** KEGG's `get` operation accepts up to 10 IDs per request. The Actor chunks larger ID lists automatically and stitches results back together.

***

### 📊 Output

Each record contains **20 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `entryId` | string | `"hsa00010"` |
| 🗂️ `database` | string | `"pathway"` |
| 🏷️ `name` | string | `"Glycolysis / Gluconeogenesis"` |
| 🧬 `organism` | string | null | `"Homo sapiens (human)"` |
| 📝 `definition` | string | null | `"Glycolysis is the process of..."` |
| 📖 `description` | string | null | `"Reference pathway map..."` |
| 🗂️ `classification` | string\[] | null | `["Metabolism", "Carbohydrate metabolism"]` |
| 🧱 `modules` | object\[] | null | `[{ "id": "M00001", "name": "..." }]` |
| 🩺 `diseases` | object\[] | null | `[{ "id": "H00114", "name": "Hereditary fructose intolerance" }]` |
| 💊 `drugs` | object\[] | null | `[{ "id": "D00097", "name": "Metformin" }]` |
| 🔗 `pathways` | object\[] | null | `[{ "id": "hsa00020", "name": "Citrate cycle" }]` |
| 🧬 `genes` | object\[] | null | `[{ "id": "3098", "symbol": "HK1" }]` |
| ⚗️ `compounds` | object\[] | null | `[{ "id": "C00031", "name": "D-Glucose" }]` |
| 🔄 `reactions` | object\[] | null | `[{ "id": "R01786", "name": "..." }]` |
| 🧪 `enzymes` | object\[] | null | `[{ "id": "2.7.1.1", "name": "Hexokinase" }]` |
| 📚 `references` | object\[] | null | `[{ "pmid": "12345678", "title": "..." }]` |
| 📄 `rawEntry` | string | null | `"ENTRY hsa00010 Pathway..."` |
| 🔗 `url` | string | `"https://www.kegg.jp/entry/hsa00010"` |
| 🕓 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |
| ⚠️ `error` | string | null | `null` |

#### 📦 Sample records

<details>
<summary><strong>🧬 Human glycolysis pathway (hsa00010)</strong></summary>

```json
{
    "entryId": "hsa00010",
    "database": "pathway",
    "name": "Glycolysis / Gluconeogenesis - Homo sapiens (human)",
    "organism": "Homo sapiens (human)",
    "definition": null,
    "description": "Glycolysis is the process of converting glucose into pyruvate and generating small amounts of ATP and NADH.",
    "classification": ["Metabolism", "Carbohydrate metabolism"],
    "modules": [{ "id": "M00001", "name": "Glycolysis (Embden-Meyerhof pathway)" }],
    "diseases": [{ "id": "H00114", "name": "Hereditary fructose intolerance" }],
    "drugs": null,
    "pathways": [{ "id": "hsa00020", "name": "Citrate cycle (TCA cycle)" }],
    "genes": [{ "id": "3098", "symbol": "HK1" }, { "id": "3099", "symbol": "HK2" }],
    "compounds": [{ "id": "C00031", "name": "D-Glucose" }],
    "reactions": [{ "id": "R01786", "name": "ATP:D-glucose 6-phosphotransferase" }],
    "enzymes": [{ "id": "2.7.1.1", "name": "Hexokinase" }],
    "references": [{ "pmid": "16381901", "title": "Glycolysis review" }],
    "rawEntry": "ENTRY       hsa00010                    Pathway\nNAME        Glycolysis / Gluconeogenesis...",
    "url": "https://www.kegg.jp/entry/hsa00010",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>💊 Drug entry: Metformin (D00944)</strong></summary>

```json
{
    "entryId": "D00944",
    "database": "drug",
    "name": "Metformin hydrochloride",
    "organism": null,
    "definition": null,
    "description": "Antidiabetic, biguanide derivative.",
    "classification": ["Hypoglycemics", "Biguanides"],
    "modules": null,
    "diseases": [{ "id": "H00409", "name": "Type 2 diabetes mellitus" }],
    "drugs": null,
    "pathways": [{ "id": "hsa04930", "name": "Type II diabetes mellitus" }],
    "genes": null,
    "compounds": null,
    "reactions": null,
    "enzymes": null,
    "references": [{ "pmid": "23104073", "title": "Mechanisms of metformin action" }],
    "rawEntry": "ENTRY       D00944                      Drug\nNAME        Metformin hydrochloride...",
    "url": "https://www.kegg.jp/entry/D00944",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🗂️ | **18 databases.** Pathway, module, KO, compound, glycan, reaction, enzyme, drug, disease, and more. |
| 🔍 | **Three query modes.** List, find, and get cover discovery, search, and detail pulls. |
| 🧬 | **Organism-aware.** Filter pathway, module, and KO queries by KEGG organism code. |
| 🔗 | **Rich cross-references.** Every entry links to related modules, diseases, drugs, genes, compounds. |
| ⚡ | **Fast.** 100 entries in under a minute. |
| 🔁 | **Always fresh.** Every run hits the live KEGG feed. |
| 🚫 | **No API key.** Public KEGG REST endpoints need no registration. |

> 📊 KEGG is the foundational systems-biology reference cited in tens of thousands of papers across genomics, metabolomics, and drug discovery.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ KEGG Pathways Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **18 databases** | **Live per run** | List, find, get, organism | ⚡ 2 min |
| Manual REST calls + custom parser | Free | Full | Per-build | Hand-rolled | ⏳ Days |
| KEGGREST R package | Free | Full | Live | Limited | 🐢 Hours |
| Commercial pathway-analysis suites | $$$$/year | Curated subset | Vendor schedule | Vendor-defined | 🕒 Sales cycle |

Pick this Actor when you want a single normalized schema, three query modes, and zero parser maintenance.

***

### 🚀 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 KEGG Pathways Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick a database, query mode, and any keyword or ID list.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **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">

#### 💊 Drug discovery

- Drug-target identification across pathways
- Polypharmacology and side-effect mapping
- Disease-gene-drug network construction
- Pathway-level repositioning screens

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

#### 🧬 Systems biology

- Pathway enrichment for omics datasets
- KO orthology mapping across organisms
- Metabolic network reconstruction
- Comparative genomics across species

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

#### 🏭 Metabolic engineering

- Strain-design enzyme target lookup
- Flux-balance analysis input data
- Pathway gap-filling and rerouting
- Compound and reaction reference tables

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

#### 🧪 Translational research

- Disease-pathway annotation for diagnostics
- Biomarker discovery context
- Multi-omics integration anchors
- Curation pipelines for proprietary KBs

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

***

### 🔌 Automating KEGG Pathways 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. Weekly or monthly refreshes keep downstream knowledge bases in sync automatically.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

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

#### 🎓 Research and academia

- Pathway and module datasets for systems-biology courses
- Reproducible studies with cited, versioned KEGG pulls
- Thesis projects on metabolic engineering and orthology
- Cross-organism comparative genomics

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

#### 🎨 Personal and creative

- Hobbyist bioinformatics blogs and explainers
- Visualization projects on metabolic networks
- Educational apps that teach pathway biology
- Side projects on plant or microbial metabolism

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

#### 🤝 Non-profit and civic

- Open-science platforms for global-south researchers
- Public-health education on disease pathways
- Citizen-science projects on microbiome metabolism
- Outreach resources for STEM education

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

#### 🧪 Experimentation

- Train pathway-prediction ML models
- Validate generative-biology tools against KEGG ground truth
- Prototype agent pipelines that answer pathway questions
- Build LLM-grounded biology assistants with cited records

</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%20KEGG%20Pathways%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%20KEGG%20Pathways%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%20KEGG%20Pathways%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%20KEGG%20Pathways%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?

Pick a database, a query mode (list, find, get), and any keyword or ID list. The Actor hits the public KEGG endpoint, parses the flat-file response into a clean schema, and emits one structured record per entry.

#### 📏 How accurate is the data?

Records mirror the live KEGG feed at run time. KEGG is curated by the Kanehisa Laboratories at Kyoto University and is one of the most widely cited bioinformatics resources.

#### 🔁 How often is the dataset refreshed?

KEGG is updated continuously. Every Actor run pulls the latest entries, modules, references, and cross-references at run time.

#### 🧬 What organism codes are supported?

Every KEGG organism code works, including `hsa` (human), `mmu` (mouse), `rno` (rat), `eco` (E. coli), `sce` (yeast), `dre` (zebrafish), and thousands more. See the KEGG organism list for the full set.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval and keep a downstream knowledge base in sync.

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

KEGG offers free academic access. Commercial users should review KEGG's licensing terms before redistribution or productization. Raw entry retrieval for non-commercial research is generally permitted.

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

Commercial use of KEGG typically requires a KEGG FTP/API subscription from Pathway Solutions. Review the terms before deploying KEGG-derived data in a commercial product.

#### 💳 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 and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🆘 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

KEGG Pathways 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) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe pathway data 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. Push fresh KEGG data into your product backend, or alert your team in Slack.

***

### 🔗 Recommended Actors

- [**🧪 PubChem Compound Scraper**](https://apify.com/parseforge/pubchem-compound-scraper) - NIH chemical compound database
- [**🏥 ClinicalTrials.gov Scraper**](https://apify.com/parseforge/clinicaltrials-gov-scraper) - Global clinical research registry
- [**📚 PubMed Scraper**](https://apify.com/parseforge/pubmed-scraper) - Biomedical literature search
- [**🔬 ArXiv Scraper**](https://apify.com/parseforge/arxiv-scraper) - Preprint research papers
- [**📊 GBIF Biodiversity Scraper**](https://apify.com/parseforge/gbif-biodiversity-scraper) - Global species occurrence data

> 💡 **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 KEGG, Kanehisa Laboratories, Kyoto University, or Pathway Solutions Inc. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.

# Actor input Schema

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

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

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

list = enumerate all entries in a database. find = search a database by keyword. get = retrieve full entry detail for specific IDs.

## `database` (type: `string`):

Which KEGG database to query. 'pathway' is the most common (metabolic and signaling maps).

## `organism` (type: `string`):

Optional KEGG organism code for organism-specific queries (e.g. 'hsa' = human, 'mmu' = mouse, 'eco' = E. coli, 'sce' = yeast). Only applies to 'list' mode with pathway/module/ko databases.

## `query` (type: `string`):

For 'find' mode: free-text keyword (e.g. 'glycolysis'). For 'get' mode: KEGG IDs separated by '+' (e.g. 'hsa00010+hsa00020', max 10). Leave empty for 'list' mode.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "list",
  "database": "pathway",
  "organism": "hsa"
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10,
    "mode": "list",
    "database": "pathway",
    "organism": "hsa"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/kegg-pathways-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 = {
    "maxItems": 10,
    "mode": "list",
    "database": "pathway",
    "organism": "hsa",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/kegg-pathways-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 '{
  "maxItems": 10,
  "mode": "list",
  "database": "pathway",
  "organism": "hsa"
}' |
apify call parseforge/kegg-pathways-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "KEGG Pathways Scraper",
        "description": "Export biological pathway data from KEGG, the reference encyclopedia of genes, proteins, and metabolic networks. List, fetch, or search entries from pathway, module, KO, genome, compound, glycan, reaction, enzyme, drug, and disease databases.",
        "version": "1.0",
        "x-build-id": "FzGkHFO8ZIlx2SQE9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~kegg-pathways-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-kegg-pathways-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~kegg-pathways-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-kegg-pathways-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~kegg-pathways-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-kegg-pathways-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": {
                    "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"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "list",
                            "find",
                            "get"
                        ],
                        "type": "string",
                        "description": "list = enumerate all entries in a database. find = search a database by keyword. get = retrieve full entry detail for specific IDs."
                    },
                    "database": {
                        "title": "Database",
                        "enum": [
                            "pathway",
                            "brite",
                            "module",
                            "ko",
                            "genome",
                            "vg",
                            "vp",
                            "ag",
                            "compound",
                            "glycan",
                            "reaction",
                            "rclass",
                            "enzyme",
                            "network",
                            "variant",
                            "disease",
                            "drug",
                            "dgroup"
                        ],
                        "type": "string",
                        "description": "Which KEGG database to query. 'pathway' is the most common (metabolic and signaling maps)."
                    },
                    "organism": {
                        "title": "Organism Code",
                        "type": "string",
                        "description": "Optional KEGG organism code for organism-specific queries (e.g. 'hsa' = human, 'mmu' = mouse, 'eco' = E. coli, 'sce' = yeast). Only applies to 'list' mode with pathway/module/ko databases."
                    },
                    "query": {
                        "title": "Search Query / Entry IDs",
                        "type": "string",
                        "description": "For 'find' mode: free-text keyword (e.g. 'glycolysis'). For 'get' mode: KEGG IDs separated by '+' (e.g. 'hsa00010+hsa00020', max 10). Leave empty for 'list' mode."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
