{
  "openapi": "3.1.0",
  "info": {
    "title": "Later Stages API",
    "version": "1.0.0",
    "x-api-version": "v1",
    "summary": "Public, read-only data on licensed senior living and care providers in California.",
    "description": "Every licensed assisted living home (RCFE), CCRC, nursing home, home care agency, home health agency and hospice in California, from California Department of Social Services licensing data (rows dated May 25, 2025) and Medicare Care Compare (processed October 1, 2026). No API key is needed. Files are static JSON, cached and refreshed when the site is rebuilt. An MCP server with the same data is at https://mcp.laterstages.com/mcp. Information only, not medical, legal or financial advice.\n\nVersioning: the API version is in the URL path (/api/v1/). Every response under /api/ carries an 'API-Version' header. Fields may be added within v1 without notice; removing or renaming a field, or changing its meaning, ships as /api/v2/. A retired version keeps working for at least 6 months after its replacement launches, and its responses then carry 'Deprecation' and 'Sunset' headers (RFC 9745, RFC 8594) plus a 'Link' to the successor. Changes are announced at https://laterstages.com/developers/#versioning. Unversioned paths (/api/california/...) are aliases of v1.",
    "contact": {
      "name": "Later Stages",
      "url": "https://laterstages.com/developers/"
    },
    "license": {
      "name": "Public records; attribution to Later Stages appreciated",
      "url": "https://laterstages.com/developers/#terms"
    }
  },
  "externalDocs": {
    "description": "Later Stages API docs",
    "url": "https://laterstages.com/developers/"
  },
  "servers": [
    {
      "url": "https://laterstages.com"
    }
  ],
  "tags": [
    {
      "name": "Search"
    },
    {
      "name": "Places"
    }
  ],
  "paths": {
    "/api/v1/search.json": {
      "get": {
        "operationId": "getSearchIndex",
        "tags": [
          "Search"
        ],
        "summary": "Search index of all cities and providers",
        "description": "Compact arrays for client-side search. c: [city, slug, county label, provider count]. p: [name, path, type, city].",
        "responses": {
          "200": {
            "description": "Search index",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "c": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          },
                          {
                            "type": "integer"
                          }
                        ]
                      }
                    },
                    "p": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "prefixItems": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/california/index.json": {
      "get": {
        "operationId": "listCities",
        "tags": [
          "Places"
        ],
        "summary": "List California cities with provider counts",
        "responses": {
          "200": {
            "description": "Cities",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "data_as_of": {
                      "$ref": "#/components/schemas/DataAsOf"
                    },
                    "cities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "city": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "county": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "providers": {
                            "type": "integer"
                          },
                          "counts": {
                            "type": "object",
                            "properties": {
                              "assisted-living": {
                                "type": "integer"
                              },
                              "ccrc": {
                                "type": "integer"
                              },
                              "nursing-homes": {
                                "type": "integer"
                              },
                              "home-care": {
                                "type": "integer"
                              },
                              "home-health": {
                                "type": "integer"
                              },
                              "hospice": {
                                "type": "integer"
                              },
                              "senior-apartments": {
                                "type": "integer"
                              }
                            }
                          },
                          "page": {
                            "type": "string",
                            "format": "uri"
                          },
                          "data": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/california/{city}.json": {
      "get": {
        "operationId": "getCityProviders",
        "tags": [
          "Places"
        ],
        "summary": "All providers in one California city",
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "City slug from listCities, e.g. huntington-beach",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            },
            "example": "huntington-beach"
          }
        ],
        "responses": {
          "200": {
            "description": "Providers in the city",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "string"
                    },
                    "county": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string"
                    },
                    "page": {
                      "type": "string",
                      "format": "uri"
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "assisted-living": {
                          "type": "integer"
                        },
                        "ccrc": {
                          "type": "integer"
                        },
                        "nursing-homes": {
                          "type": "integer"
                        },
                        "home-care": {
                          "type": "integer"
                        },
                        "home-health": {
                          "type": "integer"
                        },
                        "hospice": {
                          "type": "integer"
                        },
                        "senior-apartments": {
                          "type": "integer"
                        }
                      }
                    },
                    "data_as_of": {
                      "$ref": "#/components/schemas/DataAsOf"
                    },
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "assisted-living",
                              "nursing-homes",
                              "home-care",
                              "home-health",
                              "hospice",
                              "senior-apartments"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "example": "Assisted living"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "path": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "zip": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "beds": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "licensed_since": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": "2015"
                          },
                          "license_number": {
                            "type": "string"
                          },
                          "medicare_overall_stars": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 1,
                            "maximum": 5
                          },
                          "shortlist": {
                            "type": "object",
                            "description": "Fields the site uses to save this provider to a browser shortlist."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "ApiVersion": {
        "description": "API version that served the response.",
        "schema": {
          "type": "string",
          "example": "1"
        }
      },
      "Deprecation": {
        "description": "Present only on a deprecated version (RFC 9745).",
        "schema": {
          "type": "string"
        }
      },
      "Sunset": {
        "description": "Date after which a deprecated version stops working (RFC 8594).",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "DataAsOf": {
        "type": "object",
        "properties": {
          "state_licensing": {
            "type": "string"
          },
          "medicare": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-mcp-server": {
    "url": "https://mcp.laterstages.com/mcp",
    "transport": "streamable-http",
    "docs": "https://laterstages.com/mcp/"
  },
  "x-api-versioning": {
    "strategy": "url-path",
    "current": "v1",
    "supported": [
      "v1"
    ],
    "deprecated": [],
    "header": "API-Version",
    "minimumSunsetNoticeDays": 180,
    "deprecationHeaders": [
      "Deprecation",
      "Sunset",
      "Link; rel=successor-version"
    ],
    "policy": "https://laterstages.com/developers/#versioning"
  }
}