API League Knowledge API

The Knowledge API from API League — 5 operation(s) for knowledge.

Operations 5

GET /retrieve-random-trivia Random Trivia API #
GET /retrieve-random-life-hack Random Life Hack API #
GET /retrieve-random-affirmation Random Affirmation API #
GET /retrieve-random-quote Random Quote API #
GET /retrieve-random-riddle Random Riddle API #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/api-league-knowledge-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

api-league-knowledge-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: League Knowledge API
  description: API League is a Hub for World Class APIs.
  termsOfService: https://apileague.com/terms
  version: 1.9.0
  contact:
    name: David Urbansky
    email: mail@apileague.com
servers:
- url: https://api.apileague.com
security:
- apiKey: []
- headerApiKey: []
tags:
- name: Knowledge
paths:
  /retrieve-random-trivia:
    get:
      responses:
        '200':
          description: Success
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  trivia:
                    type:
                    - string
                    - 'null'
              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
                    - 'null'
                  description:
                    type:
                    - string
                    - 'null'
              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
                    - 'null'
                  affirmation:
                    type:
                    - string
                    - 'null'
              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
                    - 'null'
                  quote:
                    type:
                    - string
                    - 'null'
              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
                    - 'null'
                  answer:
                    type:
                    - string
                    - 'null'
                  difficulty:
                    type:
                    - string
                    - 'null'
              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