# Rfam API
> The Rfam database of non-coding RNA families as an API, powered by EMBL-EBI. Rfam groups functional RNAs that share a common evolutionary origin into families, each modelled by a covariance model built from a curated seed alignment and secondary structure. Search the families by name, description or RNA type — riboswitches and other cis-regulatory elements, ribozymes, microRNA families, ribosomal RNAs, transfer RNAs, small nuclear and small nucleolar RNAs, long non-coding RNAs and CRISPR direct repeats — getting each family's Rfam accession, name, description, RNA type and curators; read a family's full record including its description, RNA-type classification, the curators who built it, the number of sequences in its full and seed alignments, the structure source, the curator comment, the clan (group of related families) it belongs to and the Rfam release; and browse the families by RNA class. Ideal for RNA biology, bioinformatics pipelines, non-coding-RNA annotation, comparative genomics and teaching. Family accessions look like RF00005 (transfer RNA). Data from EMBL-EBI Rfam. For protein families and domains see the InterPro API, for protein sequences UniProt, for proteomics datasets PRIDE and for metabolomics MetaboLights.

## 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/rfam-api/..."
```

## Pricing
- **Free** (Free) — 560 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 20,000 calls/Mo, 6 req/s
- **Pro** ($20/Mo) — 91,000 calls/Mo, 15 req/s
- **Mega** ($55/Mo) — 378,000 calls/Mo, 40 req/s

## Endpoints

### RNA

#### `GET /v1/family` — A family's full record

**Parameters:**
- `id` (query, required, string) — Rfam accession, e.g. RF00005 Example: `RF00005`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rfam-api/v1/family?id=RF00005"
```

**Response:**
```json
{
    "data": {
        "family": {
            "id": "tRNA",
            "url": "https://rfam.org/family/RF00005",
            "clan": null,
            "author": "Eddy SR, Griffiths-Jones SR, Mifsud W",
            "comment": "Transfer RNA (tRNA) molecules are approximately 80 nucleotides in length. Their secondary structure includes four short double-helical elements and three loops (D, anti-codon, and T loops). Further hydrogen bonds mediate the characteristic L-shaped molecular structure. tRNAs have two regions of fundamental functional importance: the anti-codon, which is responsible for specific mRNA codon recognition, and the 3' end, to which the tRNAs corresponding amino acid is attached (by aminoacyl-tRNA synthetases). tRNAs cope with the degeneracy of the genetic code in two manners: having more than one tRNA (with a specific anti-codon) for a particular amino acid; and 'wobble' base-pairing, i.e. permitting non-standard base-pairing at the 3rd anti-codon position.",
            "release": {
                "date": "2026-01-16",
                "number": "15.1"
            },
            "num_seed": 954,
            "rna_type": [
                "Gene",
                "tRNA"
            ],
            "accession": "RF00005",
            "description": "tRNA",
            "num_sequences": 5335975,
            "structure_source": "Published; PMID:8256282"
        }
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:10.666Z",
        "request_id": "cbff7763-
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search RNA families

**Parameters:**
- `q` (query, required, string) — Search text, e.g. riboswitch Example: `riboswitch`
- `limit` (query, optional, string) — Max results (1-100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rfam-api/v1/search?q=riboswitch"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "riboswitch",
        "total": 182618,
        "families": [
            {
                "name": "Cobalamin",
                "authors": [
                    "Barrick JE",
                    "Breaker RR",
                    "Moxon SJ",
                    "Gardner PP",
                    "Ontiveros-Palacios N"
                ],
                "rna_type": [
                    "Cis-reg",
                    "riboswitch"
                ],
                "accession": "RF00174",
                "description": "Cobalamin riboswitch aptamer"
            },
            {
                "name": "TPP",
                "authors": [
                    "Rodionov DA",
                    "Vitreshchak AG",
                    "Mironov AA",
                    "Gelfand MS",
                    "Bateman A",
                    "Moxon SJ",
                    "Ontiveros-Palacios N"
                ],
                "rna_type": [
                    "Cis-reg",
                    "riboswitch"
                ],
                "accession": "RF00059",
                "description": "TPP riboswitch aptamer (THI element)"
            },
            {
                "name": "SAM",
                "authors": [
                    "Griffiths-Jones SR",
                    "Gardner PP",
                    "Ontiveros-Palacios N"
                ],
                "rna_type": [
                    "Cis-reg",
                    "ribos
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/type` — Browse families by RNA class

**Parameters:**
- `type` (query, required, string) — RNA class, e.g. miRNA, riboswitch, tRNA Example: `miRNA`
- `limit` (query, optional, string) — Max results (1-100)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rfam-api/v1/type?type=miRNA"
```

**Response:**
```json
{
    "data": {
        "type": "miRNA",
        "count": 30,
        "total": 539339,
        "families": [
            {
                "name": "MIR7502",
                "authors": [],
                "rna_type": [
                    "Gene",
                    "miRNA"
                ],
                "accession": "RF04225",
                "description": "MIR7502 microRNA precursor family"
            },
            {
                "name": "MIR812",
                "authors": [],
                "rna_type": [
                    "Gene",
                    "miRNA"
                ],
                "accession": "RF04088",
                "description": "MIR812 microRNA precursor family"
            },
            {
                "name": "MIR1120",
                "authors": [],
                "rna_type": [
                    "Gene",
                    "miRNA"
                ],
                "accession": "RF00906",
                "description": "MIR1120/MIR1122 microRNA precursor family"
            },
            {
                "name": "mir-9256",
                "authors": [],
                "rna_type": [
                    "Gene",
                    "miRNA"
                ],
                "accession": "RF03883",
                "description": "mir-9256 microRNA precursor family"
            },
            {
                "name": "mir-9229",
                "authors": [],
                "rna_type": [
                    "Gene",
                
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Usage notes

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

**Response:**
```json
{
    "data": {
        "note": "Rfam is the curated database of non-coding RNA families — functional RNAs grouped by sequence and secondary structure, each modelled by a covariance model. /v1/search?q=riboswitch = search families by name, description or RNA type, returning each family's Rfam accession, name, description, RNA type and curators; /v1/family?id=RF00005 = a family's full record (Rfam id, description, RNA type, curators/author, number of sequences in the full and seed alignments, structure source, curator comment, the clan it belongs to and the Rfam release); /v1/type?type=riboswitch = browse families by RNA class — riboswitch, miRNA, rRNA, tRNA, snRNA, snoRNA, ribozyme, lncRNA, CRISPR, antisense, sRNA, leader, thermoregulator, IRES, frameshift_element and more. Family accessions look like RF00005 (tRNA). Data from EMBL-EBI Rfam. For protein families & domains see the InterPro API, for protein sequences UniProt, for proteomics datasets PRIDE.",
        "source": "Rfam — RNA families database, EMBL-EBI (rfam.org)",
        "endpoints": [
            "/v1/search",
            "/v1/family",
            "/v1/type",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:13.629Z",
        "request_id": "e5a6d5c9-3ac4-44ad-a052-0c2118b85ac7"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


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