{
    "openapi": "3.1.0",
    "info": {
        "title": "School Choice Compass open data",
        "version": "1.0.0",
        "summary": "Private school choice programs by U.S. state, participating schools and the federal scholarship tax credit.",
        "description": "Read-only JSON files, rebuilt with every data update of https://schoolchoicecompass.com/. They are plain files: no key, no query parameters; cache them. Each count equals the count on the matching page. The compilation is licensed CC BY 4.0; facts are not subject to copyright and each record links its source.",
        "termsOfService": "https://schoolchoicecompass.com/terms/",
        "license": {
            "name": "CC BY 4.0",
            "url": "https://creativecommons.org/licenses/by/4.0/"
        }
    },
    "externalDocs": {
        "description": "About these files",
        "url": "https://schoolchoicecompass.com/open-data/"
    },
    "servers": [
        {
            "url": "https://schoolchoicecompass.com/data/v1"
        }
    ],
    "security": [],
    "paths": {
        "/dataset.json": {
            "get": {
                "operationId": "getDataset",
                "summary": "Totals and the list of files",
                "responses": {
                    "200": {
                        "description": "Totals and the list of files",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Dataset"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such file."
                    }
                }
            }
        },
        "/jurisdictions.json": {
            "get": {
                "operationId": "listJurisdictions",
                "summary": "Every jurisdiction with counts and file links",
                "responses": {
                    "200": {
                        "description": "Every jurisdiction with counts and file links",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JurisdictionList"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such file."
                    }
                }
            }
        },
        "/jurisdictions/{code}.json": {
            "get": {
                "operationId": "getJurisdiction",
                "summary": "Programs and lists of one jurisdiction",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/code"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Programs and lists of one jurisdiction",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Jurisdiction"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such file."
                    }
                }
            }
        },
        "/jurisdictions/{listCode}/schools.json": {
            "get": {
                "operationId": "listSchools",
                "summary": "Participating schools with an indexed profile",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/listCode"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Participating schools with an indexed profile",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SchoolList"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such file."
                    }
                }
            }
        },
        "/federal-credit.json": {
            "get": {
                "operationId": "getFederalCredit",
                "summary": "Federal scholarship tax credit and its participating jurisdictions",
                "responses": {
                    "200": {
                        "description": "Federal scholarship tax credit and its participating jurisdictions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FederalCredit"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such file."
                    }
                }
            }
        }
    },
    "components": {
        "parameters": {
            "code": {
                "name": "code",
                "in": "path",
                "required": true,
                "description": "Lowercase postal code of the jurisdiction.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "al",
                        "ak",
                        "az",
                        "ar",
                        "dc",
                        "fl",
                        "ga",
                        "id",
                        "in",
                        "ia",
                        "ks",
                        "la",
                        "me",
                        "md",
                        "mn",
                        "ms",
                        "mo",
                        "mt",
                        "nv",
                        "nh",
                        "nc",
                        "oh",
                        "ok",
                        "pa",
                        "pr",
                        "ri",
                        "sc",
                        "sd",
                        "tn",
                        "tx",
                        "ut",
                        "vt",
                        "va",
                        "wv",
                        "wi",
                        "wy"
                    ]
                }
            },
            "listCode": {
                "name": "listCode",
                "in": "path",
                "required": true,
                "description": "Lowercase postal code of a jurisdiction whose official school list is shown.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "al",
                        "ar",
                        "dc",
                        "fl",
                        "ga",
                        "in",
                        "ia",
                        "ks",
                        "me",
                        "md",
                        "nv",
                        "nc",
                        "ok",
                        "pa",
                        "sc",
                        "tn",
                        "tx",
                        "ut",
                        "vt",
                        "wv",
                        "wy"
                    ]
                }
            }
        },
        "schemas": {
            "About": {
                "type": "object",
                "required": [
                    "dataset",
                    "format_version",
                    "file",
                    "updated",
                    "use"
                ],
                "properties": {
                    "dataset": {
                        "type": "string"
                    },
                    "format_version": {
                        "type": "string"
                    },
                    "file": {
                        "type": "string",
                        "format": "uri"
                    },
                    "html": {
                        "type": "string",
                        "format": "uri"
                    },
                    "updated": {
                        "type": "string",
                        "format": "date"
                    },
                    "documentation": {
                        "type": "string",
                        "format": "uri"
                    },
                    "use": {
                        "type": "object",
                        "required": [
                            "attribution",
                            "licence"
                        ],
                        "properties": {
                            "attribution": {
                                "type": "string"
                            },
                            "licence": {
                                "type": "object",
                                "properties": {
                                    "compilation": {
                                        "type": "string"
                                    },
                                    "compilation_url": {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    "facts": {
                                        "type": "string"
                                    }
                                }
                            },
                            "terms": {
                                "type": "string",
                                "format": "uri"
                            },
                            "sources": {
                                "type": "string",
                                "format": "uri"
                            },
                            "not_advice": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Fact": {
                "type": "object",
                "required": [
                    "text",
                    "sources",
                    "checked"
                ],
                "properties": {
                    "text": {
                        "type": "string"
                    },
                    "sources": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "uri"
                        }
                    },
                    "checked": {
                        "type": "string",
                        "format": "date"
                    }
                }
            },
            "ListSource": {
                "type": "object",
                "properties": {
                    "publisher": {
                        "type": "string"
                    },
                    "school_year": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "retrieved": {
                        "oneOf": [
                            {
                                "type": "string",
                                "format": "date"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "original": {
                        "oneOf": [
                            {
                                "type": "string",
                                "format": "uri"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "archive_copy": {
                        "type": "boolean"
                    }
                }
            },
            "Counts": {
                "type": "object",
                "required": [
                    "programs",
                    "programs_with_page",
                    "school_profiles_indexed"
                ],
                "properties": {
                    "programs": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "programs_with_page": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "schools_on_list": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "school_profiles_indexed": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "scholarship_organizations": {
                        "type": "integer",
                        "minimum": 0
                    }
                }
            },
            "Dataset": {
                "type": "object",
                "required": [
                    "about",
                    "totals",
                    "files"
                ],
                "properties": {
                    "about": {
                        "$ref": "#/components/schemas/About"
                    },
                    "description": {
                        "type": "string"
                    },
                    "totals": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer",
                            "minimum": 0
                        }
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "path": {
                                    "type": "string"
                                },
                                "holds": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "openapi": {
                        "type": "string",
                        "format": "uri"
                    },
                    "api_catalog": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "JurisdictionList": {
                "type": "object",
                "required": [
                    "about",
                    "jurisdictions"
                ],
                "properties": {
                    "about": {
                        "$ref": "#/components/schemas/About"
                    },
                    "kinds": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "jurisdictions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "code",
                                "name",
                                "file",
                                "counts"
                            ],
                            "properties": {
                                "code": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "page": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "page_indexed": {
                                    "type": "boolean"
                                },
                                "file": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "schools_file": {
                                    "oneOf": [
                                        {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "kinds": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "federal_credit_participant": {
                                    "type": "boolean"
                                },
                                "counts": {
                                    "$ref": "#/components/schemas/Counts"
                                }
                            }
                        }
                    }
                }
            },
            "Program": {
                "type": "object",
                "required": [
                    "name",
                    "type",
                    "confirmed",
                    "checked"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "short_name": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "type": {
                        "type": "string"
                    },
                    "type_label": {
                        "type": "string"
                    },
                    "kind": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "run_by_government": {
                        "type": "boolean"
                    },
                    "confirmed": {
                        "type": "boolean",
                        "description": "Amount and eligibility confirmed on an official page; only then the program has its own page."
                    },
                    "page": {
                        "oneOf": [
                            {
                                "type": "string",
                                "format": "uri"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "amount": {
                        "oneOf": [
                            {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/Fact"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "school_years_named": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "eligibility": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Fact"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "application_window": {
                        "oneOf": [
                            {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/Fact"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "school_year": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "official_site": {
                        "oneOf": [
                            {
                                "type": "string",
                                "format": "uri"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "schools_on_list": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "checked": {
                        "type": "string",
                        "format": "date"
                    }
                }
            },
            "Jurisdiction": {
                "type": "object",
                "required": [
                    "about",
                    "code",
                    "name",
                    "counts",
                    "programs",
                    "federal_credit"
                ],
                "properties": {
                    "about": {
                        "$ref": "#/components/schemas/About"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "page": {
                        "type": "string",
                        "format": "uri"
                    },
                    "page_indexed": {
                        "type": "boolean"
                    },
                    "checked": {
                        "type": "string",
                        "format": "date"
                    },
                    "counts": {
                        "$ref": "#/components/schemas/Counts"
                    },
                    "programs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Program"
                        }
                    },
                    "school_list": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "shown": {
                                        "type": "boolean"
                                    },
                                    "reuse": {
                                        "type": "string"
                                    },
                                    "schools_on_list": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "source": {
                                        "oneOf": [
                                            {
                                                "$ref": "#/components/schemas/ListSource"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "page": {
                                        "oneOf": [
                                            {
                                                "type": "string",
                                                "format": "uri"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "school_profiles_indexed": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "file": {
                                        "oneOf": [
                                            {
                                                "type": "string",
                                                "format": "uri"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "scholarship_organizations": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "source": {
                                        "oneOf": [
                                            {
                                                "$ref": "#/components/schemas/ListSource"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "page": {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    "organizations": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "city": {
                                                    "type": "string"
                                                },
                                                "state": {
                                                    "type": "string"
                                                },
                                                "phone": {
                                                    "oneOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "website": {
                                                    "oneOf": [
                                                        {
                                                            "type": "string",
                                                            "format": "uri"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "tuition": {
                        "oneOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "schools_with_yearly_price": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "lowest_usd": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "highest_usd": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "median_usd": {
                                        "oneOf": [
                                            {
                                                "type": "integer",
                                                "minimum": 0
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "median_from": {
                                        "type": "integer",
                                        "minimum": 0
                                    },
                                    "checked": {
                                        "type": "string",
                                        "format": "date"
                                    },
                                    "page": {
                                        "oneOf": [
                                            {
                                                "type": "string",
                                                "format": "uri"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "basis": {
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "federal_credit": {
                        "type": "object",
                        "properties": {
                            "participant": {
                                "type": "boolean"
                            },
                            "as_of": {
                                "type": "string"
                            },
                            "irs_list": {
                                "type": "string",
                                "format": "uri"
                            },
                            "page": {
                                "oneOf": [
                                    {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        }
                    }
                }
            },
            "School": {
                "type": "object",
                "required": [
                    "name",
                    "city",
                    "profile",
                    "tuition"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "zip": {
                        "type": "string"
                    },
                    "grades": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "programs": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "profile": {
                        "type": "string",
                        "format": "uri"
                    },
                    "tuition": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "item",
                                "value",
                                "source",
                                "checked"
                            ],
                            "properties": {
                                "item": {
                                    "type": "string"
                                },
                                "grade_band": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "value": {
                                    "type": "string"
                                },
                                "school_year": {
                                    "oneOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "source": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "checked": {
                                    "type": "string",
                                    "format": "date"
                                }
                            }
                        }
                    }
                }
            },
            "SchoolList": {
                "type": "object",
                "required": [
                    "about",
                    "code",
                    "count",
                    "schools"
                ],
                "properties": {
                    "about": {
                        "$ref": "#/components/schemas/About"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "schools_on_list": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "count": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "scope": {
                        "type": "string"
                    },
                    "source": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ListSource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "note": {
                        "type": "string"
                    },
                    "schools": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/School"
                        }
                    }
                }
            },
            "FederalCredit": {
                "type": "object",
                "required": [
                    "about",
                    "rules",
                    "participating"
                ],
                "properties": {
                    "about": {
                        "$ref": "#/components/schemas/About"
                    },
                    "law": {
                        "type": "string"
                    },
                    "checked": {
                        "type": "string",
                        "format": "date"
                    },
                    "rules": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "text",
                                "source"
                            ],
                            "properties": {
                                "text": {
                                    "type": "string"
                                },
                                "source": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "checked": {
                                    "type": "string",
                                    "format": "date"
                                }
                            }
                        }
                    },
                    "participating": {
                        "type": "object",
                        "required": [
                            "as_of",
                            "source",
                            "count",
                            "jurisdictions"
                        ],
                        "properties": {
                            "as_of": {
                                "type": "string"
                            },
                            "source": {
                                "type": "string",
                                "format": "uri"
                            },
                            "source_updated": {
                                "type": "string"
                            },
                            "count": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "jurisdictions": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "page": {
                                            "oneOf": [
                                                {
                                                    "type": "string",
                                                    "format": "uri"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "state_programs_file": {
                                            "oneOf": [
                                                {
                                                    "type": "string",
                                                    "format": "uri"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "checked": {
                                            "type": "string",
                                            "format": "date"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "timeline": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "date": {
                                    "type": "string"
                                },
                                "text": {
                                    "type": "string"
                                },
                                "source": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
