# DNA Melting Temperature API
> DNA-oligo and PCR-primer maths as an API, computed locally and deterministically. The tm endpoint computes the melting temperature of a primer sequence three ways: the Wallace rule 2·(A+T) + 4·(G+C) for short oligos up to 13 nt, the Marmur–Wallace GC formula 64.9 + 41·(nGC − 16.4)/N for longer ones, and the salt-adjusted 81.5 + 0.41·%GC − 675/N + 16.6·log10[Na+] for a given sodium concentration, and recommends the right method for the length — an eight-base ATGCATGC melts at 24 °C by Wallace, a 20-base 50 %-GC primer at about 51.8 °C by Marmur. The gc-content endpoint reports the GC and AT percentages, the per-base counts and the single-stranded molecular weight. The reverse-complement endpoint returns the complement, the reverse and the reverse complement of a strand. Sequences use A/C/G/T (case-insensitive, whitespace ignored) and [Na+] is in mol/L. Everything is computed locally and deterministically, so it is instant and private. Ideal for molecular-biology, biotech, PCR, primer-design, bioinformatics and lab-automation app developers, oligo and primer calculators, and LIMS software. Estimation formulas for primer design, not a substitute for nearest-neighbour thermodynamics. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is oligo melting temperature; for population-genetics allele frequencies use a genetics API.

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

## Pricing
- **Free** (Free) — 3,850 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 36,500 calls/Mo, 6 req/s
- **Pro** ($19/Mo) — 174,000 calls/Mo, 15 req/s
- **Mega** ($57/Mo) — 1,045,000 calls/Mo, 40 req/s

## Endpoints

### DNA

#### `GET /v1/gc-content` — GC content & molecular weight

**Parameters:**
- `sequence` (query, required, string) — DNA sequence (A/C/G/T) Example: `ATGCATGCATGCATGCATGC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnamelt-api/v1/gc-content?sequence=ATGCATGCATGCATGCATGC"
```

**Response:**
```json
{
    "data": {
        "note": "GC content = (G+C)/length. Molecular weight is for single-stranded DNA in g/mol. Higher GC means a more stable, higher-Tm duplex.",
        "inputs": {
            "length": 20,
            "sequence": "ATGCATGCATGCATGCATGC"
        },
        "at_count": 10,
        "gc_count": 10,
        "base_counts": {
            "A": 5,
            "C": 5,
            "G": 5,
            "T": 5
        },
        "molecular_weight": 6117.04,
        "at_content_percent": 50,
        "gc_content_percent": 50
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:16.895Z",
        "request_id": "c058676e-ad2d-4fa1-bd07-2511b27ecfa8"
    },
    "status": "ok",
    "message": "GC content",
    "success": true
}
```

#### `GET /v1/reverse-complement` — Reverse complement

**Parameters:**
- `sequence` (query, required, string) — DNA sequence (A/C/G/T) Example: `ATGC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnamelt-api/v1/reverse-complement?sequence=ATGC"
```

**Response:**
```json
{
    "data": {
        "note": "Complement swaps A↔T and C↔G; the reverse complement is the antiparallel strand read 5'→3'.",
        "inputs": {
            "sequence": "ATGC"
        },
        "reverse": "CGTA",
        "complement": "TACG",
        "reverse_complement": "GCAT"
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:17.002Z",
        "request_id": "5ea9843c-50d0-456b-9e5d-8576dbbea5fd"
    },
    "status": "ok",
    "message": "Reverse complement",
    "success": true
}
```

#### `GET /v1/tm` — Primer melting temperature

**Parameters:**
- `sequence` (query, required, string) — DNA sequence (A/C/G/T) Example: `ATGCATGCATGCATGCATGC`
- `na_conc` (query, optional, string) — [Na+] in mol/L (default 0.05) Example: `0.05`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dnamelt-api/v1/tm?sequence=ATGCATGCATGCATGCATGC&na_conc=0.05"
```

**Response:**
```json
{
    "data": {
        "note": "Tm formulas: Wallace 2(A+T)+4(G+C) for ≤13 nt; Marmur–Wallace 64.9+41·(nGC−16.4)/N for longer; salt-adjusted adds 16.6·log10[Na+]. Annealing temperature is typically Tm − 5 °C.",
        "inputs": {
            "length": 20,
            "na_conc": 0.05,
            "sequence": "ATGCATGCATGCATGCATGC"
        },
        "method": "Marmur–Wallace (GC)",
        "tm_marmur": 51.78,
        "tm_wallace": 60,
        "recommended_tm": 51.78,
        "tm_salt_adjusted": 46.6529
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:17.102Z",
        "request_id": "ef375235-b620-4a49-8b97-37ba17ce11aa"
    },
    "status": "ok",
    "message": "Melting temperature",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "notes": "Sequence uses A/C/G/T (case-insensitive, whitespace ignored). na_conc is [Na+] in mol/L (default 0.05). Estimation formulas for primer design; for exact thermodynamics use nearest-neighbour software.",
        "service": "dnamelt-api",
        "endpoints": {
            "GET /v1/tm": "Melting temperature by Wallace, Marmur and salt-adjusted methods.",
            "GET /v1/meta": "This document.",
            "GET /v1/gc-content": "GC/AT content, base counts and molecular weight.",
            "GET /v1/reverse-complement": "Complement, reverse and reverse complement of a sequence."
        },
        "description": "DNA oligo / PCR primer maths: melting temperature, GC content, molecular weight and reverse complement."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:17.210Z",
        "request_id": "7a60a73f-627d-4942-ad3a-cd112d754063"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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