# Landscaping Material API
> Landscaping material estimating as an API — the "how much mulch, soil or gravel do I need" maths, computed locally and deterministically. The coverage endpoint works out the volume to cover an area at a depth — in cubic yards, cubic metres, cubic feet and litres — and, given a material or a custom bulk density, the weight in US tons, tonnes and kilograms, plus the number of bags for a given bag size. The area can be entered directly or as a rectangular, circular or triangular bed, and depth in inches, centimetres, feet or metres. The depth endpoint is the inverse: it works out the depth that an available volume (or a number of bags) gives over an area — handy when you already have a load of material. The material endpoint is a reference of typical bulk densities (mulch, compost, topsoil, gravel, sand) and how much area one cubic yard covers at 1 to 4 inch depths. Everything is computed locally and deterministically, so it is instant and private. Densities are typical values and bulk material varies with moisture and compaction, so order around 5–10% extra. Ideal for landscaping and garden-centre tools, hardscaping and bulk-material retailers, and DIY and yard-project planners. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is landscaping-material estimating; for paint, tiles, concrete and bricks use a construction-calculator 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/landscape-api/..."
```

## Pricing
- **Free** (Free) — 9,935 calls/Mo, 2 req/s
- **Starter** ($11/Mo) — 19,550 calls/Mo, 8 req/s
- **Pro** ($31/Mo) — 245,500 calls/Mo, 20 req/s
- **Mega** ($69/Mo) — 1,270,000 calls/Mo, 50 req/s

## Endpoints

### Landscape

#### `GET /v1/coverage` — Material volume, weight & bags

**Parameters:**
- `area` (query, optional, string) — Area (or shape+dims) Example: `100`
- `area_unit` (query, optional, string) — sqft|sqm Example: `sqft`
- `shape` (query, optional, string) — rectangle|circle|triangle
- `length` (query, optional, string) — Length
- `width` (query, optional, string) — Width
- `depth` (query, required, string) — Depth Example: `3`
- `depth_unit` (query, optional, string) — in|cm|ft|m (default in) Example: `in`
- `material` (query, optional, string) — mulch|topsoil|gravel|sand|compost Example: `gravel`
- `density_lb_ft3` (query, optional, string) — Or custom density
- `bag_cuft` (query, optional, string) — Bag size (ft³) for bag count

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/landscape-api/v1/coverage?area=100&area_unit=sqft&depth=3&depth_unit=in&material=gravel"
```

**Response:**
```json
{
    "data": {
        "note": "Volume = area × depth. Weight uses a typical bulk density; bulk material varies with moisture and compaction.",
        "input": {
            "area_ft2": 100,
            "depth_ft": 0.25
        },
        "volume": {
            "litres": 707.9,
            "cubic_feet": 25,
            "cubic_yards": 0.926,
            "cubic_metres": 0.708
        },
        "weight": {
            "kg": 1134,
            "lb": 2500,
            "tonnes": 1.134,
            "us_tons": 1.25
        },
        "material": "gravel",
        "density_lb_ft3": 100
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:56.902Z",
        "request_id": "ed0f9c7c-5e30-451f-a8a4-5ccc0caf549b"
    },
    "status": "ok",
    "message": "Material coverage",
    "success": true
}
```

#### `GET /v1/depth` — Depth from available volume

**Parameters:**
- `area` (query, optional, string) — Area (or shape+dims) Example: `100`
- `area_unit` (query, optional, string) — sqft|sqm Example: `sqft`
- `cubic_yards` (query, optional, string) — Available yd³ Example: `1`
- `cubic_metres` (query, optional, string) — Or m³
- `cubic_feet` (query, optional, string) — Or ft³
- `bags` (query, optional, string) — Or bags
- `bag_cuft` (query, optional, string) — With bag size ft³

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/landscape-api/v1/depth?area=100&area_unit=sqft&cubic_yards=1"
```

**Response:**
```json
{
    "data": {
        "note": "Depth = available volume ÷ area. Spread evenly for this depth.",
        "input": {
            "area_ft2": 100,
            "available_cubic_feet": 27
        },
        "depth_cm": 8.23,
        "depth_ft": 0.27,
        "depth_inches": 3.24
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:56.998Z",
        "request_id": "8f90e5f7-6d56-43aa-9b82-c269224df02b"
    },
    "status": "ok",
    "message": "Depth from volume",
    "success": true
}
```

#### `GET /v1/material` — Material density reference

**Parameters:**
- `material` (query, optional, string) — One material, or omit for all Example: `gravel`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/landscape-api/v1/material?material=gravel"
```

**Response:**
```json
{
    "data": {
        "note": "1 yd³ = 27 ft³. yd3_covers_sqft shows the area one cubic yard covers at each depth.",
        "material": "gravel",
        "tonnes_per_m3": 1.602,
        "density_lb_ft3": 100,
        "us_tons_per_yd3": 1.35,
        "yd3_covers_sqft": {
            "1in": 324,
            "2in": 162,
            "3in": 108,
            "4in": 81
        }
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:57.123Z",
        "request_id": "3dc7c803-6901-465d-9138-98a4b5d158ef"
    },
    "status": "ok",
    "message": "Material reference",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Densities are typical values; bulk material varies with moisture and compaction — order ~5–10% extra.",
        "service": "landscape",
        "endpoints": {
            "/v1/depth": "Inverse: the depth an available volume (or bag count) gives over an area.",
            "/v1/coverage": "Volume (yd³/m³/ft³), weight (tons/tonnes/kg) and bags to cover an area at a depth.",
            "/v1/material": "Density reference and how much area one cubic yard covers at 1–4 inch depths."
        },
        "materials": [
            "mulch",
            "compost",
            "topsoil",
            "gravel",
            "sand"
        ],
        "description": "Landscaping material maths: volume, weight and bags to cover an area at a depth, the inverse depth, and a material density reference."
    },
    "meta": {
        "timestamp": "2026-06-03T17:41:57.200Z",
        "request_id": "c78fa791-237a-4d68-88fb-f5b49f0b8394"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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