openapi: 3.0.0 info: title: API League — Knowledge description: API League is a Hub for World Class APIs. version: 1.9.0 termsOfService: https://apileague.com/terms contact: name: David Urbansky email: mail@apileague.com servers: - url: https://api.apileague.com tags: - name: Knowledge security: - apiKey: [] - headerApiKey: [] paths: /retrieve-random-trivia: get: responses: '200': description: Success headers: {} content: application/json: schema: type: object properties: trivia: type: string nullable: true examples: Response: value: trivia: Koalas sleep up to 20 hours a day. '401': description: Unauthorized '402': description: Payment Required '403': description: Forbidden '404': description: Not Found '406': description: Not Acceptable '429': description: Too Many Requests parameters: - name: max-length description: The maximum length of the trivia in letters. schema: format: int32 minimum: 0 maximum: 10000 type: integer example: 300 required: false style: form explode: false in: query externalDocs: description: Read entire docs url: https://apileague.com/apis/random-trivia-api/ summary: Random Trivia API tags: - Knowledge description: This endpoint returns a random piece of trivia like "Rio de Janeiro was once the capital of Portugal, making it the only European capital outside of Europe.". operationId: randomTriviaAPI deprecated: false /retrieve-random-life-hack: get: responses: '200': description: Success headers: {} content: application/json: schema: type: object properties: title: type: string nullable: true description: type: string nullable: true examples: Response: value: title: Theft Prevention description: 90% of people are right handed so you are less likely to get something stolen from your right pocket as this would usually require the thief to be left handed. '401': description: Unauthorized '402': description: Payment Required '403': description: Forbidden '404': description: Not Found '406': description: Not Acceptable '429': description: Too Many Requests parameters: - name: max-length description: The maximum length of the hack in letters. schema: format: int32 minimum: 0 maximum: 10000 type: integer example: 300 required: false style: form explode: false in: query externalDocs: description: Read entire docs url: https://apileague.com/apis/random-life-hack-api/ summary: Random Life Hack API tags: - Knowledge description: This endpoint returns a random life hack to make your life easier. Life hacks are simple and clever tips or tricks that can help you save time, money, or effort in your daily life. operationId: randomLifeHackAPI deprecated: false /retrieve-random-affirmation: get: responses: '200': description: Success headers: {} content: application/json: schema: type: object properties: image: type: string nullable: true affirmation: type: string nullable: true examples: Response: value: image: https://img.apileague.com/portrait-backgrounds/affirmation-177.png affirmation: My job brings me joy and happiness. '401': description: Unauthorized '402': description: Payment Required '403': description: Forbidden '404': description: Not Found '406': description: Not Acceptable '429': description: Too Many Requests parameters: [] externalDocs: description: Read entire docs url: https://apileague.com/apis/random-affirmation-api/ summary: Random Affirmation API tags: - Knowledge description: This endpoint returns a random affirmation to boost your confidence and motivation. Affirmations are positive statements that can help you overcome negative thoughts and improve your mindset and well-being. operationId: randomAffirmationAPI deprecated: false /retrieve-random-quote: get: responses: '200': description: Success headers: {} content: application/json: schema: type: object properties: author: type: string nullable: true quote: type: string nullable: true examples: Response: value: author: Francis Bacon quote: A little philosophy inclineth man's mind to atheism, but depth in philosophy bringeth men's minds about to religion. '401': description: Unauthorized '402': description: Payment Required '403': description: Forbidden '404': description: Not Found '406': description: Not Acceptable '429': description: Too Many Requests parameters: - name: min-length description: The minimum length of the quote in letters. schema: format: int32 minimum: 1 maximum: 10000 type: integer example: 120 required: false style: form explode: false in: query - name: max-length description: The maximum length of the quote in letters. schema: format: int32 minimum: 1 maximum: 10000 type: integer example: 300 required: false style: form explode: false in: query externalDocs: description: Read entire docs url: https://apileague.com/apis/random-quote-api/ summary: Random Quote API tags: - Knowledge description: This API returns a random quote from a collection of quotes. The quotes are from famous people and are in English. operationId: randomQuoteAPI deprecated: false /retrieve-random-riddle: get: responses: '200': description: Success headers: {} content: application/json: schema: type: object properties: riddle: type: string nullable: true answer: type: string nullable: true difficulty: type: string nullable: true examples: Response: value: riddle: What has 13 hearts but no other organs? answer: A deck of cards difficulty: easy '401': description: Unauthorized '402': description: Payment Required '403': description: Forbidden '404': description: Not Found '406': description: Not Acceptable '429': description: Too Many Requests parameters: - name: difficulty description: The difficulty of the riddle, either "easy", "medium", or "hard". schema: pattern: . maxLength: 6 type: string example: easy required: false style: form explode: false in: query externalDocs: description: Read entire docs url: https://apileague.com/apis/random-riddle-api/ summary: Random Riddle API tags: - Knowledge description: 'The riddles API returns a random riddle or brain-teaser. Riddles are a great way to exercise your brain and keep it sharp. The API supports brain-teasers in three difficulty levels: easy, medium, and hard. You can also get a random riddle without specifying a difficulty level.' operationId: randomRiddleAPI deprecated: false components: securitySchemes: apiKey: name: api-key type: apiKey in: query headerApiKey: name: x-api-key type: apiKey in: header