# Rcsb Pdb Protein Structures (`bigibyte/rcsb-pdb-protein-structures`) Actor

RCSB PDB Protein Structures Scraper is a Python tool to extract structure IDs, experimental methods, and metadata from the RCSB PDB API. It exports structural biology datasets into clean CSV or JSON formats

- **URL**: https://apify.com/bigibyte/rcsb-pdb-protein-structures.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

### RCSB PDB Protein Structures — Protein Structure Entry Lookup and Search

![RCSB PDB Protein Structures cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/rcsb-pdb-protein-structures-cover.png)

RCSB PDB Protein Structures collects publicly available protein structure records from the RCSB Protein Data Bank. Retrieve entries by their PDB IDs or search for structures using keywords. Export the collected metadata as JSON, CSV, Excel, or other supported Apify dataset formats.

### Features

- **PDB ID lookup:** Retrieve structure records using one or multiple PDB IDs.
- **Full-text search:** Find protein structure entries using keywords such as `insulin`.
- **Detailed metadata:** Collect authors, crystal cell information, citations, experimental methods, and other structure details.
- **Multiple records:** Process several PDB IDs or search results in one run.
- **Duplicate prevention:** Avoid collecting the same PDB entry more than once per run.
- **Collection limit:** Control the number of records collected with `maxItems`.
- **Flexible exports:** Save results in JSON, CSV, Excel, and other supported formats.

### Collection Modes

| Mode | Description |
|---|---|
| `entry` | Retrieve protein structure entries using one or more PDB IDs. |
| `search` | Search for protein structures using a keyword and collect matching entries. |

### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `mode` | String | Select `entry` or `search`. |
| `pdbIds` | Array | PDB IDs to retrieve when using `entry` mode. |
| `query` | String | Keyword or phrase to search for when using `search` mode. |
| `maxItems` | Integer | Maximum number of records to collect. |
| `requestDelayMs` | Integer | Delay between requests in milliseconds. |

### Example Input

**Entry lookup**

```json
{
  "mode": "entry",
  "pdbIds": ["4HHB"],
  "maxItems": 10,
  "requestDelayMs": 500
}
```

**Keyword search**

```json
{
  "mode": "search",
  "query": "insulin",
  "maxItems": 5,
  "requestDelayMs": 500
}
```

### What Data Does This Actor Extract?

Each dataset record contains available information about a protein structure entry.

| Field | Description |
|---|---|
| `rcsbId` | Unique PDB entry identifier. |
| `auditAuthor` | Author and contributor information. |
| `cell` | Crystallographic unit cell dimensions and angles. |
| `citation` | Publication and citation details. |
| `database2` | Related database information, when available. |
| `diffrn` | Diffraction experiment details, when available. |
| `entry` | General entry information. |
| `exptl` | Experimental methods used to determine the structure. |
| `scrapedAt` | Date and time the record was collected. |

Additional available fields may be included in the dataset. Source field names are converted to camelCase where applicable.

### Example Output

```json
{
  "rcsbId": "4HHB",
  "auditAuthor": [
    {
      "name": "Fermi, G.",
      "pdbx_ordinal": 1
    },
    {
      "name": "Perutz, M.F.",
      "pdbx_ordinal": 2
    }
  ],
  "cell": {
    "Z_PDB": 4,
    "angle_alpha": 90.0,
    "angle_beta": 99.34,
    "angle_gamma": 90.0,
    "length_a": 63.15,
    "length_b": 83.59,
    "length_c": 53.8
  },
  "citation": [
    {
      "journal_abbrev": "J.Mol.Biol.",
      "title": "The crystal structure of human deoxyhaemoglobin at 1.74 A resolution",
      "year": 1984
    }
  ],
  "exptl": [
    {
      "method": "X-RAY DIFFRACTION"
    }
  ],
  "entry": {
    "id": "4HHB"
  },
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **Protein structure research:** Retrieve structural metadata for known PDB entries.
- **Keyword-based discovery:** Find protein structures related to insulin and other research topics.
- **Bioinformatics datasets:** Build local collections of protein structure metadata.
- **Scientific analysis:** Organize structural information for further research and analysis.
- **Research dashboards:** Use exported records in spreadsheets, databases, or business intelligence tools.

### Working with Your Dataset

After the actor finishes:

1. Open the **Dataset** tab in your Apify run.
2. Review the collected protein structure records.
3. Export the results as JSON, CSV, Excel, or another supported format.
4. Use the exported data for research, analysis, or integration into your own workflows.

### FAQ

**Who is this actor for?**

It is designed for structural biologists, bioinformatics researchers, students, and analysts who need structured protein information from the RCSB Protein Data Bank.

**Can I retrieve multiple PDB entries?**

Yes. Provide multiple identifiers in the `pdbIds` array when using `entry` mode.

**Can I search by protein name or keyword?**

Yes. Use `search` mode and provide a keyword or phrase through the `query` parameter.

**Can I schedule recurring collections?**

Yes. You can configure Apify Schedules to run the actor automatically at your preferred intervals.

**How many records can I collect?**

The actor supports up to 1,000 items per run. Use `maxItems` to control the collection size.

**Which export formats are supported?**

You can export the dataset as JSON, CSV, Excel, and other formats supported by Apify.

### Pricing and usage limits

Actor compute: The scraper itself is free to run. Usage is billed based on standard Apify compute unit (CU) consumption while running.
Custom limits: You can set maxItems to cap the total number of records processed per run, keeping your costs predictable.
Adjustable delays: Control request timing with requestDelaySecs to stay within rate limits and maintain smooth execution.

### Related tools

If you plan to map or join these rows, a geocoding pass or a quick CSV cleanup are the usual next steps. BigiByte also builds scrapers for other open-data portals when you need them as a separate job.

Need another portal, a scheduled monitor, or a custom pipeline? BigiByte builds custom scrapers and APIs: https://bigibyte.com/

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with the RCSB Protein Data Bank or its owners. It collects publicly available information. Users are responsible for following applicable data-use terms and licensing requirements.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to collect. Entry loads one or more PDB IDs. Search runs full-text search then loads matching entries.

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

PDB entry IDs for entry mode (for example 4HHB).

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

Full-text search text for search mode.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait between requests. Default 500 keeps pacing polite.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "entry",
  "pdbIds": [
    "4HHB"
  ],
  "query": "insulin",
  "maxItems": 100,
  "requestDelayMs": 500,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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": [
        "4HHB"
    ],
    "query": "insulin"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/rcsb-pdb-protein-structures").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": ["4HHB"],
    "query": "insulin",
}

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/rcsb-pdb-protein-structures").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": [
    "4HHB"
  ],
  "query": "insulin"
}' |
apify call bigibyte/rcsb-pdb-protein-structures --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/rcsb-pdb-protein-structures"
        }
    }
}
```

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/Y13fDyGpNycXEbVE5/builds/gLa7ElwJqU2jgKF1C/openapi.json
