All skills
Skillintermediate

Database Lookup

You have access to 78 public databases through their REST APIs. Your job is to figure out which database(s) are relevant to the user's question, query them, and return the raw JSON results along with which databases you used.

Claude Code Knowledge Pack7/10/2026

Overview

Database Lookup

You have access to 78 public databases through their REST APIs. Your job is to figure out which database(s) are relevant to the user's question, query them, and return the raw JSON results along with which databases you used.

Core Workflow

  1. Understand the query — What is the user looking for? A compound? A gene? A pathway? A patent? Expression data? An economic indicator? This determines which database(s) to hit.

  2. Select database(s) — Use the database selection guide below. When in doubt, search multiple databases — it's better to cast a wide net than to miss relevant data.

  3. Read the reference file — Each database has a reference file in references/ with endpoint details, query formats, and example calls. Read the relevant file(s) before making API calls.

  4. Make the API call(s) — See the Making API Calls section below for which HTTP fetch tool to use on your platform.

  5. Return results — Always return:

    • The raw JSON response from each database
    • A list of databases queried with the specific endpoints used
    • If a query returned no results, say so explicitly rather than omitting it

Database Selection Guide

Match the user's intent to the right database(s). Many queries benefit from hitting multiple databases.

Physics & Astronomy

User is asking about...Primary database(s)Also consider
Near-Earth objects, asteroidsNASA (NeoWs)
Mars rover imagesNASA (Mars Rover Photos)
Exoplanets, orbital parametersNASA Exoplanet Archive
Astronomical objects by name/coordinatesSIMBADSDSS
Galaxy/star spectra, photometrySDSSSIMBAD
Physical constantsNIST
Atomic spectra, spectral linesNIST (ASD)

Earth & Environmental Sciences

User is asking about...Primary database(s)Also consider
Earthquakes, seismic eventsUSGS Earthquakes
Water data, streamflow, groundwaterUSGS Water Services
Weather (current, forecast, historical)OpenWeatherMapNOAA
Climate data, historical weather stationsNOAA (CDO)
Air quality, toxic releasesEPA (Envirofacts)

Chemistry & Drugs

User is asking about...Primary database(s)Also consider
Chemical compounds, moleculesPubChemChEMBL
Molecular properties (weight, formula, SMILES)PubChem
Drug synonyms, CAS numbersPubChem (synonyms)DrugBank
Bioactivity data, IC50, binding assaysChEMBLBindingDB, PubChem
Drug binding affinities (Ki, IC50, Kd)ChEMBL, BindingDBPubChem
Drug-target interactionsChEMBL, DrugBankBindingDB, Open Targets
Ligands for a protein target (by UniProt)BindingDBChEMBL
Target identification from compound structureBindingDB (SMILES similarity)ChEMBL
Drug labels, adverse events, recallsFDA (OpenFDA)DailyMed
Drug labels (structured product labels)DailyMedFDA (OpenFDA)
Drug pharmacology, indicationsDrugBankFDA
Chemical cross-referencingPubChem (xrefs)ChEMBL
Commercially available compounds for screeningZINCPubChem
Similarity/substructure search (purchasable)ZINCPubChem, ChEMBL
Drug-like compound libraries, building blocksZINC
FDA-approved drug structuresZINC (fda subset)PubChem, FDA
Compound purchasability, vendor catalogsZINC

Materials Science & Crystallography

User is asking about...Primary database(s)Also consider
Materials by formula or elementsMaterials ProjectCOD
Band gap, electronic structureMaterials Project
Crystal structures, CIF filesCODMaterials Project
Elastic/mechanical propertiesMaterials Project
Formation energy, thermodynamicsMaterials Project
Cell parameters, space groupsCODMaterials Project

Biology & Genomics

