# College Majors API
> Earnings and employment outcomes for 170+ US college majors, from FiveThirtyEight's analysis of the U.S. Census American Community Survey. For each major: its category (Engineering, Business, Arts…), number of graduates and share who are women, median / 25th- / 75th-percentile earnings of full-time workers, unemployment rate and college-job counts. Look a major up by name or code, list a category, rank majors by earnings or unemployment, or search. Ideal for edtech, career-guidance, student-advising and HR analytics apps.

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

## Pricing
- **Free** (Free) — 250 calls/Mo, 5 req/s
- **Starter** ($12/Mo) — 15,000 calls/Mo, 15 req/s
- **Pro** ($33/Mo) — 75,000 calls/Mo, 30 req/s
- **Business** ($79/Mo) — 400,000 calls/Mo, 50 req/s

## Endpoints

### Majors

#### `GET /v1/category` — Majors in a category

**Parameters:**
- `category` (query, required, string) — Major category Example: `Engineering`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/collegemajors-api/v1/category?category=Engineering"
```

**Response:**
```json
{
    "data": {
        "count": 29,
        "majors": [
            {
                "men": 2057,
                "code": "2419",
                "rank": 1,
                "major": "Petroleum Engineering",
                "total": 2339,
                "women": 282,
                "category": "Engineering",
                "employed": 1976,
                "share_women": 0.1206,
                "college_jobs": 1534,
                "p25_earnings": 95000,
                "p75_earnings": 125000,
                "median_earnings": 110000,
                "non_college_jobs": 364,
                "unemployment_rate": 0.0184
            },
            {
                "men": 679,
                "code": "2416",
                "rank": 2,
                "major": "Mining and Mineral Engineering",
                "total": 756,
                "women": 77,
                "category": "Engineering",
                "employed": 640,
                "share_women": 0.1019,
                "college_jobs": 350,
                "p25_earnings": 55000,
                "p75_earnings": 90000,
                "median_earnings": 75000,
                "non_college_jobs": 257,
                "unemployment_rate": 0.1172
            },
            {
                "men": 725,
                "code": "2415",
                "rank": 3,
                "major": "Metallurgical Engineering",
                "total": 856,
                "women": 131,
                "category": "Engineering",
     
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `limit` (query, optional, string) — Max 1-300 Example: `50`
- `offset` (query, optional, string) — Offset Example: `0`

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

**Response:**
```json
{
    "data": {
        "count": 50,
        "total": 173,
        "majors": [
            {
                "men": 6053,
                "code": "1100",
                "rank": 65,
                "major": "General Agriculture",
                "total": 10399,
                "women": 4346,
                "category": "Agriculture & Natural Resources",
                "employed": 8884,
                "share_women": 0.4179,
                "college_jobs": 2418,
                "p25_earnings": 30000,
                "p75_earnings": 50000,
                "median_earnings": 40000,
                "non_college_jobs": 4717,
                "unemployment_rate": 0.0196
            },
            {
                "men": 9658,
                "code": "1101",
                "rank": 64,
                "major": "Agriculture Production and Management",
                "total": 14240,
                "women": 4582,
                "category": "Agriculture & Natural Resources",
                "employed": 12323,
                "share_women": 0.3218,
                "college_jobs": 1925,
                "p25_earnings": 25000,
                "p75_earnings": 50000,
                "median_earnings": 40000,
                "non_college_jobs": 6221,
                "unemployment_rate": 0.05
            },
            {
                "men": 1749,
                "code": "1102",
                "rank": 72,
                "major": "Agricultural Economics",
                "total": 2439,
 
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/major` — Major by name or code

**Parameters:**
- `name` (query, optional, string) — Major name (preferred) Example: `Petroleum Engineering`
- `code` (query, optional, string) — Census major code

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/collegemajors-api/v1/major?name=Petroleum+Engineering"
```

**Response:**
```json
{
    "data": {
        "major": {
            "men": 2057,
            "code": "2419",
            "rank": 1,
            "major": "Petroleum Engineering",
            "total": 2339,
            "women": 282,
            "category": "Engineering",
            "employed": 1976,
            "share_women": 0.1206,
            "college_jobs": 1534,
            "p25_earnings": 95000,
            "p75_earnings": 125000,
            "median_earnings": 110000,
            "non_college_jobs": 364,
            "unemployment_rate": 0.0184
        }
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:50.214Z",
        "request_id": "0db38d61-017c-4ff1-b469-4b15993b9a31"
    },
    "status": "ok",
    "message": "Major retrieved successfully",
    "success": true
}
```

#### `GET /v1/search` — Search majors by name or category

**Parameters:**
- `q` (query, required, string) — Search term Example: `engineering`
- `limit` (query, optional, string) — Max 1-100 Example: `25`

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

**Response:**
```json
{
    "data": {
        "count": 25,
        "query": "engineering",
        "total": 29,
        "majors": [
            {
                "men": 25463,
                "code": "1401",
                "rank": 59,
                "major": "Architecture",
                "total": 46420,
                "women": 20957,
                "category": "Engineering",
                "employed": 34158,
                "share_women": 0.4515,
                "college_jobs": 16178,
                "p25_earnings": 31000,
                "p75_earnings": 50000,
                "median_earnings": 40000,
                "non_college_jobs": 13724,
                "unemployment_rate": 0.1133
            },
            {
                "men": 45683,
                "code": "2400",
                "rank": 18,
                "major": "General Engineering",
                "total": 61152,
                "women": 15469,
                "category": "Engineering",
                "employed": 44931,
                "share_women": 0.253,
                "college_jobs": 26898,
                "p25_earnings": 36000,
                "p75_earnings": 69000,
                "median_earnings": 56000,
                "non_college_jobs": 11734,
                "unemployment_rate": 0.0598
            },
            {
                "men": 12953,
                "code": "2401",
                "rank": 12,
                "major": "Aerospace Engineering",
                "total": 15058,
                "women":
…(truncated, see openapi.json for full schema)
```

### Rankings

#### `GET /v1/rank` — Rank majors by a metric

**Parameters:**
- `by` (query, optional, string) — median_earnings | unemployment_rate | total | share_women Example: `median_earnings`
- `order` (query, optional, string) — desc or asc Example: `desc`
- `limit` (query, optional, string) — Max 1-200 Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/collegemajors-api/v1/rank?by=median_earnings&order=desc&limit=10"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "order": "desc",
        "metric": "median_earnings",
        "ranking": [
            {
                "men": 2057,
                "code": "2419",
                "rank": 1,
                "major": "Petroleum Engineering",
                "total": 2339,
                "value": 110000,
                "women": 282,
                "category": "Engineering",
                "employed": 1976,
                "position": 1,
                "share_women": 0.1206,
                "college_jobs": 1534,
                "p25_earnings": 95000,
                "p75_earnings": 125000,
                "median_earnings": 110000,
                "non_college_jobs": 364,
                "unemployment_rate": 0.0184
            },
            {
                "men": 679,
                "code": "2416",
                "rank": 2,
                "major": "Mining and Mineral Engineering",
                "total": 756,
                "value": 75000,
                "women": 77,
                "category": "Engineering",
                "employed": 640,
                "position": 2,
                "share_women": 0.1019,
                "college_jobs": 350,
                "p25_earnings": 55000,
                "p75_earnings": 90000,
                "median_earnings": 75000,
                "non_college_jobs": 257,
                "unemployment_rate": 0.1172
            },
            {
                "men": 725,
                "code": "2415",
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "service": "collegemajors-api",
        "endpoints": {
            "GET /v1/list": "List all majors (limit, offset).",
            "GET /v1/meta": "This document.",
            "GET /v1/rank": "Rank majors by metric (by=median_earnings|unemployment_rate|total|share_women, order, limit).",
            "GET /v1/major": "Major by name (name=, e.g. Petroleum Engineering) or code.",
            "GET /v1/search": "Search majors by name or category (q=).",
            "GET /v1/category": "Majors in a category (category=, e.g. Engineering), best-paid first."
        },
        "categories": {
            "Arts": 8,
            "Health": 12,
            "Business": 13,
            "Education": 16,
            "Engineering": 29,
            "Social Science": 9,
            "Interdisciplinary": 1,
            "Physical Sciences": 10,
            "Law & Public Policy": 5,
            "Biology & Life Science": 14,
            "Computers & Mathematics": 11,
            "Psychology & Social Work": 9,
            "Humanities & Liberal Arts": 15,
            "Communications & Journalism": 4,
            "Agriculture & Natural Resources": 10,
            "Industrial Arts & Consumer Services": 7
        },
        "description": "Earnings and employment outcomes for US college majors (FiveThirtyEight / American Community Survey): name, category, graduates, share women, median / P25 / P75 earnings, unemployment rate and college-job counts. Look up by name or code, list a 
…(truncated, see openapi.json for full schema)
```


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