🎓

courses

Educational course or class offering with instructor, curriculum, enrollment, pricing, and certification information. Used for online learning platforms, universities, and training programs.

🎯 Request Builder

https://api.mockly.codes/courses?page=1&limit=10&count=10
📡

Configure your request and click Send Request to see the response here.

Endpoints

GET/courses

Get a collection of courses

Alternative: /education/courses
GET/courses/:id

Get a single course by ID

Alternative: /education/courses/:id
GET/courses/meta

Get resource metadata and schema

Alternative: /education/courses/meta
🔍

How to Use Search

The search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.

1. Basic Search

Search across all text fields:

Basic Search
GET https://api.mockly.codes/courses?q=laptop

2. Search Specific Fields

Field-Specific Search
GET https://api.mockly.codes/courses?q=laptop&search_fields=name,description

💡 Pro Tips

  • Search is case-insensitive and performs partial matching
  • Without search_fields, all text fields are searched
  • Combine with pagination to handle large result sets efficiently

Code Examples

JavaScript

Fetch Collection
// Get 10 courses
fetch('https://api.mockly.codes/courses?count=10')
  .then(res => res.json())
  .then(data => console.log(data));

Python

Fetch with Requests
import requests

response = requests.get(
    'https://api.mockly.codes/courses?count=10'
)
data = response.json()

cURL

Command Line
curl "https://api.mockly.codes/courses?count=10"

Bypass Cache

Get Fresh Data
fetch('https://api.mockly.codes/courses?nocache=true')

Schema Properties

idinteger

Unique identifier for the course

Gen:random_int
titlestring

Course title or name (e.g., Introduction to Web Development, Data Science Fundamentals)

Gen:course_title
descriptionstring

Detailed description of the course content, learning objectives, and what students will learn

Gen:paragraph
instructorstring

Full name of the course instructor or teacher

Gen:name
categorystring

Course category or subject area (e.g., Programming, Business, Design, Science)

Gen:course_category
levelstring

Difficulty level or target audience (e.g., beginner, intermediate, advanced, all-levels)

Gen:course_level
durationinteger

Total course duration in hours

Gen:course_duration
lessonsinteger

Number of lessons or modules in the course

Gen:random_int
enrolledinteger

Total number of students currently enrolled in the course

Gen:random_int
ratingnumber

Average student rating, typically on a scale of 1-5

Gen:rating
pricenumber

Course price or enrollment fee

Gen:price
currencystring

ISO currency code for the course price (e.g., USD, EUR, GBP)

Gen:currency
languagestring

Language code of the course content (e.g., en, es, fr)

Gen:language
certificateboolean

Whether the course offers a certificate upon completion

Gen:boolean
thumbnailstring

URL to the course thumbnail or cover image

Gen:image_urluri
created_atstring

Timestamp when the course was created

Gen:past_datedate-time

Query Parameters

countinteger

Number of items to return (default: 10, max: 100)

seedinteger

Seed for reproducible data generation

nocacheboolean

Bypass cache and generate fresh data on every request