User is asking about...Primary database(s)Also consider
Biological pathwaysReactome, KEGG
What pathways a gene/protein is inReactome (mapping), KEGG
Enzyme kinetics, catalytic activityBRENDAKEGG
Metabolomics studies, metabolite profilesMetabolomics WorkbenchPubChem
m/z or exact mass lookupMetabolomics Workbench (moverz/exactmass)PubChem
Protein sequence, function, annotationUniProtEnsembl
Protein-protein interactionsSTRINGBioGRID
Gene information, genomic locationNCBI GeneEnsembl
Genome sequences, variants, transcriptsEnsemblNCBI Gene
Gene expression datasetsGEO (NCBI E-utilities)
Gene expression across tissuesGTExHuman Protein Atlas
Gene expression signatures (CMap/L1000)LINCS L1000GEO
Gene set enrichment vs GEORummaGEOGEO
Protein sequences (NCBI)NCBI ProteinUniProt
Taxonomic classificationNCBI Taxonomy
SNP/variant data (dbSNP)dbSNPClinVar, gnomAD
Population variant frequenciesgnomADdbSNP
Sequencing run metadataSRAENA, GEO
Nucleotide sequences (European archive)ENASRA, NCBI Gene
Genome assemblies, raw reads (European)ENASRA, Ensembl
Cross-references from sequence accessionsENA (xref)NCBI Gene, UniProt
Genome annotations, tracksUCSC Genome BrowserEnsembl
3D protein structures (experimental)PDB (RCSB)EMDB
3D protein structures (predicted)AlphaFold DBPDB
EM maps, cryo-EM structuresEMDBPDB
Protein families, domainsInterProUniProt
Chemical entities (biological)ChEBIPubChem
Protein/genetic interactionsBioGRIDSTRING
Gene function annotations (GO terms)QuickGOGene Ontology
Regulatory elements, ChIP-seq, ATAC-seqENCODE
TF binding profiles/motifsJASPARENCODE
Protein expression across tissuesHuman Protein AtlasUniProt
Single-cell atlas projectsHuman Cell Atlas
Proteomics datasetsPRIDE
Mouse gene dataMouseMineNCBI Gene
Plasmid repositoryAddgene

Organism/species matters. Most biology databases cover multiple organisms. If the user's query is about a specific organism, pass it explicitly — don't assume human. Common patterns: Ensembl uses {species} in the URL path (e.g. homo_sapiens), STRING/BioGRID/QuickGO use NCBI taxon IDs (species=9606 for human, 10090 for mouse), UniProt uses organism_id:9606 in search queries, KEGG uses organism codes (hsa, mmu). GTEx and Human Protein Atlas are human-only. Check the reference file for each database's specific parameter.

Disease & Clinical

User is asking about...Primary database(s)Also consider
Somatic mutations in cancerCOSMICOpen Targets, cBioPortal
Cancer genomics (TCGA)GDC (TCGA)COSMIC, cBioPortal
Cancer study mutations, CNA, expressioncBioPortalGDC (TCGA), COSMIC
Tumor clinical data (survival, staging)cBioPortalGDC (TCGA)
Drug-target-disease associationsOpen TargetsChEMBL
Gene-disease associationsDisGeNETOpen Targets, Monarch
Mendelian disease-gene relationshipsOMIMNCBI Gene
Variant clinical significanceClinVar (NCBI)OMIM
GWAS SNP-trait associationsGWAS Catalog
Disease-phenotype-gene linksMonarch InitiativeHPO
Phenotype ontology, HPO termsHPOMonarch
Pharmacogenomics, drug-gene interactionsClinPGx (PharmGKB)DrugBank
Clinical trials for a drug/diseaseClinicalTrials.govFDA
Disease-related expression dataGEOOpen Targets

Patents & Regulatory

User is asking about...Primary database(s)Also consider
Patents by keyword or technologyUSPTO (PatentsView)
Patents by inventor or assigneeUSPTO (PatentsView)
Patent prosecution statusUSPTO (PEDS)
Trademark lookupUSPTO (TSDR)
SEC company filings, 10-K, 10-QSEC EDGAR

Economics & Finance

User is asking about...Primary database(s)Also consider
US economic time series (GDP, CPI, rates)FREDBEA
Employment, wages, labor statisticsBLSFRED
GDP, national accountsBEAFRED, World Bank
International development indicatorsWorld BankFRED
Interest rates, money supplyFederal ReserveFRED
Euro exchange rates, ECB monetary statsECB
US debt, yield curves, fiscal dataUS TreasuryFRED
Stock prices, forex, cryptoAlpha Vantage
Statistical data across many topicsData Commons

Social Sciences & Demographics

User is asking about...Primary database(s)Also consider
US population, housing, income dataUS CensusData Commons
EU statistics (economy, trade, health)EurostatWorld Bank
Global health indicators (mortality, disease)WHO GHOWorld Bank

Cross-domain queries

User is asking about...Primary database(s)Also consider
Everything about a compoundPubChem + ChEMBL + DrugBankBindingDB, ZINC, Reactome, FDA
Everything about a geneNCBI Gene + UniProt + EnsemblReactome, STRING, COSMIC, cBioPortal, ENA
Everything about a variantdbSNP + ClinVar + gnomADGWAS Catalog, COSMIC, cBioPortal
Drug target pathwaysChEMBL + ReactomeOpen Targets, GEO
Prior art for a chemical inventionUSPTO + PubChemChEMBL
Everything about a materialMaterials Project + COD
US economic overviewFRED + BLS + BEAFederal Reserve

