# gitignore API
> Generate .gitignore files as an API — 309 ready-to-use .gitignore templates for languages, frameworks, tools and editors, straight from GitHub's official github/gitignore collection. Fetch the .gitignore for any single technology (Node, Python, Java, Rust, Unity, …), search and list all available templates by name or category (languages, editors/OS globals, community stacks), or — the headline feature — combine several templates into one ready-to-commit .gitignore in a single call (e.g. names=Node,Python,macOS). Ideal for scaffolding tools, project generators, IDEs, CLIs and developer dashboards. Open data from github/gitignore (CC0).

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

## Pricing
- **Free** (Free) — 3,300 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 47,500 calls/Mo, 8 req/s
- **Pro** ($12/Mo) — 237,000 calls/Mo, 20 req/s
- **Mega** ($33/Mo) — 1,190,000 calls/Mo, 50 req/s

## Endpoints

### gitignore

#### `GET /v1/combine` — Merge several templates into one .gitignore

**Parameters:**
- `names` (query, required, string) — Comma-separated template names Example: `Node,Python,macOS`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gitignore-api/v1/combine?names=Node%2CPython%2CmacOS"
```

**Response:**
```json
{
    "data": {
        "used": [
            "Node",
            "Python",
            "macOS"
        ],
        "missing": [],
        "gitignore": "# .gitignore generated by oanor gitignore-api\n# Source: github/gitignore (CC0)\n\n### Node ###\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Snowpack dependency directory (https://snowpack.dev/)\nweb_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional stylelint cache\n.stylelintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variable files\n.env\n.env.*\n!.env.example\n\n# parcel-bundler cache (https://parceljs.org/
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/list` — List / search templates

**Parameters:**
- `q` (query, optional, string) — Search by name Example: `python`
- `category` (query, optional, string) — root | global | community
- `limit` (query, optional, string) — Results per page (1-400, default 100) Example: `100`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gitignore-api/v1/list?q=python&limit=100&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "limit": 100,
        "total": 1,
        "offset": 0,
        "filters": {
            "q": "python",
            "category": null
        },
        "templates": [
            {
                "name": "Python",
                "slug": "python",
                "lines": 220,
                "category": "root"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T09:57:28.306Z",
        "request_id": "ff6e2c01-455b-4c87-87e3-842f567bb1ca"
    },
    "status": "ok",
    "message": "Templates listed",
    "success": true
}
```

#### `GET /v1/template` — One .gitignore template

**Parameters:**
- `name` (query, required, string) — Template name, e.g. Node, Python, Java Example: `Node`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gitignore-api/v1/template?name=Node"
```

**Response:**
```json
{
    "data": {
        "template": {
            "name": "Node",
            "slug": "node",
            "lines": 143,
            "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Snowpack dependency directory (https://snowpack.dev/)\nweb_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional stylelint cache\n.stylelintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variable files\n.env\n.env.*\n!.env.example\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n.parcel-cache\n\n# Next.js build output\n.next\nout\n\n# Nuxt.js build / generate output\n.nux
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Totals & categories

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

**Response:**
```json
{
    "data": {
        "note": "Ready-to-use .gitignore templates for languages, frameworks, tools and editors. /v1/template returns one template's content; /v1/list lists/searches them; /v1/combine merges several (e.g. names=Node,Python,macOS) into a single .gitignore. Categories: root (languages/frameworks), global (editors/OS), community (more specific stacks).",
        "total": 309,
        "source": "github/gitignore (CC0)",
        "by_category": {
            "root": 163,
            "global": 75,
            "community": 71
        }
    },
    "meta": {
        "timestamp": "2026-05-31T09:57:28.480Z",
        "request_id": "e416fffc-a39b-48ba-aca1-33bc81054e99"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


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