{
  "openapi": "3.1.0",
  "info": {
    "title": "Quotes API",
    "version": "1.0.0",
    "description": "Random and by-id quotes with authors across motivation, wisdom, love and humour.\n\nA collection of quotes across themes such as motivation, inspiration, love, wisdom and humour, each with its author. Pull a random quote or fetch one by id for apps, social posts and educational tools.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/quotes.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/quotes"
  },
  "servers": [
    {
      "url": "https://quotes.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Quotes API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/quotes/{id}": {
      "get": {
        "operationId": "getQuoteById",
        "summary": "Get Quote By Id",
        "description": "Get Quote By Id endpoint of the Quotes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/quotes/get-quote-by-id"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "10"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "quoteId": 10,
                  "quote": "I always show loyalty to the people who gave me a chance from the get-go, and Cincinnati gave me that chance.",
                  "keyWords": [
                    "chance",
                    "loyalty",
                    "me",
                    "people",
                    "always"
                  ],
                  "relatedTopics": [
                    "cincinnati",
                    "gave",
                    "show",
                    "who"
                  ],
                  "author": {
                    "authorId": 35,
                    "name": "A. J. Green",
                    "country": "American",
                    "profession": "Football Player",
                    "born": "July 31, 1988",
                    "died": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/random": {
      "get": {
        "operationId": "getRandomQuote",
        "summary": "Get Random Quote",
        "description": "Get Random Quote endpoint of the Quotes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/quotes/get-random-quote"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "quoteId": 1002279,
                  "quote": "I always want to talk about real life, not about material possessions. I've got to tell the story of the people for the people and not for celebrity or fame.",
                  "keyWords": [
                    "life",
                    "fame",
                    "real",
                    "people",
                    "celebrity"
                  ],
                  "relatedTopics": [
                    "about",
                    "always",
                    "for the people",
                    "got",
                    "material",
                    "possessions",
                    "real life",
                    "story",
                    "talk",
                    "tell",
                    "want"
                  ],
                  "author": {
                    "authorId": 25159,
                    "name": "Slowthai",
                    "country": "English",
                    "profession": "Musician",
                    "born": "December 18, 1994",
                    "died": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}