{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/permtracker-app/json-schema/permtracker-app-soc-lookup-schema.json",
  "title": "SocLookup",
  "description": "The SOC codes employers filed a job title under, or a code's own details.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/permtracker-app-openapi.json#/components/schemas/SocLookup",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The title or code as sent."
    },
    "code": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "soc": {
              "type": "string",
              "description": "The SOC code, e.g. 15-1252."
            },
            "title": {
              "type": "string",
              "description": "The code's title."
            },
            "known": {
              "type": "boolean",
              "description": "False when the code isn't in the SOC lists held."
            },
            "filings": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Filings under the code in DOL's files."
            },
            "jobZone": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "O*NET's Job Zone, 1 to 5."
            },
            "became": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "soc": {
                    "type": "string",
                    "description": "A 2018 SOC code."
                  },
                  "title": {
                    "type": "string",
                    "description": "That code's title."
                  }
                },
                "required": [
                  "soc",
                  "title"
                ],
                "additionalProperties": {}
              },
              "description": "For a 2010 code: the 2018 codes it became."
            },
            "description": {
              "description": "O*NET's description of the job.",
              "type": [
                "string",
                "null"
              ]
            },
            "tasks": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "O*NET's core tasks for the job."
            },
            "jobZoneName": {
              "description": "The Job Zone in words.",
              "type": [
                "string",
                "null"
              ]
            },
            "perm": {
              "description": "The job's PERM figures, under the site's floors."
            },
            "filedTitles": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "A job title as employers filed it."
                  },
                  "filings": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Filings under the code with that title."
                  },
                  "share": {
                    "type": "number",
                    "description": "That title's share of the code's filings, 0 to 1."
                  }
                },
                "required": [
                  "title",
                  "filings",
                  "share"
                ],
                "additionalProperties": {}
              },
              "description": "The titles employers filed most under the code."
            }
          },
          "required": [
            "soc",
            "title",
            "known",
            "filings",
            "jobZone",
            "became",
            "description",
            "tasks",
            "jobZoneName",
            "perm",
            "filedTitles"
          ],
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ],
      "description": "The code typed, read as one. Null when a job title was sent."
    },
    "titles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "A job title as employers filed it."
          },
          "filings": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Filings under that title."
          },
          "codes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "soc": {
                  "type": "string",
                  "description": "The SOC code, e.g. 15-2051."
                },
                "title": {
                  "type": "string",
                  "description": "The code's title."
                },
                "filings": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Filings of the job title under this code."
                },
                "share": {
                  "description": "This code's share of the title's filings, 0 to 1.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "onetLists": {
                  "type": "boolean",
                  "description": "True when O*NET lists the title under this code."
                },
                "became": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "For a 2010 code: the 2018 codes it became."
                }
              },
              "required": [
                "soc",
                "title",
                "filings",
                "share",
                "onetLists",
                "became"
              ],
              "additionalProperties": {}
            },
            "description": "The codes employers filed the title under, most used first."
          }
        },
        "required": [
          "title",
          "filings",
          "codes"
        ],
        "additionalProperties": {}
      },
      "description": "Job titles matching the words sent, with the codes each was filed under."
    },
    "codes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "soc": {
            "type": "string",
            "description": "The SOC code."
          },
          "title": {
            "type": "string",
            "description": "The code's title."
          }
        },
        "required": [
          "soc",
          "title"
        ],
        "additionalProperties": {}
      },
      "description": "Codes whose own title matches the words sent."
    }
  },
  "required": [
    "query",
    "code",
    "titles",
    "codes"
  ],
  "additionalProperties": {}
}