pdb-database
Query RCSB PDB (200K+ structures) via the public REST + GraphQL APIs with plain `requests` (no SDK). Search by text, attribute, sequence, or 3D structure similarity (Search API); retrieve metadata via GraphQL (Data API); download PDB/mmCIF from files.rcsb.org. For AlphaFold predictions use alphafold-database-access; for protein sequences only use uniprot-protein-database.
npx skills add BioTender-max/awesome-bio-agent-skills --skill pdb-database --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Instructs an agent to access the RCSB PDB public endpoints to perform programmatic structural biology queries. It covers searching by text, attributes, sequence similarity, and 3D structure similarity, retrieving metadata via GraphQL, and downloading coordinate files. It also provides examples for batch requests, pagination, and combining queries with group/logical_operator structures.
How it works
- Use the Search API at https://search.rcsb.org/rcsbsearch/v2/query with POST and a JSON payload to find PDB IDs by text, attribute filters, sequence, or 3D similarity.
- Retrieve structured metadata via the Data API at https://data.rcsb.org/graphql with POST and a GraphQL query (entry, polymer_entity, assembly, chem_comp, etc.).
- Download coordinate files from https://files.rcsb.org/download/{id}.{format} using GET, returning mmCIF, PDB, or FASTA formats.
- For AlphaFold predictions, reference alphafold-database-access; for protein sequences only, use uniprot-protein-database.
- Includes code samples for text_search, attribute_search, sequence/module usage, structure similarity search, and batch retrieval.
- Demonstrates how to compose complex queries with group + logical_operator, including AND/OR combinations and date-range filtering.
- Shows batch pagination patterns with start/rows and a small delay between requests to respect rate limits.
When to use it
- When searching for structures by keyword or property, filtering by organism, method, or resolution.
- When retrieving metadata like resolution, method, organism, and deposition date for sets of structures.
- When downloading coordinate files for simulation, docking, or visualization.
- When building datasets for machine learning or drug discovery pipelines that require structured metadata and coordinate data.
- When needing sequence, polymer_entity, or organism information via GraphQL for multiple entries in one request.
What it can touch
- The REST endpoint for search: https://search.rcsb.org/rcsbsearch/v2/query
- The GraphQL endpoint for data: https://data.rcsb.org/graphql
- The Files endpoint for downloads: https://files.rcsb.org/download/{id}.{format}
- It uses the Python package
requests(and optionallybiopythonfor parsing files) as prerequisites. - No API key is required; rate limits are managed via polite delays and optional exponential backoff on HTTP 429.
Caveats
- License is BSD-3-Clause for the skill description; no explicit runtime license noted in the provided content.
- Requires internet access to public endpoints; the skill demonstrates basic usage patterns but does not guarantee specific response formats beyond examples.
- Some features reference other databases or tools (alphafold-database-access, uniprot-protein-database) rather than the primary endpoints.
- Examples rely on Python code blocks; execution assumes a Python environment with
requestsinstalled.
# PDB Database > **Why no SDK?** The `rcsb-api` Python SDK is convenient sugar over three public, no-auth REST endpoints (`search.rcsb.org`, `data.rcsb.org`, `files.rcsb.org`). When the SDK is unavailable, every operation can be reproduced with plain `requests` and a small JSON payload. This SKILL.md uses the REST path throughout so the code runs in any environment with `requests` installed. ## Overview RCSB PDB is the worldwide repository for 3D structural data of biological macromolecules with 200,000+ experimentally determined structures. Programmatic access is via three free, no-auth endpoints: | API | Base URL | Method | Purpose | |---|---|---|---| | **Search** | `https://search.rcsb.org/rcsbsearch/v2/query` | `POST` JSON | Find PDB IDs by text, attribute filters, sequence, or 3D similarity | | **Data** | `https://data.rcsb.org/graphql` | `POST` GraphQL | Retrieve structured metadata (entries, polymer entities, assemblies, ligands) | | **Files** | `https://files.rcsb.org/download/{id}.{format}` | `GET` | Download coordinate files (mmCIF, PDB, FASTA) | Use this skill for programmatic structural biology queries, drug target analysis, and protein family comparisons. ## When to Us
- Overview
- When to Use
- Prerequisites
- Quick Start
- Core API
- Module 1: Text and Attribute Search
- Module 2: Sequence Similarity Search
- Module 3: Structure Similarity Search
- Module 4: Data Retrieval (GraphQL)
- Module 5: File Download
- Module 6: Query Composition (group + logicaloperator)
- Module 7: Pagination + Batch with Rate Limiting
- Key Concepts
- Search Service Cheat Sheet
pip install requests pip install biopython
What does the pdb-database skill do?
Query RCSB PDB (200K+ structures) via the public REST + GraphQL APIs with plain `requests` (no SDK). Search by text, attribute, sequence, or 3D structure similarity (Search API); retrieve metadata via GraphQL (Data API); download PDB/mmCIF from files.rcsb.org. For AlphaFold predictions use alphafold-database-access; for protein sequences only use uniprot-protein-database.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill pdb-database --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
