A Django REST Framework (DRF) project that provides free Udemy courses with coupon details. This API allows developers to integrate free educational content into their applications, websites, or bots.
- Features
- API Endpoints
- Authentication
- Setup Instructions
- Usage Examples
- Dashboard
- Rate Limits
- Contact
If you’re looking to explore free Udemy courses rather than using the API, visit the Explore Page. Alternatively, you can use the UdemyBot to get notified whenever courses you're interested in become available.
- Real-time Coupon Updates: Access the latest free Udemy courses
- Detailed Course Information: Get comprehensive course details including ratings, student count, and content length
- Custom Token Authentication: Secure API access with custom tokens
- User Activity Tracking: Monitor API usage with detailed analytics
- Web Dashboard: Visualize your API usage and available coupons
- Course Search: Find specific courses by title or description(in '/explore' endpoint)
Endpoint | Method | Description | Authentication |
---|---|---|---|
/api/courses/ |
GET | Fetch a list of free Udemy courses | Required |
/api/courses/<id>/ |
GET | Get details for a specific course | Required |
All API requests require authentication using a custom token:
token: your_api_token
To obtain your token:
- Register for an account on the platform
- Log in to your account
- Your API token will be displayed on the home page
- Python 3.8+
1️⃣ Clone the repository:
git clone https://github.com/sualh1999/Free-Udemy-Coupon-API.git
cd free-udemy-api
2️⃣ Install dependencies:
pip install -r requirements.txt
3️⃣ Apply migrations:
python manage.py migrate
4️⃣ Run the development server:
python manage.py runserver
import requests
url = "https://your-api-domain.com/api/courses/"
headers = {"token": "your_api_token"}
response = requests.get(url, headers=headers)
courses = response.json()
for course in courses['results']:
print(f"Course: {course['title']}")
print(f"Link: {course['link']}?couponCode={course['coupon']['coupon_str']}")
print("---")
fetch('https://your-api-domain.com/api/courses/', {
headers: {
'token': 'your_api_token'
}
})
.then(response => response.json())
.then(data => {
data.results.forEach(course => {
console.log(`Course: ${course.title}`);
console.log(`Link: ${course.link}?couponCode=${course.coupon.coupon_str}`);
console.log('---');
});
});
The API includes a web dashboard that provides:
- Visual analytics of your API usage
- Number of active coupons
- Total request count
- Historical usage data
Access the dashboard at /dashboard
after logging in.
To ensure fair usage, the API implements rate limiting. If you exceed the limit, you'll receive a response with a Retry-After
header indicating when you can resume making requests.
Want to contribute to this project? We welcome contributions of all kinds! Whether you're fixing bugs, improving documentation, or proposing new features, your help is appreciated.
- Optimize HTML templates to reduce the HTML percentage in the repository (currently >65%), as GitHub is classifying this as an HTML project rather than Python/Django
- Add more API endpoints for filtering courses by category
- Improve test coverage
Have questions or need support? Reach out via Telegram: @huam3