{
  "openapi": "3.1.0",
  "info": {
    "title": "US RN Labor Market API",
    "version": "1.0.0",
    "summary": "Registered nurse wages, employment and job outlook by US state and metro area.",
    "description": "Free, keyless, read-only JSON API serving official U.S. registered nurse (RN, SOC 29-1141) labor market data: BLS OEWS May 2025 wages and employment for the U.S., 50 states, DC, 3 territories and 525 metro and nonmetro areas; Projections Central 2024-2034 state projections for six nursing occupations; BLS Employment Projections 2025-2035; RN employment by industry. CORS is enabled for every origin. Data is CC BY 4.0 (dataset DOI 10.5281/zenodo.24524984); BLS source figures are in the public domain.",
    "contact": {
      "name": "Roundly",
      "email": "data@roundlyhq.com",
      "url": "https://roundlyhq.com/"
    },
    "license": {
      "name": "CC BY 4.0 (data); MIT (code)",
      "identifier": "CC-BY-4.0"
    }
  },
  "externalDocs": {
    "description": "Dataset on Zenodo",
    "url": "https://doi.org/10.5281/zenodo.24524984"
  },
  "servers": [
    {
      "url": "https://roundlyhq.com/data/api"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "States",
      "description": "RN employment, wages and 2024-34 projections for the U.S., states, DC and territories."
    },
    {
      "name": "Metros",
      "description": "RN employment and wages for 388 metropolitan and 137 nonmetropolitan areas."
    },
    {
      "name": "Projections",
      "description": "Projections Central 2024-2034 state projections for six nursing occupations."
    },
    {
      "name": "Occupations",
      "description": "National OEWS wages and BLS 2025-2035 outlook for nursing occupations."
    },
    {
      "name": "Industries",
      "description": "National RN employment and wages by NAICS industry."
    },
    {
      "name": "Analysis",
      "description": "Rankings, comparisons and wage position estimates."
    },
    {
      "name": "Meta",
      "description": "Dataset version, sources, citation and counts."
    }
  ],
  "paths": {
    "/v1/meta": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "getMeta",
        "summary": "Dataset metadata, sources, citation and counts",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/states": {
      "get": {
        "tags": [
          "States"
        ],
        "operationId": "listStates",
        "summary": "RN wages, employment and projections for every state",
        "parameters": [
          {
            "name": "include_territories",
            "in": "query",
            "required": false,
            "description": "Include Guam, Puerto Rico and the U.S. Virgin Islands.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "include_national",
            "in": "query",
            "required": false,
            "description": "Include the U.S. national row.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Metric to rank or sort by.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_median",
                "annual_mean",
                "annual_p10",
                "annual_p25",
                "annual_p75",
                "annual_p90",
                "hourly_median",
                "hourly_mean",
                "employment",
                "jobs_per_1000",
                "location_quotient",
                "rn_to_all_occupations_median_ratio",
                "projected_change_pct",
                "avg_annual_openings",
                "openings_per_100"
              ],
              "default": "annual_median"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/State"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/states/{code}": {
      "get": {
        "tags": [
          "States"
        ],
        "operationId": "getState",
        "summary": "One state (or US) by postal code, FIPS or name",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "Postal code (CA), FIPS (06), name (California) or US.",
            "schema": {
              "type": "string"
            },
            "example": "CA"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/State"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/states/{code}/metros": {
      "get": {
        "tags": [
          "Metros"
        ],
        "operationId": "listStateMetros",
        "summary": "Metro and nonmetro areas in a state (including cross-state metros)",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "State code, FIPS or name.",
            "schema": {
              "type": "string"
            },
            "example": "TX"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Area type.",
            "schema": {
              "type": "string",
              "enum": [
                "metropolitan",
                "nonmetropolitan"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Metric to rank or sort by.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_median",
                "annual_mean",
                "annual_p10",
                "annual_p25",
                "annual_p75",
                "annual_p90",
                "hourly_median",
                "hourly_mean",
                "employment",
                "jobs_per_1000",
                "location_quotient",
                "rn_to_all_occupations_median_ratio",
                "projected_change_pct",
                "avg_annual_openings",
                "openings_per_100"
              ],
              "default": "annual_median"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Metro"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/states/{code}/projections": {
      "get": {
        "tags": [
          "Projections"
        ],
        "operationId": "listStateProjections",
        "summary": "2024-2034 projections for nursing occupations in a state",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "State code, FIPS or name.",
            "schema": {
              "type": "string"
            },
            "example": "FL"
          },
          {
            "name": "occupation",
            "in": "query",
            "required": false,
            "description": "SOC code (29-1141) or alias: RN, NP, CRNA, CNM, LPN, CNA.",
            "schema": {
              "type": "string"
            },
            "example": "RN"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Projection"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/metros": {
      "get": {
        "tags": [
          "Metros"
        ],
        "operationId": "listMetros",
        "summary": "Metro and nonmetro areas, paginated",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Filter by state: postal code (CA), FIPS (06) or name.",
            "schema": {
              "type": "string"
            },
            "example": "TX"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Area type.",
            "schema": {
              "type": "string",
              "enum": [
                "metropolitan",
                "nonmetropolitan"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Case-insensitive name search.",
            "schema": {
              "type": "string"
            },
            "example": "houston"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Metric to rank or sort by.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_median",
                "annual_mean",
                "annual_p10",
                "annual_p25",
                "annual_p75",
                "annual_p90",
                "hourly_median",
                "hourly_mean",
                "employment",
                "jobs_per_1000",
                "location_quotient",
                "rn_to_all_occupations_median_ratio",
                "projected_change_pct",
                "avg_annual_openings",
                "openings_per_100"
              ],
              "default": "annual_median"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 525,
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Metro"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/metros/{code}": {
      "get": {
        "tags": [
          "Metros"
        ],
        "operationId": "getMetro",
        "summary": "One metro or nonmetro area by OEWS area code",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "OEWS area code (CBSA code for metros).",
            "schema": {
              "type": "string"
            },
            "example": "41940"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Metro"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/projections": {
      "get": {
        "tags": [
          "Projections"
        ],
        "operationId": "listProjections",
        "summary": "2024-2034 state projections (RN, NP, CRNA, CNM, LPN/LVN, CNA)",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Filter by state: postal code (CA), FIPS (06) or name.",
            "schema": {
              "type": "string"
            },
            "example": "TX"
          },
          {
            "name": "occupation",
            "in": "query",
            "required": false,
            "description": "SOC code (29-1141) or alias: RN, NP, CRNA, CNM, LPN, CNA.",
            "schema": {
              "type": "string"
            },
            "example": "RN"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Projection"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/occupations": {
      "get": {
        "tags": [
          "Occupations"
        ],
        "operationId": "listOccupations",
        "summary": "National wages and BLS 2025-2035 outlook for six nursing occupations",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Occupation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/occupations/{code}": {
      "get": {
        "tags": [
          "Occupations"
        ],
        "operationId": "getOccupation",
        "summary": "One occupation by SOC code or alias",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "description": "SOC code or alias (RN, NP, CRNA, CNM, LPN, CNA).",
            "schema": {
              "type": "string"
            },
            "example": "NP"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Occupation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/industries": {
      "get": {
        "tags": [
          "Industries"
        ],
        "operationId": "listIndustries",
        "summary": "National RN employment and wages by industry",
        "parameters": [
          {
            "name": "level",
            "in": "query",
            "required": false,
            "description": "Industry level.",
            "schema": {
              "type": "string",
              "enum": [
                "sector",
                "4-digit"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Industry"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/rankings/states": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "operationId": "rankStates",
        "summary": "Rank states by a metric",
        "parameters": [
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "description": "Metric to rank or sort by.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_median",
                "annual_mean",
                "annual_p10",
                "annual_p25",
                "annual_p75",
                "annual_p90",
                "hourly_median",
                "hourly_mean",
                "employment",
                "jobs_per_1000",
                "location_quotient",
                "rn_to_all_occupations_median_ratio",
                "projected_change_pct",
                "avg_annual_openings",
                "openings_per_100"
              ],
              "default": "annual_median"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max rows.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          },
          {
            "name": "include_territories",
            "in": "query",
            "required": false,
            "description": "Include territories.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RankedRow"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/rankings/metros": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "operationId": "rankMetros",
        "summary": "Rank metro areas by a wage or employment metric",
        "parameters": [
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "description": "Metric to rank or sort by.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_median",
                "annual_mean",
                "annual_p10",
                "annual_p25",
                "annual_p75",
                "annual_p90",
                "hourly_median",
                "hourly_mean",
                "employment",
                "jobs_per_1000",
                "location_quotient",
                "rn_to_all_occupations_median_ratio",
                "projected_change_pct",
                "avg_annual_openings",
                "openings_per_100"
              ],
              "default": "annual_median"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max rows.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 525,
              "default": 25
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Filter by state: postal code (CA), FIPS (06) or name.",
            "schema": {
              "type": "string"
            },
            "example": "TX"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Area type.",
            "schema": {
              "type": "string",
              "enum": [
                "metropolitan",
                "nonmetropolitan"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RankedRow"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/compare": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "operationId": "compareStates",
        "summary": "Compare 2-10 states side by side",
        "parameters": [
          {
            "name": "states",
            "in": "query",
            "required": true,
            "description": "Comma-separated states.",
            "schema": {
              "type": "string"
            },
            "example": "CA,TX,NY"
          },
          {
            "name": "metrics",
            "in": "query",
            "required": false,
            "description": "Comma-separated metrics.",
            "schema": {
              "type": "string"
            },
            "example": "annual_median,openings_per_100"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Compare"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/wage-position": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "operationId": "wagePosition",
        "summary": "Estimate where a salary falls in an area's RN wage distribution",
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "description": "Annual USD (e.g. 95000) or hourly USD (e.g. 45.5).",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "example": 95000
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "description": "State code, US, or OEWS metro area code.",
            "schema": {
              "type": "string",
              "default": "US"
            },
            "example": "TX"
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "description": "Force annual or hourly; defaults to hourly below 1000.",
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "hourly"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WagePosition"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WageDistribution": {
        "type": "object",
        "properties": {
          "mean": {
            "type": [
              "number",
              "null"
            ]
          },
          "p10": {
            "type": [
              "number",
              "null"
            ]
          },
          "p25": {
            "type": [
              "number",
              "null"
            ]
          },
          "median": {
            "type": [
              "number",
              "null"
            ]
          },
          "p75": {
            "type": [
              "number",
              "null"
            ]
          },
          "p90": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "mean",
          "p10",
          "p25",
          "median",
          "p75",
          "p90"
        ]
      },
      "Wages": {
        "type": "object",
        "description": "Hourly and annual wage distribution in USD (BLS OEWS May 2025).",
        "properties": {
          "hourly": {
            "$ref": "#/components/schemas/WageDistribution"
          },
          "annual": {
            "$ref": "#/components/schemas/WageDistribution"
          },
          "mean_rse_pct": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "hourly",
          "annual",
          "mean_rse_pct"
        ]
      },
      "StateProjection": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "employment_2024": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_2034": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_change": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_change_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "avg_annual_openings": {
            "type": [
              "integer",
              "null"
            ]
          },
          "annual_openings_per_100_employed": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      },
      "State": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "examples": [
              "CA"
            ]
          },
          "fips": {
            "type": "string",
            "examples": [
              "06"
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "California"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "national",
              "state",
              "territory"
            ]
          },
          "employment": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_rse_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "jobs_per_1000": {
            "type": [
              "number",
              "null"
            ]
          },
          "location_quotient": {
            "type": [
              "number",
              "null"
            ]
          },
          "wages": {
            "$ref": "#/components/schemas/Wages"
          },
          "all_occupations_median": {
            "type": "object",
            "properties": {
              "annual": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "hourly": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "rn_to_all_occupations_median_ratio": {
            "type": [
              "number",
              "null"
            ]
          },
          "projections_2024_2034": {
            "$ref": "#/components/schemas/StateProjection"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "wage_not_available",
                "employment_not_available"
              ]
            }
          }
        },
        "required": [
          "code",
          "fips",
          "name",
          "type",
          "wages",
          "flags"
        ]
      },
      "Metro": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "OEWS area code (CBSA code for metros)",
            "examples": [
              "41940"
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "San Jose-Sunnyvale-Santa Clara, CA"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "metropolitan",
              "nonmetropolitan"
            ]
          },
          "primary_state": {
            "type": "string"
          },
          "states": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "employment": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_rse_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "jobs_per_1000": {
            "type": [
              "number",
              "null"
            ]
          },
          "location_quotient": {
            "type": [
              "number",
              "null"
            ]
          },
          "wages": {
            "$ref": "#/components/schemas/Wages"
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "code",
          "name",
          "type",
          "primary_state",
          "states",
          "wages",
          "flags"
        ]
      },
      "Projection": {
        "type": "object",
        "properties": {
          "state_code": {
            "type": "string"
          },
          "state_fips": {
            "type": "string"
          },
          "state_name": {
            "type": "string"
          },
          "occupation_code": {
            "type": "string",
            "examples": [
              "29-1141"
            ]
          },
          "occupation_title": {
            "type": "string"
          },
          "base_year": {
            "type": "integer"
          },
          "projected_year": {
            "type": "integer"
          },
          "employment_base": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_projected": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_change": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_change_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "avg_annual_openings": {
            "type": [
              "integer",
              "null"
            ]
          },
          "annual_openings_per_100_employed": {
            "type": [
              "number",
              "null"
            ]
          },
          "state_lmi_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Occupation": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "oews_may2025": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "number",
                "null"
              ]
            }
          },
          "projections_2025_2035": {
            "type": "object"
          }
        }
      },
      "Industry": {
        "type": "object",
        "properties": {
          "naics": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "level": {
            "type": "string",
            "enum": [
              "sector",
              "4-digit"
            ]
          },
          "employment": {
            "type": [
              "integer",
              "null"
            ]
          },
          "employment_rse_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "wages": {
            "$ref": "#/components/schemas/Wages"
          },
          "pct_of_industry_employment": {
            "type": [
              "number",
              "null"
            ]
          },
          "pct_establishments_reporting": {
            "type": [
              "number",
              "null"
            ]
          },
          "share_of_all_rn_employment_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RankedRow": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "metric": {
            "type": "string"
          }
        }
      },
      "Compare": {
        "type": "object",
        "properties": {
          "metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "values": {
                  "type": "object",
                  "additionalProperties": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "annual_median_vs_us_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          },
          "highest": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      },
      "WagePosition": {
        "type": "object",
        "properties": {
          "area_code": {
            "type": "string"
          },
          "area_name": {
            "type": "string"
          },
          "basis": {
            "type": "string",
            "enum": [
              "annual",
              "hourly"
            ]
          },
          "amount": {
            "type": "number"
          },
          "median": {
            "type": "number"
          },
          "vs_median_pct": {
            "type": "number"
          },
          "percentile_estimate": {
            "type": [
              "number",
              "null"
            ]
          },
          "band": {
            "type": "string"
          },
          "method": {
            "type": "string"
          }
        }
      },
      "Attribution": {
        "type": "object",
        "properties": {
          "dataset": {
            "type": "string"
          },
          "dataset_version": {
            "type": "string"
          },
          "doi": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "checked_on": {
            "type": "string",
            "format": "date"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "metric": {
            "type": "string"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        },
        "required": [
          "attribution"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown state, metro area or occupation",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}