{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edgechat-ai/json-schema/edgechat-ai-geoparse-response-schema.json",
  "title": "GeoparseResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edgechat-ai-geoparse-api-openapi.yml#/components/schemas/GeoparseResponse",
  "type": "object",
  "properties": {
    "nodes": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "regions": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "places": {
      "type": "array",
      "description": "Entities the geography tree places; its non-geographic branch (geo.nongeo) is never a place.",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/Mention"
          },
          {
            "type": "object",
            "properties": {
              "geo": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "api_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        ]
      }
    },
    "periods": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "surface": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "period": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "license": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "url",
        "summary"
      ]
    }
  },
  "$defs": {
    "ArticleRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "api_url": {
          "type": "string"
        },
        "importance": {
          "type": "number"
        },
        "rank": {
          "type": "integer"
        }
      }
    },
    "Mention": {
      "allOf": [
        {
          "$ref": "#/$defs/ArticleRef"
        },
        {
          "type": "object",
          "properties": {
            "start": {
              "type": "integer",
              "description": "Offset of the first character in UTF-16 code units (JavaScript string indices), as `end`. In Python, slice text.encode(\"utf-16-le\")[2*start:2*end] and decode, or count code points yourself when the text has characters outside the Basic Multilingual Plane (emoji)."
            },
            "end": {
              "type": "integer",
              "description": "Offset just past the last character, in UTF-16 code units."
            },
            "surface": {
              "type": "string"
            },
            "confidence": {
              "type": "number"
            }
          }
        }
      ]
    }
  }
}