# Gene Target Dossier: NCBI, UniProt, PubMed & Trials (`strange_code/gene-target-dossier`) Actor

One clean record per gene: official name, summary, protein function, localization, disease links, publication volume, latest papers and clinical trials, joined from four public databases in one run.

- **URL**: https://apify.com/strange_code/gene-target-dossier.md
- **Developed by:** [David Ayala-Talavera](https://apify.com/strange_code) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 gene dossiers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

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

## 🧬 Gene Target Dossier — NCBI + UniProt + PubMed + ClinicalTrials.gov in one row

Type in gene symbols. Get back **one clean record per gene** that joins four databases you would otherwise query one at a time:

| Source | What you get |
|---|---|
| **NCBI Gene** | Official symbol & name, aliases, chromosome locus, RefSeq gene summary |
| **UniProtKB (reviewed)** | Protein name, length, function, subcellular localization, disease associations with OMIM IDs |
| **PubMed** | Total paper count, paper count in the last *N* years, and the latest papers with links |
| **ClinicalTrials.gov** | Number of active trials mentioning the gene, with NCT ID, phase, status and lead sponsor |

#### 📥 Full exports: every trial and every paper

Turn on **Export all clinical trials** and/or **Export all publications** to also get two separate download files (CSV for Excel, and JSON), one row per trial or paper across all your genes:

- **trials.csv**: NCT ID, title, status, phases, study type, conditions, interventions, lead sponsor and sponsor class, enrollment, start and completion dates, countries, link
- **publications.csv**: PMID, title, journal, date, first and last author, author count, publication types, DOI, link (newest first, recent window or all time)

Links to both files appear on the run's **Output** tab. Each gene record also reports how many trials and papers matched and how many were exported.

No API keys, no scripts, no tab-hopping. Export to JSON, CSV or Excel, call it from the API, or plug it into an AI agent through the Apify MCP server.

### Who it's for

- **Biotech BD & competitive-intelligence analysts** screening target lists ("which of these 200 genes have active trials, and who's sponsoring them?")
- **Researchers & grad students** writing background sections or ranking candidates from a screen
- **Investors** sizing how crowded a target is
- **AI agents** that need a compact, citable gene briefing (every record includes a `markdownSummary` field ready to drop into a prompt)

### Example output (abridged)

```json
{
  "officialSymbol": "BRCA1",
  "officialName": "BRCA1 DNA repair associated",
  "mapLocation": "17q21.31",
  "aliases": ["BRCAI", "BRCC1", "FANCS"],
  "uniprotAccession": "P38398",
  "proteinName": "Breast cancer type 1 susceptibility protein",
  "subcellularLocations": ["Nucleus", "Chromosome"],
  "diseaseAssociations": [{"name": "Breast cancer", "acronym": "BC", "omim": "114480"}],
  "pubmedTotalCount": 23380,
  "recentPapers": [{"pmid": "…", "title": "…", "journal": "…", "url": "…"}],
  "clinicalTrialsCount": 222,
  "clinicalTrials": [{"nctId": "NCT…", "phases": ["PHASE2"], "status": "RECRUITING", "leadSponsor": "…"}],
  "markdownSummary": "## BRCA1 — BRCA1 DNA repair associated\n…"
}
```

### Input

| Field | Default | Notes |
|---|---|---|
| `genes` | — | List of symbols, e.g. `BRCA1`, `KRAS`, `PCSK9` |
| `organism` | human | human, mouse, rat, zebrafish, fruit fly, C. elegans, yeast |
| `includeClinicalTrials` | true | Turn off for non-human or basic-research lists |
| `activeTrialsOnly` | true | Recruiting / active / not-yet-recruiting only |
| `pubmedYears` | 5 | Window for the "recent papers" count |
| `recentPapers` | 5 | Latest papers listed per gene |
| `maxTrials` | 5 | Trials listed per gene |
| `exportAllTrials` | false | Save every matching trial to `trials.csv` / `trials.json` |
| `exportAllPublications` | false | Save every matching paper to `publications.csv` / `publications.json` |
| `publicationExportScope` | recent window | `recent window` or `all time` |
| `maxExportRowsPerGene` | 1000 | Cap on trials and on papers per gene (max 9,999) |
| `ncbiApiKey` | — | Optional free NCBI key — makes big batches ~3× faster |

### Pricing

**Pay per result, no monthly fee.**

- **Gene dossier:** charged once per gene that resolves to a real record. Typos and unknown symbols are returned with `"found": false` and are **free**.
- **Exported trial / paper rows** (only when exports are on): a small charge per row. Use *Max export rows per gene* and Apify's max-charge-per-run setting to control spend. A run that reaches your limit stops cleanly and keeps every row you paid for.

### Reliability

- If one source is temporarily down, the dossier is still returned with the other three and the failure is listed in `errors`.
- Respects NCBI rate limits automatically, with retries on throttling.

### Notes & attribution

Trial counts are text matches on the gene symbol, so short or ambiguous symbols (e.g. `MET`, `CAT`) can over-count — check the listed trials. Data comes from NCBI Gene & PubMed (U.S. National Library of Medicine), UniProt (UniProt Consortium, CC BY 4.0) and ClinicalTrials.gov. This Actor is not affiliated with or endorsed by those organizations.

# Actor input Schema

## `genes` (type: `array`):

Official gene symbols, one per line (e.g. BRCA1, TP53, KRAS).

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

Species to resolve symbols in.

## `includeClinicalTrials` (type: `boolean`):

Look up ClinicalTrials.gov studies mentioning each gene.

## `activeTrialsOnly` (type: `boolean`):

Only count recruiting / active / not-yet-recruiting trials.

## `pubmedYears` (type: `integer`):

How many recent years to count publications over (in addition to the all-time total).

## `recentPapers` (type: `integer`):

Number of most recent PubMed papers to list for each gene (0 to skip).

## `maxTrials` (type: `integer`):

Number of clinical trials to list for each gene (the total count is always included).

## `exportAllTrials` (type: `boolean`):

Also save every matching ClinicalTrials.gov study for each gene as a separate CSV/JSON file (conditions, interventions, phase, sponsor, enrollment, dates, countries). Charged per trial row.

## `exportAllPublications` (type: `boolean`):

Also save every matching PubMed paper for each gene as a separate CSV/JSON file (title, journal, date, authors, DOI, publication types). Charged per paper row.

## `publicationExportScope` (type: `string`):

Export papers from the recent-publication window only, or from all time.

## `maxExportRowsPerGene` (type: `integer`):

Upper limit on trials and on papers exported for each gene (newest papers first). PubMed allows at most 9,999 per query.

## `ncbiApiKey` (type: `string`):

Free key from your NCBI account; raises the rate limit and speeds up large batches.

## `contactEmail` (type: `string`):

Sent to NCBI as the 'email' parameter, as NCBI requests for heavy users.

## Actor input object example

```json
{
  "genes": [
    "BRCA1",
    "KRAS",
    "PCSK9"
  ],
  "organism": "human",
  "includeClinicalTrials": true,
  "activeTrialsOnly": true,
  "pubmedYears": 5,
  "recentPapers": 5,
  "maxTrials": 5,
  "exportAllTrials": false,
  "exportAllPublications": false,
  "publicationExportScope": "recent window",
  "maxExportRowsPerGene": 1000
}
```

# Actor output Schema

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

Key fields per gene: symbol, name, locus, UniProt ID, paper and trial counts.

## `results` (type: `string`):

Complete records including protein function, localization, diseases, latest papers, trials and a Markdown summary.

## `trialsCsv` (type: `string`):

Every trial found for every gene, one row per trial. Filled when 'Export all clinical trials' is on.

## `trialsJson` (type: `string`):

No description

## `publicationsCsv` (type: `string`):

Every PubMed paper found for every gene, newest first. Filled when 'Export all publications' is on.

## `publicationsJson` (type: `string`):

No description

## `allFiles` (type: `string`):

Lists every export file, including extra parts (trials-part2.csv, ...) for very large runs.

# 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 = {
    "genes": [
        "BRCA1",
        "KRAS",
        "PCSK9"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("strange_code/gene-target-dossier").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 = { "genes": [
        "BRCA1",
        "KRAS",
        "PCSK9",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("strange_code/gene-target-dossier").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 '{
  "genes": [
    "BRCA1",
    "KRAS",
    "PCSK9"
  ]
}' |
apify call strange_code/gene-target-dossier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,strange_code/gene-target-dossier"
        }
    }
}
```

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/iYQW2mL5e82a1qOte/builds/MUd1Bb7xlB69lGRhp/openapi.json
