{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkedin/json-schema/linkedin-audience-insights-request-schema.json",
  "title": "AudienceInsightsRequest",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkedin-audience-insights-api-openapi.yml#/components/schemas/AudienceInsightsRequest",
  "type": "object",
  "properties": {
    "request": {
      "type": "object",
      "properties": {
        "requestMetaData": {
          "$ref": "#/$defs/RequestMetaData"
        },
        "targetingCriteria": {
          "$ref": "#/$defs/TargetingCriteria"
        },
        "groupBy": {
          "type": "string",
          "description": "Facet URN to group insights by"
        }
      },
      "required": [
        "targetingCriteria",
        "groupBy"
      ]
    }
  },
  "$defs": {
    "RequestMetaData": {
      "type": "object",
      "properties": {
        "sponsoredAccount": {
          "type": "string",
          "description": "URN of the sponsored account"
        }
      }
    },
    "TargetingCriteria": {
      "type": "object",
      "properties": {
        "include": {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "or": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}