Overview


Get started

Quiz API is a simple HTTP REST API for technical quizzes including a wide variety of topics like:

  • Linux
  • DevOps
  • Networking
  • Programming (PHP, JS, Python and etc.)
  • Cloud
  • Docker
  • Kubernetes
  • And lots more

We have a large database of numerous questions that you could use to test your own or your team's knowledge while having fun.

Request parameters

You can search for questions with any combination of the following criteria:

  • Category. Eg: Find 10 Linux questions
  • Difficulty. Eg: Find 10 Easy Linux questions
  • Limit the number of questions. Eg: Find 5 random questions
  • Tags. Eg. Find 10 questions that are with PHP and Laravel tags

Examples

The following example will output 10 random questions.

{success} You need an API key to use the API - this is a unique key that identifies your requests. You can get one here: get API key.

They're free for development, open-source, and non-commercial use.

curl https://quizapi.io/api/v1/questions -G \
-d apiKey=YOUR_API_KEY \
-d limit=10

This returns a JSON object with the results in an array you can iterate over.

[
  {
    "id": 1,
    "question": "How to delete a directory in Linux?",
    "description": "delete folder",
    "answers": {
      "answer_a": "ls",
      "answer_b": "delete",
      "answer_c": "remove",
      "answer_d": "rmdir",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "true",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "explanation": "rmdir deletes an empty directory",
    "tip": null,
    "tags": [],
    "category": "linux",
    "difficulty": "Easy"
  }
]

If you want question just for a specific category, for example Linux, you can do that too.

curl https://quizapi.io/api/v1/questions -G \
-d apiKey=YOUR_API_KEY \
-d limit=10 \
-d category=Linux

If you want question just for a specific category and a sepcific difficulty, you can do the following:

curl https://quizapi.io/api/v1/questions -G \
-d apiKey=YOUR_API_KEY \
-d limit=10 \
-d category=Linux \
-d difficulty=easy

For more details about the endpoints and the request parameters, check out the rest of the documentation.