Skip to main content
GET
List Courses

Endpoint

Authentication

No authentication required. This is a public endpoint.

Query Parameters

This endpoint does not accept any query parameters.

Response

boolean
required
Indicates whether the request was successful
array
required
Array of published course objects

Success Response

Error Response

Error Codes

Internal Server Error
An unexpected error occurred while fetching courses. This typically indicates a database connection issue or server error.

Implementation Notes

  • This endpoint only returns courses where isPublished is true
  • The following fields are excluded from the response for performance:
    • courseContent (chapter and lecture details)
    • courseRatings (individual user ratings)
    • enrolledStudents (list of enrolled student IDs)
  • The educatorId field is populated with basic educator information (name and image)
  • Courses are returned in the order they are stored in the database

Code Examples

Use Cases

Display Course Catalog

Filter and Search Courses