When the user's query spans multiple domains (e.g. "what do we know about aspirin" or "find everything about BRCA1"), query all relevant databases in parallel.

Common Identifier Formats

Different databases use different identifier systems. If a query fails, the identifier format may be wrong. Here's a quick reference:

IdentifierFormatExampleUsed by
UniProt accessionP##### or Q#####P04637 (TP53)UniProt, STRING, AlphaFold, Reactome mapping
Ensembl gene IDENSG###########ENSG00000141510Ensembl, Open Targets, GTEx
NCBI Gene IDInteger7157 (TP53)NCBI Gene, GEO, DisGeNET, HPO
HGNC IDHGNC:#####HGNC:11998Monarch
PubChem CIDInteger2244 (aspirin)PubChem
ZINC IDZINC + 15 digitsZINC000000000053 (aspirin)ZINC
ENA ProjectPRJEB + digitsPRJEB40665ENA
ENA RunERR + digitsERR1234567ENA
ENA ExperimentERX + digitsERX1234567ENA
ENA SampleERS + digitsERS1234567ENA
ChEMBL IDCHEMBL####CHEMBL25 (aspirin)ChEMBL
Reactome stable IDR-HSA-######R-HSA-109581Reactome
HP termHP:#######HP:0001250 (seizure)HPO (URL-encode colon as %3A)
MONDO diseaseMONDO:#######MONDO:0007947Monarch
GO termGO:#######GO:0008150QuickGO, Gene Ontology
dbSNP rsIDrs########rs334dbSNP, GWAS Catalog, gnomAD
GENCODE IDENSG###.## (versioned)ENSG00000139618.17GTEx (requires version suffix)

Identifier Resolution

When a database doesn't recognize an identifier, convert it using these workflows:

Genes: Symbol (e.g. "TP53") → look up in NCBI Gene (esearch by symbol) → get NCBI Gene ID → convert to Ensembl ID via Ensembl /xrefs/symbol/homo_sapiens/{symbol}, or to UniProt accession via UniProt search (gene_exact:{symbol} AND organism_id:9606).

Compounds: Name → PubChem /compound/name/{name}/cids/JSON → get CID → convert to ChEMBL ID via UniChem or ChEMBL molecule search. If name lookup fails, try SMILES, InChIKey, or CAS number.

Variants: rsID (e.g. "rs334") works directly in dbSNP, ClinVar, GWAS Catalog, gnomAD. For genomic coordinates, use Ensembl VEP to get consequence annotations and linked rsIDs.

Diseases: Name → Open Targets or Monarch search → get EFO or MONDO ID → use in downstream queries.

POST-Only APIs

These databases require HTTP POST and will not work with WebFetch (GET-only). Use curl via your platform's shell tool instead:

DatabaseWhy POST neededExample
Open TargetsGraphQL endpointcurl -X POST -H "Content-Type: application/json" -d '{"query":"..."}' https://api.platform.opentargets.org/api/v4/graphql
gnomADGraphQL endpointcurl -X POST -H "Content-Type: application/json" -d '{"query":"..."}' https://gnomad.broadinstitute.org/api
RummaGEOPOST-only enrichmentcurl -X POST -H "Content-Type: application/json" -d '{"genes":["..."]}' https://rummageo.com/api/enrich
GDC/TCGAComplex filter queriescurl -X POST -H "Content-Type: application/json" -d '{"filters":...}' https://api.gdc.cancer.gov/ssms
SEC EDGARRequires User-Agent headercurl -H "User-Agent: YourApp you@email.com" https://efts.sec.gov/LATEST/search-index?q=...

API Keys and Access Restrictions

Some databases require API keys or have access restrictions. When an API key is needed:

  1. Check the current environment first — the key may already be exported as a shell environment variable (e.g. $FRED_API_KEY). Read it directly from the environment.
  2. Fall back to .env — if the variable isn't in the environment, check the .env file in the current working directory.
  3. If neither has it — proceed without the key (most APIs still work at lower rate limits) and tell the user which key is missing and how to get one.

Databases requiring API keys (free registration)

DatabaseEnv VariableRegistration URL
FREDFRED_API_KEYhttps://fred.stlouisfed.org/docs/api/api_key.html
BEABEA_API_KEYhttps://apps.bea.gov/API/signup/
BLSBLS_API_KEYhttps://data.bls.gov/registrationEngine/
NCBI (GEO, Gene)NCBI_API_KEYhttps://www.ncbi.nlm.nih.gov/account/settings/
OpenFDAOPENFDA_API_KEYhtt