{
  "openapi": "3.1.0",
  "info": {
    "title": "Dance Calendar — San Diego salsa & bachata data",
    "version": "1.0.0",
    "description": "Salsa, salsa On2 (mambo) and bachata classes and social dances in San Diego, rebuilt every morning from studio and venue schedules. Static JSON, regenerated daily; no key needed. For conversational access use the MCP server at https://dancecalendar.now/api/mcp."
  },
  "servers": [
    {
      "url": "https://dancecalendar.now"
    }
  ],
  "paths": {
    "/data/schedule.json": {
      "get": {
        "summary": "Every class and social in the next 14 days",
        "description": "One entry per occurrence with ISO 8601 starts_at/ends_at including the UTC offset. Best source for 'what's on tonight / this weekend'.",
        "operationId": "getSchedule",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/occurrencesFeed"
                }
              }
            }
          }
        }
      }
    },
    "/data/classes.json": {
      "get": {
        "summary": "The weekly timetable",
        "description": "One entry per recurring weekly class/social or dated one-off event.",
        "operationId": "getClasses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/classesFeed"
                }
              }
            }
          }
        }
      }
    },
    "/data/venues.json": {
      "get": {
        "summary": "Studios and venues",
        "description": "Addresses, websites, styles, and links to each venue's page and calendar feed.",
        "operationId": "getVenues",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/venuesFeed"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Venue": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "area": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          },
          "instagram": {
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "type": "string"
          }
        }
      },
      "Class": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "class",
              "cycle",
              "team",
              "social"
            ]
          },
          "kind_label": {
            "type": "string"
          },
          "drop_in": {
            "type": "boolean",
            "description": "true when anyone can just show up (drop-in classes, socials)"
          },
          "note": {
            "type": "string"
          },
          "styles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "focus": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructor": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "schedule": {
            "type": "object",
            "description": "{repeats:'weekly',weekday} or {repeats:'once',date}"
          },
          "start_time": {
            "type": "string",
            "description": "HH:MM local (America/Los_Angeles)"
          },
          "end_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "ends_late": {
            "type": "boolean"
          },
          "venue": {
            "$ref": "#/components/schemas/Venue"
          },
          "booking_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "Occurrence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Class"
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "type": "string"
              },
              "weekday": {
                "type": "string"
              },
              "starts_at": {
                "type": "string"
              },
              "ends_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "occurrencesFeed": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "site": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "generated_at": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "occurrences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Occurrence"
            }
          }
        }
      },
      "classesFeed": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "site": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "generated_at": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Class"
            }
          }
        }
      },
      "venuesFeed": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "site": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "generated_at": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "venues": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "area": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instagram": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "page": {
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string"
                    },
                    "calendar": {
                      "type": "string"
                    },
                    "has_classes": {
                      "type": "boolean"
                    },
                    "has_socials": {
                      "type": "boolean"
                    },
                    "styles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  }
}
