# Fishing Tackle API
> Angling and tackle maths as an API, computed locally and deterministically — the three numbers that decide how a reel is spooled and a lure is fished. The line-capacity endpoint works out how much line of a different diameter a reel will hold: line lies on the spool by cross-sectional area, so capacity scales with the inverse square of diameter — a reel rated for 100 yards of 0.30 mm holds about 73.5 yards of thicker 0.35 mm, or nearly 140 yards of a thinner 0.011-inch braid. The sink-time endpoint gives the countdown to fish a lure at depth: time = depth ÷ sink rate, so a minnow that sinks a foot a second reaches ten feet on a count of ten. The drag endpoint sets the reel: about 25–33 % of the line's breaking strength measured at the rod tip — a 20-pound line wants roughly 5 to 6.6 pounds of drag, enough to let a fish run before anything snaps. Everything is computed locally and deterministically, so it is instant and private. Ideal for fishing and tackle apps, reel-spooling and gear-shop tools, angler trip-planners, and learning sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Unit-agnostic — keep your units consistent; rules of thumb, conditions vary.

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

## Pricing
- **Free** (Free) — 4,500 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 70,000 calls/Mo, 8 req/s
- **Pro** ($12/Mo) — 300,000 calls/Mo, 20 req/s
- **Mega** ($37/Mo) — 1,400,000 calls/Mo, 48 req/s

## Endpoints

### Fishing

#### `GET /v1/drag` — Drag setting from line strength

**Parameters:**
- `line_test` (query, required, string) — Line breaking strength (lb or kg) Example: `20`
- `percent` (query, optional, string) — Custom drag percent Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fishing-api/v1/drag?line_test=20&percent=30"
```

**Response:**
```json
{
    "data": {
        "note": "Set the drag to about 25–33 % of the line's breaking strength — measured at the reel with a scale, with line off the rod tip, not at the spool. That lets a fish run before anything snaps while still tiring it. Braid can take the higher end; a stretchy mono or a fragile knot, the lower. Back off the drag when a big fish is close to the boat.",
        "inputs": {
            "line_test": 20
        },
        "percent": 30,
        "drag_max": 6.6,
        "drag_min": 5,
        "drag_at_percent": 6
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.228Z",
        "request_id": "9d9a655a-10f1-4d07-9816-d06fd4dafd56"
    },
    "status": "ok",
    "message": "Drag setting",
    "success": true
}
```

#### `GET /v1/line-capacity` — Reel capacity at a new line diameter

**Parameters:**
- `rated_capacity` (query, required, string) — Rated capacity (yards or metres) Example: `100`
- `rated_diameter` (query, required, string) — Rated line diameter Example: `0.30`
- `new_diameter` (query, required, string) — New line diameter (same unit) Example: `0.35`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fishing-api/v1/line-capacity?rated_capacity=100&rated_diameter=0.30&new_diameter=0.35"
```

**Response:**
```json
{
    "data": {
        "note": "Line lies on the spool by cross-sectional area, so capacity scales with the inverse square of diameter: new capacity = rated × (rated diameter ÷ new diameter)². A thinner line packs more on, a thicker one less. Use the same unit for both diameters (mm or inches) and the capacity comes out in the rated unit (yards or metres).",
        "inputs": {
            "new_diameter": 0.35,
            "rated_capacity": 100,
            "rated_diameter": 0.3
        },
        "new_capacity": 73.5,
        "capacity_ratio": 0.735
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.322Z",
        "request_id": "f9ff79fd-516a-4614-9f7b-ea6612150a1d"
    },
    "status": "ok",
    "message": "Line capacity",
    "success": true
}
```

#### `GET /v1/sink-time` — Lure countdown to a depth

**Parameters:**
- `depth` (query, required, string) — Target depth Example: `30`
- `sink_rate` (query, required, string) — Sink rate (depth units per second) Example: `1.5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fishing-api/v1/sink-time?depth=30&sink_rate=1.5"
```

**Response:**
```json
{
    "data": {
        "note": "Countdown time = depth ÷ sink rate. Cast, let the lure sink while you count, then retrieve at that depth — a typical countdown minnow sinks about a foot a second, so a 'count of ten' fishes around ten feet. Sink rate drops with line drag, current and lighter line; calibrate by counting until you tick bottom at a known depth.",
        "inputs": {
            "depth": 30,
            "sink_rate": 1.5
        },
        "sink_seconds": 20
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.422Z",
        "request_id": "4b822322-0712-4064-9330-7747d34291e2"
    },
    "status": "ok",
    "message": "Sink time",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Capacity = rated × (rated dia ÷ new dia)²; countdown = depth ÷ sink rate; drag ≈ 25–33 % of line test. Unit-agnostic — keep your units consistent. Rules of thumb; conditions vary.",
        "service": "fishing-api",
        "endpoints": {
            "GET /v1/drag": "Recommended drag setting (25–33 %) for a line's breaking strength.",
            "GET /v1/meta": "This document.",
            "GET /v1/sink-time": "Countdown time for a lure to reach a depth at its sink rate.",
            "GET /v1/line-capacity": "New spool capacity when you change line diameter (inverse-square)."
        },
        "description": "Angling / tackle maths: reel line capacity when the line diameter changes, lure sink time to a depth, and the drag setting for a line's breaking strength."
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.513Z",
        "request_id": "455aed27-a6e8-409b-8591-7c96d7009457"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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