# INI API
> Convert between INI configuration files and JSON, in both directions. The parse endpoint reads INI text — sections ([section]), nested sections ([database.replica]), key=value pairs, comments and repeated keys (arrays) — into a clean JSON object; the stringify endpoint turns a JSON object back into a properly formatted INI file. INI is the config format used by Git (.gitconfig), PHP (php.ini), systemd units, desktop entries, tox/setup.cfg, many CLI tools and Windows software. Perfect for editing config programmatically, migrating settings between formats, and reading config in environments that only speak JSON. Pure local computation — no key, no third-party service, instant; send large files via POST. Live, nothing stored. 3 endpoints. Complements the YAML, TOML, CSV and XML converters and is distinct from each.

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

## Pricing
- **Free** (Free) — 820 calls/Mo, 2 req/s
- **Starter** ($1/Mo) — 6,700 calls/Mo, 8 req/s
- **Pro** ($20/Mo) — 128,000 calls/Mo, 20 req/s
- **Mega** ($56/Mo) — 660,000 calls/Mo, 50 req/s

## Endpoints

### INI

#### `GET /v1/parse` — Parse INI to JSON

**Parameters:**
- `ini` (query, required, string) — INI text Example: `[server]
host = localhost
port = 8080
[server.tls]
enabled = true`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ini-api/v1/parse?ini=%5Bserver%5D%0Ahost+%3D+localhost%0Aport+%3D+8080%0A%5Bserver.tls%5D%0Aenabled+%3D+true"
```

**Response:**
```json
{
    "data": {
        "json": {
            "server": {
                "tls": {
                    "enabled": true
                },
                "host": "localhost",
                "port": "8080"
            }
        }
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:44.280Z",
        "request_id": "cb1546c5-233a-4ead-9854-b9a87ba575cd"
    },
    "status": "ok",
    "message": "Parse INI to JSON",
    "success": true
}
```

#### `GET /v1/stringify` — Convert JSON to INI

**Parameters:**
- `json` (query, required, string) — JSON object Example: `{"server":{"host":"localhost","port":8080}}`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ini-api/v1/stringify?json=%7B%22server%22%3A%7B%22host%22%3A%22localhost%22%2C%22port%22%3A8080%7D%7D"
```

**Response:**
```json
{
    "data": {
        "ini": "[server]\nhost=localhost\nport=8080\n"
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:44.360Z",
        "request_id": "9c525de1-af98-408f-a97e-491befae4571"
    },
    "status": "ok",
    "message": "JSON to INI",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "name": "INI API",
        "notes": "Values are read as strings except booleans true/false; numbers come back as strings (INI has no types). Send large files via POST. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/parse",
                "params": {
                    "ini": "INI text (required)"
                },
                "returns": "the parsed object as JSON"
            },
            {
                "path": "/v1/stringify",
                "params": {
                    "json": "a JSON object (required)"
                },
                "returns": "an INI-formatted string"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Convert between INI configuration files and JSON, in both directions. Parses sections ([section]), nested sections ([a.b]), key=value pairs, comments and array values; stringifies a JSON object back into INI. Powered by the `ini` package. Pure local, no key."
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:44.457Z",
        "request_id": "61506218-6450-478f-a672-fee4fe2c9c1e"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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