{
 "openapi": "3.1.0",
 "info": {
  "title": "ChartVault API",
  "version": "1.0",
  "description": "Weekly Billboard and Radio & Records chart data. Human-readable documentation: https://www.chartvault.fm/api/docs",
  "termsOfService": "https://www.chartvault.fm/api/terms"
 },
 "servers": [
  {
   "url": "https://www.chartvault.fm/api/v1"
  }
 ],
 "security": [
  {
   "bearer": []
  },
  {
   "apiKey": []
  }
 ],
 "paths": {
  "/me": {
   "get": {
    "summary": "Your key's tier, limits and usage",
    "operationId": "getMe",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Me"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/charts": {
   "get": {
    "summary": "Charts in the archive",
    "operationId": "listCharts",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Chart"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/charts/{chart}": {
   "get": {
    "summary": "One chart and its names in print",
    "operationId": "getChart",
    "parameters": [
     {
      "name": "chart",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "example": "H100"
      },
      "description": "Chart code (see /charts)"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/ChartDetail"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/charts/{chart}/issues": {
   "get": {
    "summary": "Issue dates",
    "operationId": "listIssues",
    "parameters": [
     {
      "name": "chart",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "example": "H100"
      },
      "description": "Chart code (see /charts)"
     },
     {
      "name": "year",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      },
      "description": "Only this year"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "type": "string",
            "format": "date"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/charts/{chart}/issues/{date}": {
   "get": {
    "summary": "A chart week",
    "operationId": "getWeek",
    "parameters": [
     {
      "name": "chart",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "example": "H100"
      },
      "description": "Chart code (see /charts)"
     },
     {
      "name": "date",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Issue date YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Week"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/years": {
   "get": {
    "summary": "Years in the archive",
    "operationId": "listYears",
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Year"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/years/{year}": {
   "get": {
    "summary": "Charts published in a year",
    "operationId": "getYear",
    "parameters": [
     {
      "name": "year",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Year"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/YearChart"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/songs": {
   "get": {
    "summary": "Song index (by letter or search)",
    "operationId": "listSongs",
    "parameters": [
     {
      "name": "letter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z#]$"
      },
      "description": "One letter, or # for digits and symbols"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "minLength": 2,
       "maxLength": 80
      },
      "description": "Text to search for"
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 1000,
       "default": 100
      },
      "description": "Page size"
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 0,
       "default": 0
      },
      "description": "Items to skip"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/SongListItem"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/PageMeta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/songs/{id}": {
   "get": {
    "summary": "One song and its chart runs",
    "operationId": "getSong",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Song id"
     },
     {
      "name": "include",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "history"
       ]
      },
      "description": "history: every week's position"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Song"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/artists": {
   "get": {
    "summary": "Artist index (by letter or search)",
    "operationId": "listArtists",
    "parameters": [
     {
      "name": "letter",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z#]$"
      },
      "description": "One letter, or # for digits and symbols"
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "minLength": 2,
       "maxLength": 80
      },
      "description": "Text to search for"
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 1000,
       "default": 100
      },
      "description": "Page size"
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 0,
       "default": 0
      },
      "description": "Items to skip"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/ArtistListItem"
           }
          },
          "meta": {
           "$ref": "#/components/schemas/PageMeta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  },
  "/artists/{id}": {
   "get": {
    "summary": "One artist and their records",
    "operationId": "getArtist",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer"
      },
      "description": "Artist id"
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "headers": {
       "X-RateLimit-Limit": {
        "$ref": "#/components/headers/X-RateLimit-Limit"
       },
       "X-RateLimit-Remaining": {
        "$ref": "#/components/headers/X-RateLimit-Remaining"
       },
       "X-RateLimit-Reset": {
        "$ref": "#/components/headers/X-RateLimit-Reset"
       },
       "X-Quota-Limit": {
        "$ref": "#/components/headers/X-Quota-Limit"
       },
       "X-Quota-Remaining": {
        "$ref": "#/components/headers/X-Quota-Remaining"
       },
       "X-Quota-Reset": {
        "$ref": "#/components/headers/X-Quota-Reset"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/Artist"
          },
          "meta": {
           "$ref": "#/components/schemas/Meta"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/Problem"
     },
     "401": {
      "$ref": "#/components/responses/Problem"
     },
     "403": {
      "$ref": "#/components/responses/Problem"
     },
     "404": {
      "$ref": "#/components/responses/Problem"
     },
     "429": {
      "$ref": "#/components/responses/TooMany"
     },
     "503": {
      "$ref": "#/components/responses/Problem"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Authorization: Bearer cv_live_..."
   },
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   }
  },
  "headers": {
   "X-RateLimit-Limit": {
    "schema": {
     "type": "integer"
    },
    "description": "Calls allowed this minute"
   },
   "X-RateLimit-Remaining": {
    "schema": {
     "type": "integer"
    }
   },
   "X-RateLimit-Reset": {
    "schema": {
     "type": "integer"
    },
    "description": "Seconds until the minute ends"
   },
   "X-Quota-Limit": {
    "schema": {
     "type": "integer"
    },
    "description": "Calls allowed today (UTC)"
   },
   "X-Quota-Remaining": {
    "schema": {
     "type": "integer"
    }
   },
   "X-Quota-Reset": {
    "schema": {
     "type": "integer"
    },
    "description": "Seconds until midnight UTC"
   }
  },
  "responses": {
   "Problem": {
    "description": "Error (RFC 9457)",
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   },
   "TooMany": {
    "description": "Over a limit",
    "headers": {
     "Retry-After": {
      "schema": {
       "type": "integer"
      }
     }
    },
    "content": {
     "application/problem+json": {
      "schema": {
       "$ref": "#/components/schemas/Problem"
      }
     }
    }
   }
  },
  "schemas": {
   "Problem": {
    "type": "object",
    "required": [
     "type",
     "title",
     "status",
     "detail",
     "code"
    ],
    "properties": {
     "type": {
      "type": "string",
      "format": "uri"
     },
     "title": {
      "type": "string"
     },
     "status": {
      "type": "integer"
     },
     "detail": {
      "type": "string"
     },
     "code": {
      "type": "string",
      "description": "Stable error code; see /api/docs#errors"
     },
     "instance": {
      "type": "string"
     },
     "requestId": {
      "type": "string"
     },
     "retryAfter": {
      "type": "integer"
     },
     "nearestIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "parameter": {
      "type": "string"
     },
     "yourIp": {
      "type": "string"
     }
    }
   },
   "Meta": {
    "type": "object",
    "properties": {
     "attribution": {
      "type": "string"
     },
     "terms": {
      "type": "string",
      "format": "uri"
     }
    },
    "additionalProperties": true
   },
   "PageMeta": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Meta"
     },
     {
      "type": "object",
      "properties": {
       "total": {
        "type": "integer"
       },
       "limit": {
        "type": "integer"
       },
       "offset": {
        "type": "integer"
       },
       "nextOffset": {
        "type": [
         "integer",
         "null"
        ]
       },
       "letter": {
        "type": [
         "string",
         "null"
        ]
       },
       "q": {
        "type": [
         "string",
         "null"
        ]
       }
      }
     }
    ]
   },
   "Chart": {
    "type": "object",
    "properties": {
     "code": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "publisher": {
      "type": "string",
      "enum": [
       "Billboard",
       "Radio & Records"
      ]
     },
     "firstYear": {
      "type": [
       "integer",
       "null"
      ]
     },
     "lastYear": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   },
   "ChartDetail": {
    "allOf": [
     {
      "$ref": "#/components/schemas/Chart"
     },
     {
      "type": "object",
      "properties": {
       "namesInPrint": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "from": {
           "type": [
            "string",
            "null"
           ],
           "format": "date"
          },
          "until": {
           "type": [
            "string",
            "null"
           ],
           "format": "date"
          },
          "name": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    ]
   },
   "Credit": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "joinedBy": {
      "type": [
       "string",
       "null"
      ]
     }
    }
   },
   "SongRef": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "title": {
      "type": "string"
     }
    }
   },
   "Entry": {
    "type": "object",
    "properties": {
     "rank": {
      "type": "integer"
     },
     "lastWeek": {
      "type": [
       "integer",
       "null"
      ]
     },
     "twoWeeksAgo": {
      "type": [
       "integer",
       "null"
      ]
     },
     "threeWeeksAgo": {
      "type": [
       "integer",
       "null"
      ]
     },
     "weeksOnChart": {
      "type": [
       "integer",
       "null"
      ]
     },
     "peak": {
      "type": [
       "integer",
       "null"
      ]
     },
     "bullet": {
      "type": "boolean"
     },
     "status": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "debut",
       "re-entry",
       null
      ]
     },
     "song": {
      "type": "object",
      "properties": {
       "id": {
        "type": "integer"
       },
       "title": {
        "type": "string"
       },
       "flipSide": {
        "oneOf": [
         {
          "$ref": "#/components/schemas/SongRef"
         },
         {
          "type": "null"
         }
        ]
       }
      }
     },
     "artist": {
      "type": "string"
     },
     "artists": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Credit"
      }
     },
     "printed": {
      "oneOf": [
       {
        "type": "null"
       },
       {
        "type": "object",
        "properties": {
         "lastWeek": {
          "type": [
           "string",
           "null"
          ]
         },
         "twoWeeksAgo": {
          "type": [
           "string",
           "null"
          ]
         },
         "weeksOnChart": {
          "type": [
           "integer",
           "null"
          ]
         },
         "title": {
          "type": [
           "string",
           "null"
          ]
         },
         "artist": {
          "type": [
           "string",
           "null"
          ]
         },
         "label": {
          "type": [
           "string",
           "null"
          ]
         },
         "annotation": {
          "type": [
           "string",
           "null"
          ]
         },
         "highlights": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "weeksAtNumberOne": {
          "type": [
           "integer",
           "null"
          ]
         }
        }
       }
      ]
     }
    }
   },
   "Week": {
    "type": "object",
    "properties": {
     "chart": {
      "type": "string"
     },
     "chartName": {
      "type": "string"
     },
     "publisher": {
      "type": "string"
     },
     "issueDate": {
      "type": "string",
      "format": "date"
     },
     "positions": {
      "type": "integer"
     },
     "previousIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "nextIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "note": {
      "type": [
       "string",
       "null"
      ]
     },
     "entries": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Entry"
      }
     }
    }
   },
   "Year": {
    "type": "object",
    "properties": {
     "year": {
      "type": "integer"
     },
     "loaded": {
      "type": "boolean"
     },
     "note": {
      "type": [
       "string",
       "null"
      ]
     }
    }
   },
   "YearChart": {
    "type": "object",
    "properties": {
     "chart": {
      "type": "string"
     },
     "chartName": {
      "type": "string"
     },
     "publisher": {
      "type": "string"
     },
     "issues": {
      "type": [
       "integer",
       "null"
      ]
     },
     "firstIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "lastIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     }
    }
   },
   "SongListItem": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "title": {
      "type": "string"
     },
     "artist": {
      "type": "string"
     },
     "firstYear": {
      "type": [
       "integer",
       "null"
      ]
     },
     "bestPeak": {
      "type": [
       "integer",
       "null"
      ]
     },
     "weeksOnCharts": {
      "type": [
       "integer",
       "null"
      ]
     },
     "charts": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   },
   "ChartRun": {
    "type": "object",
    "properties": {
     "chart": {
      "type": "string"
     },
     "chartName": {
      "type": "string"
     },
     "weeks": {
      "type": [
       "integer",
       "null"
      ]
     },
     "peak": {
      "type": [
       "integer",
       "null"
      ]
     },
     "weeksBulleted": {
      "type": [
       "integer",
       "null"
      ]
     },
     "firstIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "lastIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "peakIssue": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "flipSide": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/SongRef"
       },
       {
        "type": "null"
       }
      ]
     },
     "history": {
      "oneOf": [
       {
        "type": "null"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "issueDate": {
           "type": [
            "string",
            "null"
           ],
           "format": "date"
          },
          "rank": {
           "type": [
            "integer",
            "null"
           ]
          },
          "bullet": {
           "type": "boolean"
          }
         }
        }
       }
      ]
     }
    }
   },
   "Song": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "title": {
      "type": "string"
     },
     "artist": {
      "type": "string"
     },
     "artists": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Credit"
      }
     },
     "charts": {
      "type": [
       "integer",
       "null"
      ]
     },
     "weeksOnCharts": {
      "type": [
       "integer",
       "null"
      ]
     },
     "bestPeak": {
      "type": [
       "integer",
       "null"
      ]
     },
     "chartRuns": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ChartRun"
      }
     }
    }
   },
   "ArtistListItem": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "songs": {
      "type": [
       "integer",
       "null"
      ]
     }
    }
   },
   "Artist": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer"
     },
     "name": {
      "type": "string"
     },
     "songs": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "integer"
        },
        "title": {
         "type": "string"
        },
        "artist": {
         "type": "string"
        },
        "billingOrder": {
         "type": [
          "integer",
          "null"
         ]
        },
        "firstYear": {
         "type": [
          "integer",
          "null"
         ]
        },
        "chartRuns": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "chart": {
            "type": "string"
           },
           "chartName": {
            "type": "string"
           },
           "weeks": {
            "type": [
             "integer",
             "null"
            ]
           },
           "peak": {
            "type": [
             "integer",
             "null"
            ]
           },
           "firstIssue": {
            "type": [
             "string",
             "null"
            ],
            "format": "date"
           },
           "lastIssue": {
            "type": [
             "string",
             "null"
            ],
            "format": "date"
           }
          }
         }
        }
       }
      }
     }
    }
   },
   "Me": {
    "type": "object",
    "properties": {
     "key": {
      "type": "object"
     },
     "tier": {
      "type": "object"
     },
     "limits": {
      "type": "object",
      "properties": {
       "perMinute": {
        "type": "integer"
       },
       "perDay": {
        "type": [
         "integer",
         "null"
        ]
       },
       "overageAllowed": {
        "type": "boolean"
       }
      }
     },
     "usage": {
      "type": "object"
     }
    }
   }
  }
 }
}