Skip to main content

PyPi Release Build Status Documentation Status DOI OpenSSF Best Practices FAIR checklist badge fair-software.eu


rcsb-api: Python Toolkit for Accessing RCSB.org APIs

Python interface for RCSB Protein Data Bank API services at RCSB.org.

Installation

This package requires Python 3.9 or later.

Install it from PyPI via pip or uv:

pip install rcsb-api

# or, if using uv:
uv pip install rcsb-api

Or, download from GitHub and install locally:

git clone https://github.com/rcsb/py-rcsb-api.git
cd py-rcsb-api
pip install .

Overview

The rcsb-api package provides a simple Pythonic interface to the suite of RCSB PDB APIs for querying and fetching data in the PDB. Specifically, each API service is provided as a separate "module" (or sub-package) within the Python client, and offers the following set of key functionalities:

  • Search API module (rcsbapi.search):

    • Perform all search types available through the RCSB.org Advanced Search builder (e.g., full-text, attribute-based, sequence and structure similarity, sequence and structure motif)
    • Use simple Boolean logic to intuitively construct complex or nested queries
    • Upload custom structure files for structure similarity searches
    • Include computed structure models (CSMs) in search results
  • Data API module (rcsbapi.data):

    • Retrieve any subset of metadata, features, and/or annotations for a given list of PDB IDs (e.g., experimental method details, structural annotations, binding sites, etc.)
    • Easily fetch data for all structures across the archive
    • Simplified GraphQL query construction using a Python syntax
  • Sequence Coordinate API module (rcsbapi.sequence):

    • Query alignments between structural and sequence databases as well as protein positional annotations/features integrated from multiple resources
    • Alignment data is available for NCBI RefSeq (including protein and genomic sequences), UniProt and PDB sequences
    • Protein positional features are integrated from UniProt, CATH, SCOPe and RCSB PDB and collected from the RCSB PDB Data Warehouse
  • Model API module (rcsbapi.model):

    • Provides access to molecular structure data (e.g., atomic coordinates) and related information (in mmCIF or BCIF formats)
    • Query for various structural data types, such as full structure, ligands, atoms, residue interactions, and more
    • Valuable for extracting out specific slices of a structure data file (not for bulk downloads, in which case see our download services)

Full package documentation is available at readthedocs.

Training Materials

  • Example usage for each module is available at readthedocs.
  • Several Jupyter notebooks with example use cases and workflows for all supported API services are provided under notebooks, which can be opened in Google Colab via the "Open in Colab" badge at the top of each notebook.
  • Watch our webinar, Streamlining Access to RCSB PDB APIs with Python, which provides an introduction to our Search and Data APIs along with hands-on tutorials.

Citing

Please cite the rcsb-api package with the following reference:

Dennis W. Piehl, Brinda Vallat, Ivana Truong, Habiba Morsy, Rusham Bhatt, Santiago Blaumann, Pratyoy Biswas, Yana Rose, Sebastian Bittrich, Jose M. Duarte, Joan Segura, Chunxiao Bi, Douglas Myers-Turnbull, Brian P. Hudson, Christine Zardecki, Stephen K. Burley. rcsb-api: Python Toolkit for Streamlining Access to RCSB Protein Data Bank APIs, Journal of Molecular Biology, 2025. DOI: 10.1016/j.jmb.2025.168970

You should also cite the RCSB.org API services this package utilizes:

Yana Rose, Jose M. Duarte, Robert Lowe, Joan Segura, Chunxiao Bi, Charmi Bhikadiya, Li Chen, Alexander S. Rose, Sebastian Bittrich, Stephen K. Burley, John D. Westbrook. RCSB Protein Data Bank: Architectural Advances Towards Integrated Searching and Efficient Access to Macromolecular Structure Data from the PDB Archive, Journal of Molecular Biology, 2020. DOI: 10.1016/j.jmb.2020.11.003

Documentation and Support

Please refer to the readthedocs page to learn more about package usage and other available features as well as to see more examples.

If you experience any issues installing or using the package, please submit an issue on GitHub and we will try to respond in a timely manner.

Metadata

Release files for rcsb-api 1.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rcsb-api 1.7.3
File Size Uploaded
rcsb_api-1.7.3.tar.gz 601.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rcsb-api 1.7.3
File Interpreter ABI Platform
rcsb_api-1.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 672.6 kB

Release files / rcsb_api-1.7.3.tar.gz

Download URL rcsb_api-1.7.3.tar.gz
Size 601.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b9b2c147c098a4c482e34a2c5998b8680d3386c3550dce57fe9d57359eb59d0b
BLAKE2b-256 checksum
How to use checksums
437c30686058d4fac954f7123e1417a991a1b60a4e36c6c3b268c759f141eb6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / rcsb_api-1.7.3-py3-none-any.whl

Download URL rcsb_api-1.7.3-py3-none-any.whl
Size 70.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
674996362c648178bfbe2c4752ae72b37edccb1348a006174716fbcf78620103
BLAKE2b-256 checksum
How to use checksums
758e76484df93fa1dab7ce9ec32231b04bcd4b488a5932b56838059f2c692ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.7.3 This release

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page