Koniat
DonateLogin

Find Categories API

The Find Categories endpoint returns a paginated list of categories available in the Koniat database. It supports searching categories by name, making it easy to build search functionality, filter options, autocomplete suggestions, and category selection interfaces.

This endpoint returns category information only and does not include the quotes associated with each category.

Purpose

The Find Categories endpoint enables developers to retrieve and search available quote categories efficiently. It helps applications organize inspirational content and allows users to browse quotes by category.

Authentication

This endpoint is protected and requires a valid Bearer Access Token.

Include the access token in the request header.

Authorization: Bearer YOUR_ACCESS_TOKEN

Requests without a valid access token will be rejected.

Endpoint

GET

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer Access Token obtained from the Authentication API.
AcceptYesapplication/json

Query Parameters

ParameterTypeRequiredDescription
searchStringNoSearch categories by name.
pageIntegerNoPage number for paginated results. Default is 1.
per_pageIntegerNoNumber of records returned per page. Default value is configured by the server.

API Request

curl-G"https://api.koniat.com/Api/Gateway/Category/List"\
-H"Accept: application/json"\
-H"Authorization: Bearer GENERATED_ACCESSTOKEN"\
--data-urlencode"search: search keywords goes here"\
--data-urlencode"order: asc"\
--data-urlencode"sortBy: name"\
--data-urlencode"page: 1"\
--data-urlencode"limit: 20"

Expected Output

{
  "status": 200,
  "type": "RFC reference URL",
  "title": "Success",
  "dateTime": "UTC Datetime string",
  "detail": "Reason?"
}

Data Credibility

Category information is curated and maintained by Koniat to ensure:

  • Accurate category names
  • Consistent classification
  • Unique identifiers
  • Reliable metadata
  • Regular database maintenance
  • Production-ready data quality

Key Features

  • Search categories by name
  • Fast paginated results
  • Lightweight JSON responses
  • Secure Bearer Token authentication
  • Consistent response structure
  • RESTful API design
  • Optimized for search and filtering
  • Easy integration with web and mobile applications

Error Handling

The endpoint returns standard HTTP status codes.

HTTP StatusDescription
200Categories retrieved successfully.
400Invalid request parameters.
401Unauthorized or invalid access token.
403Access forbidden.
404No categories found.

Best Practices

  • Use the search parameter to narrow results and improve performance.
  • Implement pagination when displaying large category lists.
  • Cache category data where appropriate, as categories typically change infrequently.
  • Always include a valid Bearer Access Token.
  • Handle empty search results gracefully.

Common Use Cases

The Find Categories endpoint is suitable for:

  • Use the search parameter to narrow results and improve performance.
  • Implement pagination when displaying large category lists.
  • Cache category data where appropriate, as categories typically change infrequently.
  • Always include a valid Bearer Access Token.
  • Handle empty search results gracefully.

Next Step

To retrieve detailed information for one or more specific categories, continue to the Get Categories endpoint documentation.