{
  "openapi": "3.1.0",
  "info": {
    "title": "Discover Show Finder show search",
    "version": "1.0.0",
    "description": "Read-only search over upcoming US live music shows, refreshed nightly. No key or sign-in. Each show links to its event or ticket page (venue, ticket seller or local show guide)."
  },
  "servers": [{ "url": "https://discovershowfinder.com" }],
  "paths": {
    "/api/shows": {
      "get": {
        "operationId": "searchShows",
        "summary": "Search upcoming shows by artist, city or date added",
        "description": "At least one of artist, city, added_since or added_after is required. Only shows dated today (New York time) or later are searched. Results are sorted by date.",
        "parameters": [
          {
            "name": "artist",
            "in": "query",
            "description": "A billed act, matched by full name (case, accents and '&'/'and' ignored). Repeat for up to 25 artists.",
            "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 25 },
            "style": "form",
            "explode": true
          },
          {
            "name": "city",
            "in": "query",
            "description": "A case-insensitive piece of the listing's city, such as 'Philadelphia' or 'Philadelphia, PA'. 'New York, NY' also matches Brooklyn, Queens, the Bronx and Staten Island. Repeat for up to 10 cities.",
            "schema": { "type": "array", "items": { "type": "string" }, "maxItems": 10 },
            "style": "form",
            "explode": true
          },
          {
            "name": "added_since",
            "in": "query",
            "description": "YYYY-MM-DD. Only shows first listed on or after this day.",
            "schema": { "type": "string", "format": "date" }
          },
          {
            "name": "added_after",
            "in": "query",
            "description": "YYYY-MM-DD. Only shows first listed after this day.",
            "schema": { "type": "string", "format": "date" }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum shows returned. Default 200, at most 500.",
            "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 200 }
          },
          {
            "name": "format",
            "in": "query",
            "description": "'json' (default) or 'text' for plain lines.",
            "schema": { "type": "string", "enum": ["json", "text"], "default": "json" }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching shows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "today": { "type": "string", "format": "date" },
                    "listingsRefreshedAt": { "type": ["string", "null"], "format": "date-time" },
                    "count": { "type": "integer", "description": "Total matches before the limit." },
                    "returned": { "type": "integer" },
                    "notFound": {
                      "type": "array",
                      "items": { "type": "string" },
                      "description": "Requested artists with no upcoming show anywhere."
                    },
                    "shows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": { "type": "string", "format": "date" },
                          "doors": { "type": "string" },
                          "artists": { "type": "array", "items": { "type": "string" } },
                          "venue": { "type": "string" },
                          "city": { "type": "string" },
                          "eventUrl": { "type": "string", "format": "uri", "description": "The show's event or ticket page: the venue's, a ticket seller's or a local show guide's." },
                          "added": { "type": "string", "format": "date" }
                        },
                        "required": ["date", "artists", "venue", "city", "eventUrl"]
                      }
                    }
                  }
                }
              },
              "text/plain": { "schema": { "type": "string" } }
            }
          },
          "400": { "description": "No filter given, or a value was invalid." }
        }
      }
    }
  }
}
