REST API

OrganiZymeDB exposes a read-only JSON API, with no authentication required. All endpoints return application/json. The base URL is the root of this site (https://organizymedb.org).

Endpoint Overview

Method Endpoint Description
GET/api/proteins List / search all proteins
GET/api/protein/<id> Full record for one protein + mutations
GET/api/measurements List / filter all measurements
GET/api/measurements/<id> Single measurement record
GET/api/solvents List all solvents
GET/api/solvent/<id> Single solvent record
GET/api/compounds List / search all compounds
GET/api/compound/<id> Single compound record
GET/api/compound/by-name/<name> Compound lookup by exact name
GET/api/stats Database statistics

Proteins

/api/proteins
/api/protein/<protein_id>

Measurements

/api/measurements
/api/measurements/<measurement_id>

Solvents

/api/solvents
/api/solvent/<solvent_id>

Compounds

/api/compounds
/api/compound/<compound_id>
/api/compound/by-name/<name>

Statistics

/api/stats

Usage Examples

Python β€” export all lipase measurements in ethanol, with full protein details
import requests, csv

BASE = "https://organizymedb.org"

# 1. Find all lipase proteins
proteins = requests.get(f"{BASE}/api/proteins", params={"q": "lipase"}).json()

results = []
for prot_summary in proteins["data"]:
    pid = prot_summary["protein_id"]

    # 2. Fetch full protein-level details once per protein, not once per
    #    measurement (enzyme_name, enzyme_species, ec_numbers, source)
    protein = requests.get(f"{BASE}/api/protein/{pid}").json()["protein"]

    # 3. Fetch this protein's measurements in ethanol, paginating if needed
    page = 1
    while True:
        r = requests.get(f"{BASE}/api/measurements",
                         params={"protein_id": pid, "solvent": "ethanol",
                                 "page": page, "per_page": 200}).json()
        for m in r["data"]:
            results.append({
                # Protein-level fields
                "enzyme_name": protein["enzyme_name"],
                "enzyme_species": protein["enzyme_species"],
                "ec_number": protein["ec_number"],
                "source": protein["source"],
                # Measurement-level fields
                "measurement_id": m["measurement_id"],
                "is_extremophile": m["is_extremophile"],
                "mutation": m["mutation"],
                "property": m["property"],
                "solvent_name": m["solvent_name"],
                "solvent_volume": m["solvent_volume"],
                "aqueous_control": m["aqueous_control"],
                "wt_control": m["wt_control"],
                "measured_value": m["measured_value"],
                "units": m["units"],
                "assay_solution": m["assay_solution"],
                "ph": m["ph"],
                "temperature": m["temperature"],
                "cofactor": m["cofactor"],
                "comments": m["comments"],
            })
        if page >= r["pagination"]["total_pages"]:
            break
        page += 1

fieldnames = list(results[0].keys()) if results else []
with open("lipase_ethanol_measurements.csv", "w", newline="") as f:
    writer = csv.DictWriter(f, fieldnames=fieldnames)
    writer.writeheader()
    writer.writerows(results)

print(f"Saved {len(results)} measurements ({len(fieldnames)} columns) to lipase_ethanol_measurements.csv")
Python β€” download everything as a DataFrame
import requests, pandas as pd

BASE  = "https://organizymedb.org"
rows, page = [], 1

while True:
    r = requests.get(f"{BASE}/api/measurements",
                     params={"page": page, "per_page": 200}).json()
    rows.extend(r["data"])
    if page >= r["pagination"]["total_pages"]:
        break
    page += 1

df = pd.DataFrame(rows)
print(df.shape)
curl
# All measurements for protein 2, wild-type only
curl "https://organizymedb.org/api/measurements?protein_id=2&wt_only=1"

# Search compounds by name
curl "https://organizymedb.org/api/compounds?q=nitrophenyl"

# All solvents
curl "https://organizymedb.org/api/solvents"

# Database statistics
curl "https://organizymedb.org/api/stats"

Notes