# Protein Interactions API
> Protein-protein interaction networks as an API — powered by STRING, the database of known and predicted protein associations that combines evidence from laboratory experiments, curated pathway databases, gene co-expression, genomic context and automated text mining into a single confidence score, across thousands of organisms. Get a protein's top interaction partners (each with the combined confidence score and the seven evidence-channel subscores), the interaction network among any set of proteins as scored edges, and functional enrichment for a gene set — the over-represented GO terms, KEGG pathways, Pfam domains and more, each with its p-value, FDR and member genes. Pass gene symbols (TP53) or STRING/Ensembl ids, for human (default) or any species by NCBI taxon id. It is a cornerstone of systems biology — ideal for network analysis, functional genomics, pathway and bioinformatics tools. A protein-interaction-network resource — distinct from biological pathways (Reactome), curated protein complexes (Complex Portal) and Gene Ontology annotations (QuickGO). Open data from STRING (CC BY 4.0).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/stringdb-api/..."
```

## Pricing
- **Free** (Free) — 2,650 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 52,500 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 252,000 calls/Mo, 20 req/s
- **Mega** ($60/Mo) — 895,000 calls/Mo, 50 req/s

## Endpoints

### Protein Interactions

#### `GET /v1/enrichment` — Functional enrichment for a gene set

**Parameters:**
- `proteins` (query, optional, string) — Comma-separated proteins (2-100) Example: `TP53,MDM2,EP300,CDKN1A`
- `species` (query, optional, string) — NCBI taxon id (default 9606) Example: `9606`
- `category` (query, optional, string) — Optional category filter (Process, KEGG, …)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stringdb-api/v1/enrichment?proteins=TP53%2CMDM2%2CEP300%2CCDKN1A&species=9606"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "terms": [
            {
                "fdr": 0.0266,
                "term": "GOCC:0005654",
                "genes": [
                    "MDM2",
                    "EP300",
                    "TP53",
                    "CDKN1A"
                ],
                "p_value": 1.15e-5,
                "category": "COMPARTMENTS",
                "description": "Nucleoplasm",
                "genes_in_set": 4,
                "genes_in_background": 1146
            },
            {
                "fdr": 8.66e-6,
                "term": "GO:0072331",
                "genes": [
                    "MDM2",
                    "EP300",
                    "TP53",
                    "CDKN1A"
                ],
                "p_value": 5.52e-10,
                "category": "Process",
                "description": "Signal transduction by p53 class mediator",
                "genes_in_set": 4,
                "genes_in_background": 93
            },
            {
                "fdr": 4.35e-5,
                "term": "GO:0006977",
                "genes": [
                    "MDM2",
                    "TP53",
                    "CDKN1A"
                ],
                "p_value": 5.55e-9,
                "category": "Process",
                "description": "DNA damage response, signal transduction by p53 class mediator resulting in cell cycle arrest",
                "genes_in_set": 3,
                "genes_in_background":
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/network` — Interactions among a set of proteins

**Parameters:**
- `proteins` (query, optional, string) — Comma-separated proteins (2-100) Example: `TP53,MDM2,EP300`
- `species` (query, optional, string) — NCBI taxon id (default 9606) Example: `9606`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stringdb-api/v1/network?proteins=TP53%2CMDM2%2CEP300&species=9606"
```

**Response:**
```json
{
    "data": {
        "edges": [
            {
                "channels": {
                    "fusion": 0,
                    "database": 0,
                    "textmining": 0.994,
                    "coexpression": 0.152,
                    "cooccurrence": 0,
                    "experimental": 0.82,
                    "neighborhood": 0
                },
                "protein_a": "MDM2",
                "protein_b": "EP300",
                "string_id_a": "9606.ENSP00000258149",
                "string_id_b": "9606.ENSP00000263253",
                "combined_score": 0.999
            },
            {
                "channels": {
                    "fusion": 0,
                    "database": 0.9,
                    "textmining": 0.999,
                    "coexpression": 0.116,
                    "cooccurrence": 0,
                    "experimental": 0.999,
                    "neighborhood": 0
                },
                "protein_a": "MDM2",
                "protein_b": "TP53",
                "string_id_a": "9606.ENSP00000258149",
                "string_id_b": "9606.ENSP00000269305",
                "combined_score": 0.999
            },
            {
                "channels": {
                    "fusion": 0,
                    "database": 0.9,
                    "textmining": 0.998,
                    "coexpression": 0.049,
                    "cooccurrence": 0,
                    "experimental": 0.999,
                    "neighborhood":
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/partners` — A protein's interaction partners

**Parameters:**
- `protein` (query, optional, string) — Gene symbol or STRING/Ensembl id Example: `TP53`
- `species` (query, optional, string) — NCBI taxon id (default 9606) Example: `9606`
- `limit` (query, optional, string) — Max partners (1-100, default 25)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stringdb-api/v1/partners?protein=TP53&species=9606"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "protein": "TP53",
        "species": "9606",
        "partners": [
            {
                "channels": {
                    "fusion": 0,
                    "database": 0.75,
                    "textmining": 0.859,
                    "coexpression": 0,
                    "cooccurrence": 0,
                    "experimental": 0.981,
                    "neighborhood": 0
                },
                "protein_a": "TP53",
                "protein_b": "SFN",
                "string_id_a": "9606.ENSP00000269305",
                "string_id_b": "9606.ENSP00000340989",
                "combined_score": 0.999
            },
            {
                "channels": {
                    "fusion": 0,
                    "database": 0.9,
                    "textmining": 0.998,
                    "coexpression": 0.049,
                    "cooccurrence": 0,
                    "experimental": 0.999,
                    "neighborhood": 0
                },
                "protein_a": "TP53",
                "protein_b": "EP300",
                "string_id_a": "9606.ENSP00000269305",
                "string_id_b": "9606.ENSP00000263253",
                "combined_score": 0.999
            },
            {
                "channels": {
                    "fusion": 0,
                    "database": 0,
                    "textmining": 0.994,
                    "coexpression": 0,
                    "cooccurrence": 0,
       
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Endpoint catalogue & notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stringdb-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "STRING is a database of known and predicted protein–protein interactions, combining evidence from experiments, curated pathway databases, co-expression, genomic context and automated text mining into confidence-scored networks across thousands of organisms. /v1/partners?protein=TP53&species=9606 = a protein's top interaction partners (species is an NCBI taxon id, default 9606 = human), each with the combined confidence score (0–1) and the seven evidence-channel subscores (neighborhood, fusion, cooccurrence, coexpression, experimental, database, textmining); /v1/network?proteins=TP53,MDM2,EP300&species=9606 = the interactions among a set of proteins (2–100) as scored edges; /v1/enrichment?proteins=TP53,MDM2,EP300,CDKN1A&species=9606 = functional enrichment of a gene set — over-represented GO terms, KEGG pathways, Pfam domains and more, each with its p-value, FDR and member genes (optionally filter by category). Protein identifiers can be gene symbols (TP53) or STRING/Ensembl ids. Data from STRING (CC BY 4.0). A protein-interaction-network resource — distinct from pathways (Reactome), curated complexes (Complex Portal) and GO annotations (QuickGO). Ideal for systems biology, network analysis, functional genomics and bioinformatics tools.",
        "source": "STRING — protein–protein interaction networks (string-db.org)",
        "channels": {
            "fusion": "gene fusion",
            "database": "curated databases",
        
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/stringdb-api
OpenAPI spec: https://www.oanor.com/api/stringdb-api/openapi.json
