# PDBe Protein Structure Annotations Scraper (`ninhothedev/pdbe-structures-scraper`) Actor

$0.5/1K 🔥 PDBe Structures Scraper! Retrieve protein 3D structures, titles, resolution, authors & experimental data from PDBe. No key. JSON, CSV, Excel or API in seconds. Feed a structural-biology or drug-discovery pipeline ⚡

- **URL**: https://apify.com/ninhothedev/pdbe-structures-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## PDBe Protein Structure Annotations Scraper

Scrape experimental **protein structures** from **PDBe — the Protein Data Bank in Europe** — into clean, analysis-ready JSON. Give it a list of PDB accession codes and get back the experimental method, resolution, R-factor, space group, deposition/release dates, biological assembly, polymer entities, bound ligands, source organism, primary publication, and **SIFTS UniProt mappings** — all merged into one record per structure. **No API key. No login. ~$0.5 per 1,000 structures.**

Built on the free [PDBe REST API](https://www.ebi.ac.uk/pdbe/api/doc/) (EMBL-EBI, Hinxton, UK).

### What you get per structure

| Field | Description |
|---|---|
| `pdb_id`, `title`, `url` | Accession, title, PDBe entry link |
| `experimental_methods` | e.g. `["X-ray diffraction"]`, `["Electron Microscopy"]`, `["Solution NMR"]` |
| `resolution` | Ångström, float — **`null` for NMR/EM without a reported resolution (never faked as 0)** |
| `r_factor`, `space_group` | Refinement quality / crystal symmetry (null for non-diffraction methods) |
| `deposition_date`, `release_date`, `revision_date` | ISO `YYYY-MM-DD` |
| `entity_count`, `assembly_count`, `preferred_assembly` | Entity totals + the biologically preferred assembly (name/form) |
| `polymer_entities` | Compact `[{name, type, length, chains}]` for polypeptide/nucleotide chains |
| `ligands`, `ligand_count`, `has_ligands` | Bound chemical components (`[{id, name}]`) |
| `uniprot_accessions`, `uniprot_count` | SIFTS-mapped UniProt accessions |
| `organism`, `title_publication`, `pubmed_id`, `doi` | Source organism + primary citation |
| `source`, `scraped_at` | Provenance |

### Input

```json
{
  "mode": "entries",
  "pdbIds": ["1cbs", "4hhb", "6vxx"],
  "includeLigands": true,
  "includeUniprot": true,
  "maxItems": 100
}
```

- **mode** — `entries` (PDB id list → merged records).
- **pdbIds** — 4-character PDB codes (case-insensitive).
- **includeLigands / includeUniprot** — toggle the extra ligand / SIFTS requests.
- **maxItems** — cap (default 100, max 2000).

### Example output (6vxx — SARS-CoV-2 spike, cryo-EM)

```json
{
  "type": "structure",
  "pdb_id": "6vxx",
  "title": "Structure of the SARS-CoV-2 spike glycoprotein (closed state)",
  "experimental_methods": ["Electron Microscopy"],
  "resolution": 2.8,
  "r_factor": null,
  "space_group": null,
  "release_date": "2020-03-11",
  "preferred_assembly": {"assembly_id": "1", "name": "trimer", "form": "homo"},
  "polymer_entities": [{"name": "Spike glycoprotein", "type": "polypeptide(L)", "length": 1288, "chains": ["A"]}],
  "ligands": [{"id": "NAG", "name": "N-ACETYL-D-GLUCOSAMINE"}],
  "uniprot_accessions": ["P0DTC2"],
  "organism": "Severe acute respiratory syndrome coronavirus 2",
  "url": "https://www.ebi.ac.uk/pdbe/entry/pdb/6vxx",
  "source": "pdbe"
}
```

### Use cases

- **Structural biology** — bulk-pull method, resolution and assembly metadata across a set of structures.
- **Drug discovery** — enumerate bound ligands and their chem-comp ids for target/pocket analysis.
- **Structure QC** — compare resolution, R-factor and validation-relevant fields across candidates.
- **Teaching** — hand students clean, merged structure records without wrangling six endpoints.

### How this differs from the RCSB and AlphaFold scrapers

The Protein Data Bank is a global archive with regional data-in / data-out partners. This actor deliberately targets the **European (PDBe) aggregated views**, which are *not* the same as the US RCSB representation:

- **[PDBe Structures Scraper](https://apify.com/ninhothedev/pdbe-structures-scraper) (this actor)** — uses the **PDBe REST API**. You get PDBe's aggregated per-entry views and, notably, **SIFTS UniProt mappings** (residue-level structure↔sequence cross-references maintained at EMBL-EBI), the "preferred" biological assembly, and PDBe's molecule/ligand aggregation. European mirror, European field shapes.
- **[RCSB PDB Scraper](https://apify.com/ninhothedev/rcsb-pdb-scraper)** — uses the **US RCSB** data API, which exposes a different JSON model and different aggregated annotations for the *same* underlying entries. Use it when you specifically want RCSB's schema.
- **[AlphaFold Structures Scraper](https://apify.com/ninhothedev/alphafold-structures-scraper)** — **predicted** models (AlphaFold DB), not experimental depositions. Complementary, not overlapping: PDBe = experimentally determined; AlphaFold = computationally predicted.

If you need structure↔sequence↔function joins, pair this with the **[UniProt Scraper](https://apify.com/ninhothedev/uniprot-scraper)** and **[InterPro Scraper](https://apify.com/ninhothedev/interpro-scraper)**.

### Related actors

- [RCSB PDB Scraper](https://apify.com/ninhothedev/rcsb-pdb-scraper)
- [AlphaFold Structures Scraper](https://apify.com/ninhothedev/alphafold-structures-scraper)
- [UniProt Scraper](https://apify.com/ninhothedev/uniprot-scraper)
- [InterPro Scraper](https://apify.com/ninhothedev/interpro-scraper)

### Notes

Data is sourced from the public PDBe REST API (EMBL-EBI). PDB data is released under CC0. Please cite PDBe/wwPDB in downstream work.

# Actor input Schema

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

Scraping mode. Currently only 'entries' is supported: you provide a list of PDB ids and each is enriched with summary, experiment, molecules, ligands and UniProt mappings from the PDBe REST API.

## `pdbIds` (type: `array`):

List of 4-character PDB accession codes to scrape (case-insensitive), e.g. '1cbs', '4hhb', '6vxx'. Each id yields one merged structure record.

## `includeLigands` (type: `boolean`):

Fetch bound ligand / heteroatom chemical components (ligand\_monomers endpoint) and include their ids and names. Disable to skip this extra request per entry.

## `includeUniprot` (type: `boolean`):

Fetch SIFTS residue-level UniProt cross-references and include the mapped UniProt accessions. Disable to skip the mappings request per entry.

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

Maximum number of PDB structures to scrape. The pdbIds list is truncated to this many entries.

## Actor input object example

```json
{
  "mode": "entries",
  "pdbIds": [
    "1cbs",
    "4hhb",
    "6vxx"
  ],
  "includeLigands": true,
  "includeUniprot": true,
  "maxItems": 100
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pdbIds": [
        "1cbs",
        "4hhb",
        "6vxx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/pdbe-structures-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 = { "pdbIds": [
        "1cbs",
        "4hhb",
        "6vxx",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/pdbe-structures-scraper").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 '{
  "pdbIds": [
    "1cbs",
    "4hhb",
    "6vxx"
  ]
}' |
apify call ninhothedev/pdbe-structures-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/pdbe-structures-scraper"
        }
    }
}

```

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/VfhOquie0ONh9HxAt/builds/BQBxkJlRk3Q2WPJnl/openapi.json
