{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blacksky/json-schema/blacksky-item-collection-schema.json",
  "title": "ItemCollection",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blacksky-data-management-api-openapi.yml#/components/schemas/ItemCollection",
  "required": [
    "context",
    "features",
    "links"
  ],
  "type": "object",
  "properties": {
    "links": {
      "title": "Links",
      "type": "array",
      "description": "Links related to the current endpoint. Use to navigate through objects.\n",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "type": {
      "title": "Type",
      "type": "string",
      "description": "The type of object.\n",
      "default": "FeatureCollection",
      "enum": [
        "FeatureCollection"
      ]
    },
    "features": {
      "title": "Features",
      "type": "array",
      "description": "Data items returned by search.\n",
      "items": {
        "$ref": "#/$defs/Item"
      }
    },
    "context": {
      "title": "Context",
      "description": "The context of the response.\n",
      "allOf": [
        {
          "$ref": "#/$defs/Context"
        }
      ]
    }
  },
  "$defs": {
    "Asset": {
      "title": "Asset",
      "required": [
        "href"
      ],
      "type": "object",
      "properties": {
        "href": {
          "title": "Data URL",
          "type": "string",
          "description": "The URL of a downloadable or a streamable file related to the STAC asset."
        },
        "title": {
          "title": "Data title",
          "type": [
            "string",
            "null"
          ],
          "description": "The STAC asset title."
        },
        "description": {
          "title": "Data description",
          "type": [
            "string",
            "null"
          ],
          "description": "The STAC asset description."
        },
        "type": {
          "title": "Data media type",
          "type": "string",
          "description": "The STAC asset data type."
        },
        "roles": {
          "title": "Data role",
          "type": [
            "array",
            "null"
          ],
          "description": "The purpose of the STAC asset.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Context": {
      "title": "Context",
      "type": "object",
      "properties": {
        "limit": {
          "title": "Response record limit",
          "type": "integer",
          "description": "The maximum number of data items on a results page.\n"
        },
        "returned": {
          "title": "Response returned items",
          "type": "integer",
          "description": "The number of data items returned on the results page.\n"
        },
        "matched": {
          "title": "matched",
          "type": "integer",
          "description": "The total number of data items that match the search query.\n"
        },
        "page": {
          "title": "page",
          "type": "integer",
          "description": "The current page number of the response.\n"
        },
        "pages": {
          "title": "pages",
          "type": "integer",
          "description": "The total number of pages in the response.\n"
        }
      }
    },
    "Item": {
      "title": "Item",
      "required": [
        "collection",
        "id",
        "links",
        "properties",
        "stac_extensions",
        "stac_version"
      ],
      "type": "object",
      "properties": {
        "assets": {
          "title": "Assets",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Asset"
          },
          "description": "A list of STAC assets.",
          "default": {}
        },
        "links": {
          "title": "Links",
          "type": "array",
          "description": "Links associated with the resource that can be used to navigate through objects.\n",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "stac_extensions": {
          "title": "STAC extensions",
          "type": "array",
          "description": "STAC extensions activated for the resource.\n",
          "items": {
            "type": "string"
          }
        },
        "geometry": {
          "title": "Item geometry",
          "type": [
            "object",
            "null"
          ],
          "description": "The data item's geometry.\n",
          "anyOf": [
            {
              "$ref": "#/$defs/Point"
            },
            {
              "$ref": "#/$defs/MultiPoint"
            },
            {
              "$ref": "#/$defs/LineString"
            },
            {
              "$ref": "#/$defs/MultiLineString"
            },
            {
              "$ref": "#/$defs/STACPolygon"
            },
            {
              "$ref": "#/$defs/MultiPolygon"
            },
            {
              "$ref": "#/$defs/NullableObject"
            }
          ]
        },
        "bbox": {
          "title": "Bounding box",
          "type": [
            "array",
            "null"
          ],
          "description": "The bounding box that encloses the data item's geometry.\n",
          "anyOf": [
            {
              "maxItems": 4,
              "minItems": 4,
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "maxItems": 6,
              "minItems": 6,
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "$ref": "#/$defs/NullableArray"
            }
          ]
        },
        "properties": {
          "title": "Item properties",
          "type": "object",
          "description": "A list of additional STAC item metadata."
        },
        "type": {
          "title": "Type",
          "type": "string",
          "description": "The type of object.\n",
          "default": "Feature",
          "enum": [
            "Feature"
          ]
        },
        "stac_version": {
          "title": "STAC API version",
          "type": "string",
          "description": "The STAC API version.\n"
        },
        "id": {
          "title": "Identifier",
          "type": "string",
          "description": "The data item ID.",
          "format": "uuid"
        },
        "collection": {
          "title": "Collection",
          "type": "string",
          "description": "The ID of the STAC collection the data item belongs to.\n",
          "format": "uuid"
        }
      }
    },
    "LineString": {
      "title": "LineString",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "LineString"
        },
        "coordinates": {
          "title": "Coordinates",
          "minItems": 2,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "maxItems": 2,
                "minItems": 2,
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              {
                "maxItems": 3,
                "minItems": 3,
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            ]
          }
        }
      },
      "description": "LineString Model"
    },
    "Link": {
      "type": "object",
      "properties": {
        "rel": {
          "type": "string"
        },
        "href": {
          "type": "string"
        }
      }
    },
    "MultiLineString": {
      "title": "MultiLineString",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "MultiLineString"
        },
        "coordinates": {
          "title": "Coordinates",
          "minItems": 1,
          "type": "array",
          "items": {
            "minItems": 2,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                {
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              ]
            }
          }
        }
      },
      "description": "MultiLineString Model"
    },
    "MultiPoint": {
      "title": "MultiPoint",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "MultiPoint"
        },
        "coordinates": {
          "title": "Coordinates",
          "minItems": 1,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "maxItems": 2,
                "minItems": 2,
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              {
                "maxItems": 3,
                "minItems": 3,
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            ]
          }
        }
      },
      "description": "MultiPoint Model"
    },
    "MultiPolygon": {
      "title": "MultiPolygon",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "MultiPolygon"
        },
        "coordinates": {
          "title": "Coordinates",
          "minItems": 1,
          "type": "array",
          "items": {
            "minItems": 1,
            "type": "array",
            "items": {
              "minItems": 4,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "maxItems": 2,
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  {
                    "maxItems": 3,
                    "minItems": 3,
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "description": "MultiPolygon Model"
    },
    "NullableArray": {
      "type": [
        "array",
        "null"
      ]
    },
    "NullableObject": {
      "type": [
        "object",
        "null"
      ]
    },
    "Point": {
      "title": "Point",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "Point"
        },
        "coordinates": {
          "title": "Coordinates",
          "anyOf": [
            {
              "maxItems": 2,
              "minItems": 2,
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "maxItems": 3,
              "minItems": 3,
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          ]
        }
      },
      "description": "Point Model"
    },
    "STACPolygon": {
      "title": "Polygon",
      "required": [
        "coordinates"
      ],
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "type": "string",
          "default": "Polygon"
        },
        "coordinates": {
          "title": "Coordinates",
          "minItems": 1,
          "type": "array",
          "items": {
            "minItems": 4,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "maxItems": 2,
                  "minItems": 2,
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                {
                  "maxItems": 3,
                  "minItems": 3,
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              ]
            }
          }
        }
      },
      "description": "Polygon Model"
    }
  }
}