# Programming Languages API
> The language definitions GitHub uses to recognise code (the open-source Linguist data) as an API — a clean reference for syntax highlighting, file-type detection, repository dashboards and developer tooling. For each of 800+ languages the API returns its type (programming, markup, data or prose), its brand colour (the hex GitHub paints it), the file extensions associated with it, common aliases, the GitHub language id and the editor (ace) mode. Look a language up by name or alias (golang resolves to Go), reverse-look-up which language(s) own a file extension (.py → Python; .h → C, C++, Objective-C), list the languages of a type, search, or list them all. Distinct from languages-api (ISO 639 human languages) — this is the programming-language reference. Served from memory — always fast.

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

## Pricing
- **Free** (Free) — 25,000 calls/Mo, 3 req/s
- **Starter** ($5/Mo) — 250,000 calls/Mo, 10 req/s
- **Pro** ($13/Mo) — 1,200,000 calls/Mo, 25 req/s
- **Mega** ($31/Mo) — 5,500,000 calls/Mo, 60 req/s

## Endpoints

### Lookup

#### `GET /v1/extension` — Language(s) for a file extension

**Parameters:**
- `ext` (query, required, string) — File extension Example: `.py`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/proglang-api/v1/extension?ext=.py"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "extension": ".py",
        "languages": [
            {
                "name": "Python",
                "type": "programming",
                "color": "#3572A5",
                "group": null,
                "aliases": [
                    "py",
                    "py3",
                    "python3",
                    "rusthon"
                ],
                "ace_mode": "python",
                "extensions": [
                    ".py",
                    ".cgi",
                    ".fcgi",
                    ".gyp",
                    ".gypi",
                    ".lmi",
                    ".py3",
                    ".pyde",
                    ".pyi",
                    ".pyp",
                    ".pyt",
                    ".pyw",
                    ".rpy",
                    ".spec",
                    ".tac",
                    ".wsgi",
                    ".xpy"
                ],
                "language_id": 303,
                "interpreters": [
                    "python",
                    "python2",
                    "python3",
                    "py",
                    "pypy",
                    "pypy3",
                    "uv"
                ]
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:01.831Z",
        "request_id": "65bcd2f7-694a-451d-8f34-5ab86e8183a3"
    },
    "status": "ok",
    "message": "Extension lookup retrieved successfully",
 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/language` — Language by name or alias

**Parameters:**
- `name` (query, required, string) — Language name or alias Example: `Python`

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

**Response:**
```json
{
    "data": {
        "language": {
            "name": "Python",
            "type": "programming",
            "color": "#3572A5",
            "group": null,
            "aliases": [
                "py",
                "py3",
                "python3",
                "rusthon"
            ],
            "ace_mode": "python",
            "extensions": [
                ".py",
                ".cgi",
                ".fcgi",
                ".gyp",
                ".gypi",
                ".lmi",
                ".py3",
                ".pyde",
                ".pyi",
                ".pyp",
                ".pyt",
                ".pyw",
                ".rpy",
                ".spec",
                ".tac",
                ".wsgi",
                ".xpy"
            ],
            "language_id": 303,
            "interpreters": [
                "python",
                "python2",
                "python3",
                "py",
                "pypy",
                "pypy3",
                "uv"
            ]
        }
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:01.932Z",
        "request_id": "b5b4d929-8fdd-4827-af07-a32f9fb64b52"
    },
    "status": "ok",
    "message": "Language retrieved successfully",
    "success": true
}
```

### Type

#### `GET /v1/type` — Languages of a type

**Parameters:**
- `type` (query, required, string) — programming, markup, data or prose Example: `programming`
- `limit` (query, optional, string) — Page size (1-900) Example: `100`
- `offset` (query, optional, string) — Offset Example: `0`

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

**Response:**
```json
{
    "data": {
        "type": "programming",
        "count": 100,
        "total": 546,
        "languages": [
            {
                "name": "1C Enterprise",
                "type": "programming",
                "color": "#814CCC",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".bsl",
                    ".os"
                ],
                "language_id": 0,
                "interpreters": []
            },
            {
                "name": "4D",
                "type": "programming",
                "color": "#004289",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".4dm"
                ],
                "language_id": 577529595,
                "interpreters": []
            },
            {
                "name": "ABAP",
                "type": "programming",
                "color": "#E8274B",
                "group": null,
                "aliases": [],
                "ace_mode": "abap",
                "extensions": [
                    ".abap"
                ],
                "language_id": 1,
                "interpreters": []
            },
            {
                "name": "ABAP CDS",
                "type": "programming",
                "color": "#555e25",
                "group": null,
                "aliases": [],
             
…(truncated, see openapi.json for full schema)
```

### Search

#### `GET /v1/search` — Search languages by name or alias

**Parameters:**
- `q` (query, required, string) — Search query (min 2 chars) Example: `script`
- `limit` (query, optional, string) — Max results (1-100) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/proglang-api/v1/search?q=script&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "query": "script",
        "total": 53,
        "languages": [
            {
                "name": "AGS Script",
                "type": "programming",
                "color": "#B9D9FF",
                "group": null,
                "aliases": [
                    "ags"
                ],
                "ace_mode": "c_cpp",
                "extensions": [
                    ".asc",
                    ".ash"
                ],
                "language_id": 2,
                "interpreters": []
            },
            {
                "name": "ActionScript",
                "type": "programming",
                "color": "#882B0F",
                "group": null,
                "aliases": [
                    "actionscript 3",
                    "actionscript3",
                    "as3"
                ],
                "ace_mode": "actionscript",
                "extensions": [
                    ".as"
                ],
                "language_id": 10,
                "interpreters": []
            },
            {
                "name": "AngelScript",
                "type": "programming",
                "color": "#C7D7DC",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".as",
                    ".angelscript"
                ],
                "language_id": 389477596,
                "interpreters": []
  
…(truncated, see openapi.json for full schema)
```

### List

#### `GET /v1/list` — List all languages

**Parameters:**
- `limit` (query, optional, string) — Page size (1-900) Example: `50`
- `offset` (query, optional, string) — Offset Example: `0`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 814,
        "languages": [
            {
                "name": "1C Enterprise",
                "type": "programming",
                "color": "#814CCC",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".bsl",
                    ".os"
                ],
                "language_id": 0,
                "interpreters": []
            },
            {
                "name": "2-Dimensional Array",
                "type": "data",
                "color": "#38761D",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".2da"
                ],
                "language_id": 387204628,
                "interpreters": []
            },
            {
                "name": "4D",
                "type": "programming",
                "color": "#004289",
                "group": null,
                "aliases": [],
                "ace_mode": "text",
                "extensions": [
                    ".4dm"
                ],
                "language_id": 577529595,
                "interpreters": []
            },
            {
                "name": "ABAP",
                "type": "programming",
                "color": "#E8274B",
                "group": null,
                "aliases": [],
                "ace_mode": "abap"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata + type breakdown

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

**Response:**
```json
{
    "data": {
        "types": {
            "data": 181,
            "prose": 18,
            "markup": 69,
            "programming": 546
        },
        "service": "proglang-api",
        "endpoints": {
            "GET /v1/list": "List all languages (limit, offset).",
            "GET /v1/meta": "This document.",
            "GET /v1/type": "Languages of a type (type=, e.g. programming, markup, data, prose).",
            "GET /v1/search": "Search by name or alias (q=).",
            "GET /v1/language": "Language by name or alias (name=, e.g. Python).",
            "GET /v1/extension": "Language(s) for a file extension (ext=, e.g. .py)."
        },
        "description": "The languages GitHub recognises (open-source Linguist data): type (programming/markup/data/prose), brand colour, file extensions, aliases, GitHub language id and editor mode. Look up by name or alias, reverse-look-up a file extension, list by type, or search. No key.",
        "total_languages": 814,
        "extensions_indexed": 1465
    },
    "meta": {
        "timestamp": "2026-06-08T18:25:02.439Z",
        "request_id": "cde7637e-b9d4-47d6-b915-fc10e9662f0a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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