{
  "openapi": "3.1.0",
  "info": {
    "title": "LaughRank public data",
    "version": "1.0.0",
    "summary": "City-by-city rankings of the top 100 local stand-up comedians, with venues and calendars.",
    "description": "LaughRank is an independent directory of local stand-up comedians and does not represent or book any performer. The data is free to read and may be quoted with attribution to LaughRank and the last-updated date. Every address here is read-only and needs no key or sign-in; there are no write operations."
  },
  "servers": [
    {
      "url": "https://laughrank.com"
    }
  ],
  "externalDocs": {
    "description": "Plain-text guide for AI agents",
    "url": "https://laughrank.com/llms.txt"
  },
  "tags": [
    {
      "name": "Public data",
      "description": "Read-only. No authentication."
    }
  ],
  "paths": {
    "/api/v1/cities.json": {
      "get": {
        "operationId": "listCities",
        "summary": "Every public city, with links to its data",
        "tags": [
          "Public data"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The public cities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CityIndex"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/search.json": {
      "get": {
        "operationId": "searchComedians",
        "summary": "Find a comedian by name across every city",
        "tags": [
          "Public data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "All or part of the name.",
            "example": "josh blue",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "Only look in this city.",
            "schema": {
              "type": "string",
              "enum": [
                "austin",
                "chicago",
                "denver",
                "philadelphia",
                "atlanta",
                "minneapolis",
                "seattle",
                "portland",
                "nashville",
                "washington-dc",
                "dallas",
                "salt-lake-city"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches, exact names first, then by rank.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            }
          },
          "400": {
            "description": "No name given.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cities/{city}/rankings.json": {
      "get": {
        "operationId": "getCityRankings",
        "summary": "A city's ranked local comedians (up to 100)",
        "tags": [
          "Public data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "A public LaughRank city.",
            "schema": {
              "type": "string",
              "enum": [
                "austin",
                "chicago",
                "denver",
                "philadelphia",
                "atlanta",
                "minneapolis",
                "seattle",
                "portland",
                "nashville",
                "washington-dc",
                "dallas",
                "salt-lake-city"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ranking, best first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rankings"
                }
              }
            }
          },
          "404": {
            "description": "No such city.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cities/{city}/places.json": {
      "get": {
        "operationId": "getCityPlaces",
        "summary": "Where to see and perform comedy in a city",
        "tags": [
          "Public data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "A public LaughRank city.",
            "schema": {
              "type": "string",
              "enum": [
                "austin",
                "chicago",
                "denver",
                "philadelphia",
                "atlanta",
                "minneapolis",
                "seattle",
                "portland",
                "nashville",
                "washington-dc",
                "dallas",
                "salt-lake-city"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Clubs, open mics, regular shows, theaters, festivals and events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Places"
                }
              }
            }
          },
          "404": {
            "description": "No such city.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cities/{city}/events.json": {
      "get": {
        "operationId": "getCityEvents",
        "summary": "A city's comedy calendar: upcoming shows and open mics",
        "tags": [
          "Public data"
        ],
        "security": [],
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "A public LaughRank city.",
            "schema": {
              "type": "string",
              "enum": [
                "austin",
                "chicago",
                "denver",
                "philadelphia",
                "atlanta",
                "minneapolis",
                "seattle",
                "portland",
                "nashville",
                "washington-dc",
                "dallas",
                "salt-lake-city"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live calendar listings in date order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Events"
                }
              }
            }
          },
          "404": {
            "description": "No such city.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "City": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "region",
          "country"
        ]
      },
      "CityIndex": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "LaughRank"
          },
          "attribution": {
            "type": "string",
            "description": "How to credit this data."
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this data last changed. Quote it when citing."
          },
          "count": {
            "type": "integer"
          },
          "cities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "region": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "The ranking page for people."
                },
                "ranked": {
                  "type": "integer",
                  "description": "How many comedians are on the public list."
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "topFive": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "fanBoosting": {
                  "type": "boolean",
                  "description": "True when at least one comic in the city has a fan boost."
                },
                "rankings": {
                  "type": "string",
                  "format": "uri"
                },
                "places": {
                  "type": "string",
                  "format": "uri"
                },
                "events": {
                  "type": "string",
                  "format": "uri"
                },
                "markdown": {
                  "type": "object",
                  "properties": {
                    "rankings": {
                      "type": "string",
                      "format": "uri"
                    },
                    "scene": {
                      "type": "string",
                      "format": "uri"
                    },
                    "calendar": {
                      "type": "string",
                      "format": "uri"
                    },
                    "openMics": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              },
              "required": [
                "slug",
                "name",
                "url",
                "ranked",
                "updatedAt",
                "rankings",
                "places",
                "events"
              ]
            }
          }
        },
        "required": [
          "source",
          "updatedAt",
          "count",
          "cities"
        ]
      },
      "SearchResults": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "LaughRank"
          },
          "attribution": {
            "type": "string",
            "description": "How to credit this data."
          },
          "query": {
            "type": "string"
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "citySlug": {
                  "type": "string"
                },
                "rank": {
                  "type": "integer"
                },
                "of": {
                  "type": "integer",
                  "description": "How many comedians are on that city's list."
                },
                "score": {
                  "type": "number"
                },
                "fanBoost": {
                  "type": "number"
                },
                "tagline": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bio": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "links": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "profile": {
                  "type": "string",
                  "format": "uri"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "name",
                "city",
                "citySlug",
                "rank",
                "score",
                "profile"
              ]
            }
          }
        },
        "required": [
          "source",
          "query",
          "count",
          "results"
        ]
      },
      "Honor": {
        "type": "object",
        "description": "An award or credit.",
        "properties": {
          "title": {
            "type": "string"
          },
          "by": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          }
        },
        "required": [
          "title"
        ]
      },
      "Comic": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "rank": {
            "type": "integer",
            "minimum": 1
          },
          "score": {
            "type": "number",
            "description": "Out of 100."
          },
          "tagline": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "honors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Honor"
            }
          },
          "links": {
            "type": "object",
            "description": "The comedian's own pages, such as website or instagram.",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            }
          },
          "videoUrl": {
            "type": "string",
            "format": "uri",
            "description": "A recorded set."
          },
          "venue": {
            "type": "string",
            "description": "The room they perform at most."
          },
          "claimed": {
            "type": "boolean",
            "description": "True when the comedian manages this profile themselves."
          },
          "bookings": {
            "type": "boolean",
            "description": "True when the comedian has chosen to receive private-event requests through their profile page."
          },
          "fans": {
            "type": "integer",
            "description": "How many different fans voted for them in the fan-boost window."
          },
          "fanBoost": {
            "type": "number",
            "description": "Points added to their score by fan votes: 0, or a small fixed boost. Already included in `score`."
          },
          "scoreWithoutFanBoost": {
            "type": "number",
            "description": "Present only when they have a fan boost."
          },
          "rankWithoutFanBoost": {
            "type": "integer",
            "description": "Present only when the fan boost changed their place."
          },
          "previousRank": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Their place before the latest re-rank."
          },
          "photo": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "profile": {
            "type": "string",
            "format": "uri",
            "description": "Their page on LaughRank. Link to this when citing."
          }
        },
        "required": [
          "slug",
          "name",
          "rank",
          "score",
          "profile"
        ]
      },
      "Rankings": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "LaughRank"
          },
          "attribution": {
            "type": "string",
            "description": "How to credit this data."
          },
          "city": {
            "$ref": "#/components/schemas/City"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this data last changed. Quote it when citing."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The ranking page for people. Link to this when citing."
          },
          "count": {
            "type": "integer"
          },
          "lastRanked": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was last re-drawn. Re-ranks happen on the 15th and the last day of each month."
          },
          "fanBoost": {
            "type": "object",
            "description": "How the fan boost works here, and how many comics have it now.",
            "properties": {
              "fans": {
                "type": "integer"
              },
              "days": {
                "type": "integer"
              },
              "points": {
                "type": "number"
              },
              "tiePoints": {
                "type": "number"
              },
              "boostedComics": {
                "type": "integer"
              },
              "note": {
                "type": "string"
              }
            }
          },
          "newNotYetRanked": {
            "type": "array",
            "description": "Comedians found since the last re-rank. They have no place yet.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "nickname": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tagline": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bio": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "honors": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Honor"
                  }
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "rankings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Comic"
            }
          }
        },
        "required": [
          "source",
          "city",
          "url",
          "updatedAt",
          "count",
          "rankings"
        ]
      },
      "Place": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "club",
              "open-mic",
              "show",
              "theater",
              "festival",
              "event"
            ]
          },
          "see": {
            "type": "boolean",
            "description": "A place to watch comedy."
          },
          "perform": {
            "type": "boolean",
            "description": "A place where local comedians can get stage time."
          },
          "area": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "when": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "stageTime": {
            "type": "string",
            "description": "How to get on stage here."
          },
          "about": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "kind"
        ]
      },
      "Places": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "LaughRank"
          },
          "attribution": {
            "type": "string",
            "description": "How to credit this data."
          },
          "city": {
            "$ref": "#/components/schemas/City"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this data last changed. Quote it when citing."
          },
          "places": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Place"
            }
          }
        },
        "required": [
          "source",
          "city",
          "updatedAt",
          "places"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "show",
              "mic"
            ]
          },
          "name": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "description": "ISO 8601. A date and time with the city's UTC offset, or a date alone when the time is not known. For a weekly listing this is its next date."
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a weekly listing, for example \"Mondays 7:30 PM\". Null for a one-off."
          },
          "venue": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "ticketOrSignupUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "performer": {
            "type": [
              "object",
              "null"
            ],
            "description": "The ranked comedian this show belongs to, when we know.",
            "properties": {
              "name": {
                "type": "string"
              },
              "rank": {
                "type": "integer"
              },
              "profile": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "lastVerified": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date (YYYY-MM-DD) we last checked this listing."
          },
          "featured": {
            "type": "boolean"
          },
          "paid": {
            "type": "boolean",
            "description": "True when the organiser paid to feature this listing. Paid listings never affect the ranking."
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "startDate",
          "paid"
        ]
      },
      "Events": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "LaughRank"
          },
          "attribution": {
            "type": "string",
            "description": "How to credit this data."
          },
          "city": {
            "$ref": "#/components/schemas/City"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this data last changed. Quote it when citing."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The calendar page for people. Link to this when citing."
          },
          "window": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "through": {
                "type": "string"
              },
              "timeZone": {
                "type": "string"
              }
            }
          },
          "note": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "required": [
          "source",
          "city",
          "url",
          "updatedAt",
          "count",
          "events"
        ]
      }
    }
  }
}