openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/apileague/retrieve-random-riddle
info:
  title: "Random Riddle API : Easily Generate Brain-Teasers for Quizzes"
  description: The Random Riddle API generates brain-teasers and puzzles, allowing
    users to retrieve random riddles with an optional difficulty level (easy,
    medium, or hard).
  termsOfService: https://apileague.com/terms
  version: 1.6.4
  contact:
    name: David Urbansky
    email: mail@apileague.com
paths:
  /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
    parameters:
      - description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
components:
  schemas: {}
  securitySchemes: {}
security: {}
tags:
  - name: communication
    description: Operations related to communication
  - name: education
    description: Operations related to education
