G
YouTube TikTok Games
Skip to content

Quiz API returns fewer quizzes than expected for programming category #2

Open

Description

@lvog

When I use the endpoint https://quizapi.io/api/v1/quizzes?category=programming&limit=20 to fetch quizzes, I only receive 5 quizzes in response.
However, on the website https://quizapi.io/practice, when applying the same filter (category: programming), there are 20 quizzes available.
Initially, I assumed this might be related to the subscription plan. But both the Free and Starter plans seem to have the same behavior in this regard.
Could you please clarify what might be causing this discrepancy?

Activity

  1. bobbyiliev commented on Jun 1, 2026

    @bobbyiliev
    Contributor

    Thanks for reporting this.

    This is not related to the subscription plan. The difference comes from how the API and the /practice page currently interpret category.

    Right now:

    • GET /api/v1/quizzes?category=programming filters by the older flat quiz category field, so it only returns quizzes where category = "Programming".
    • The /practice page uses the newer taxonomy system, where Programming is a top-level topic that includes subcategories like JavaScript, TypeScript, Python, React, Node.js, REST API, CSS, Data Structures, and so on.

    So the API is returning quizzes directly categorized as Programming, while the website can show quizzes from the broader Programming topic and its subcategories.

    For now, you can query specific subcategories directly, for example:

    /api/v1/quizzes?category=JavaScript
    /api/v1/quizzes?category=TypeScript
    /api/v1/quizzes?category=React
    /api/v1/quizzes?category=Python
    

    I’ll keep the existing category behavior for backward compatibility, but I should add taxonomy-aware filters such as:

    /api/v1/quizzes?topicSlug=programming
    /api/v1/quizzes?categoryId=<category_id>
    

    That would make the API match the /practice filtering behavior more closely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions