Introduction

Get started with OfCourseMe API and access thousands of online courses.

Endpoint

OfCourseMe API are available calling the endpoint https://api.of-course.me
To use our API you need to make a server-side call on HTTPS protocol with a GET method.

Authentication

The API always need a valid API Key to authenticate the calls: you must set the x-api-key header and pass a valid value.
If you don't own a valid API Key please contact info@of-course.me.

For production purpouses API must be called via server, from IP address pool which should be provided, enabled and trusted by OfCourseMe.

For testing purposes you can call our API from any IP and the call can be performed client-side or server-side.
Switching to production stage, your API Key will be associated with one or more provided IP addresses: any API call coming from a not whitelisted IP will return this error:
{ "message" : "User is not authorized to access this resource with an explicit deny" }

You will always be able to perform client-side API calls using our API Configurator with your API Key, even in production stage.

Subset and exclusive content

Customers might define a subset of our database to be accessible to their employees, i.e. allow their employees to access a portion of courses in our database only.
Customers might also define exclusive content to be accessible to their employees only, i.e. proprietary content which is accessible and searchable together with or on top of public content.

Important notice:
Any action performed through this API will always respect clients subset/exclusive content agreement with us.
Subset and exclusive content are computed and secured by authentication with api-keys and IPs (no action is required by API-user).
Customers might request us to modify their subsets and exclusive content at any time.
This will be handled by OfCourseMe by means of updating customers API-keys subset and exclusive content settings.

Calls to /courses-search endpoint will always respect client subset, returning only courses included in their subset.
Other endpoints will always return attributes related to courses included in their subset.
See endpoints documentation for more information on single endpoint behavior.

User tracking parameters

It is possible, if desired, to identify a single user by appending a "user_id" parameter to your API-calls.
You can use a session id or an internal id (integer/string) to set "user_id" parameter.
Also, if desidered, you could identify a user group, family or entity by appending a "entity_id" parameter to your API-calls.
You can use an internal group, family or entity id (integer/string) to set "entity_id" parameter.
This will help us computing API-usage statistics and metrics by single user and / or by user group / or by user family / or by user entity.
User tracking parameters are optionals.
Here is a basic example about "/courses-search" endpoint.

https://api.of-course.me/courses-search?user_id=USER-ID
The "user_id" parameter is properly set to identify a single user
https://api.of-course.me/courses-search?entity_id=GROUP-ID
The "entity_id" is properly set to identify user group
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=GROUP-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user group
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=FAMILY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user family
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=ENTITY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user entity

Methods

Here are the available methods for our API:

  • /categories returns categories which are related to your subset
  • /courses-search performs a search for courses in our database, limited to your subset
  • /course returns a specific course details, if included in your subset
  • /options returns option values, useful to filter queries and render course detail values (related to your subset)

Endpoint "/categories"


Goal

Endpoint “/categories” is meant to retrieve more details about ALL the categories (topics) associated with at least one course in your subset.
If your subset includes “web development” category but does not include “game design” category, and there is one course about “web development applied to game design” which is in your subset and is associated to both, endpoint “/categories” will retrieve details about both.

Endpoint “/categories” IS NOT meant to retrieve by default details about the categories in your subset ONLY.
If you want to retrieve details about your selected categories only, please use the list of categories in your subset as a filter in your call to the endpoint “/categories”. See details in section “Subset” below.

Description

Call endpoint https://api.of-course.me/categories.

No parameters are needed for this method, but if you want to receive details for a selected categories only then you are allowed to pass the category parameter.

This parameter should be filled with categories ids divided by comma or you'll get the "INVALID-CATEGORIES-IDS-PARAMETER" error.

If you pass a category id which does not correspond to any categories in our database, you'll get a "NO-CATEGORIES-FOUND" error.

You can pass a parameter "lang" (two digit lang code) to get categories in the language needed.
You can obtain available languages quering the "option" endpoint with type "translations_languages" (/options?type=translations_languages)

Response fields

Here are listed all response fields for a single category

  • course_category_id: category id
  • course_category_name: category name
  • course_category_level: category level (0 for parent categories, 1 for subcategories)
  • course_category_parent_id: category parent id (0 for parent categories)
  • course_category_parent_name: category parent name (null for parent categories)
  • course_category_image: OfCourseMe image for this category (subcategories will have same image of their parent)
  • course_category_count: total count of courses associated to this category (parents category counts all courses associtated to their subcategories)

Examples

https://api.of-course.me/categories
Returns all categories related to your subset
https://api.of-course.me/categories?lang=it
Returns all categories related to your subset, translated in italian
https://api.of-course.me/categories?category=119,130
Returns categories which id is 119 and 130

Subset

Learn more about subset and exclusive content

Your calls could be limited by a defined subset of courses based on the categories they are associated with.
Assume your subset defines that you can access only to contents which are related to category "22" ("Web Development").
This means you can retrieve all courses associated to category "22"; It also means you can never retrieve courses associated ONLY to other categories, but you can always retrieve courses related to other categories AND category "22".
Assume also that exist at least a course which is associated to "Web Development" ("22") AND "Programming Languages" ("23"), this course is part of your subset.

This behavior affects also this endpoint.
Calling /categories endpoint with no params will result in ANY category related to courses defined in your subset.
For the same reason, calling /categories endpoint will not necessarily result only in retrieving the categories selected in order to determine your subset.
In this case, your subset is limited only to courses related category "22".
So, calling this endpoint, you will NOT receive only category "22" but ALL categories which are related to courses directly related to category "22".
As we have assumed that exist at least a course which is associated to "Web Development" ("22") AND "Programming Languages" ("23"), this endpont response will include also category "23" as well as other categories related to all courses in category "22".

Note also that parent categories are always returned by this endpoint.
If your subset is defined on a parent category all child categories will be returned by this endpont.
If your subset is defined on a child category, its parent category will be returned by this endpoint.

Should you need to ONLY show category "22" in your platform using this endpoint, you should filter this endpoint using a category parameter.

Important notice:
You can use every category returned by this endpoint in /courses-search category parameter always not exceeding your subset definition.
In this case, if you ask for courses related to category "23" ("Programming Languages"), as your subset defines these courses being related also to category ("22"), you'll get only courses related to category "22" and "23", even not specifying category "22" in your query.
See below examples for more detail.

https://api.of-course.me/categories
As your subset defines that you should see only courses related to category "22" and exist at least one course which is related to category "22" AND category "23",
returns category "22", category "23" and their parent categories
https://api.of-course.me/categories?category=22
Returns category 22

User tracking parameters

It is possible, if desired, to identify a single user by appending a "user_id" parameter to your API-calls.
You can use a session id or an internal id (integer/string) to set "user_id" parameter.
Also, if desidered, you could identify a user group, family or entity by appending a "entity_id" parameter to your API-calls.
You can use an internal group, family or entity id (integer/string) to set "entity_id" parameter.
This will help us computing API-usage statistics and metrics by single user and / or by user group / or by user family / or by user entity.
User tracking parameters are optionals.

https://api.of-course.me/categories?user_id=USER-ID
The "user_id" parameter is properly set to identify a single user
https://api.of-course.me/categories?entity_id=GROUP-ID
The "entity_id" is properly set to identify user group
https://api.of-course.me/categories?user_id=USER-ID&entity_id=GROUP-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user group
https://api.of-course.me/categories?user_id=USER-ID&entity_id=FAMILY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user family
https://api.of-course.me/categories?user_id=USER-ID&entity_id=ENTITY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user entity

Code Examples

For testing purpouse only

  		
$.ajax({
    url: "https://api.of-course.me/categories",
    type: GET,
    headers: {"x-api-key": "**********************************IcAuSy"} // insert your API Key
})
.done(function(response) {
    console.log(response);
})
.fail(function(err) {
    console.log(err);
});
  		
  		
  				
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.of-course.me/categories");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = ['x-api-key: **********************************IcAuSy']; // insert your API Key
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$_output = curl_exec ($ch);

curl_close ($ch);

print $_output ;
  				
  			
			
public static void Main(string[] args) {

// Create a request for the URL.
WebRequest request = WebRequest.Create("https://api.of-course.me/categories");
// Set API KEY
request.Headers.Add("X-Api-Key", "x-api-key: **********************************IcAuSy");
// Get the response.
WebResponse response = request.GetResponse();
// Display the status.
Console.WriteLine (((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer);
// Clean up the streams and the response.
reader.Close();
response.Close();

}

			
		
				
private static void main() throws Exception {

	String site = "https://api.of-course.me/categories";
	URL obj = new URL(site);
	try {
		//make API call
		HttpURLConnection con = (HttpURLConnection) obj.openConnection();
		con.setRequestMethod("GET");
		con.setRequestProperty("X-Api-Key", "**********************************IcAuSy");
		int responseCode = con.getResponseCode();

		//read API response
		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();
		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print API response
		System.out.println(response.toString());

	} catch (Exception ex) {

	}

}
				
			

Endpoint "/courses-search"

Description

Call endpoint: https://api.of-course.me/courses-search

Filters

You can filter down your calls to get a text-search or courses in a category. Here are listed all the parameters you can use to filter your calls, they are all optional:

  • query
    set this parameter to make a text-search. Text-search is performed searching desired term in course title, course subtitle and course associated categories.
  • category (multiple values, comma separated)
    set this parameter to filter your query by category. Pass one or more ID_CATEGORY divided by comma. You can get all the categories id by calling the /categories endpoint
  • language (multiple values, comma separated)
    set this parameter to filter your query by language. Pass one or more language-code divided by comma. You can get all the language-codes (two-character codes) value by calling the /options endpoint
  • platform (multiple values, comma separated)
    set this parameter to filter your query by platform. Pass one or more platform divided by comma. You can get all the platforms value by calling the /options endpoint
  • level (multiple values, comma separated)
    set this parameter to filter you query by level. Pass one or more level divided by comma. Level values are documented in the Key Values chapter.
  • effort (multiple values, comma separated)
    set this parameter to filter you query by effort. Pass one or more effort range divided by comma. Effort range values are documented in the Key Values chapter.
  • price_type (multiple values, comma separated)
    set this parameter to filter your query by price type. Price type values are documented in the Key Values chapter
  • price (multiple values, comma separated)
    set this parameter to filter your query by price ranges. Pass one or more price range divided by comma. Price range values are documented in the Key Values chapter. Price value will be ignored if price_type is set only to free ("F").
  • provider (multiple values contained in double quotes, comma separated)
    set this parameter to filter your query by providers. You can get all providers names by calling the /options endpoint.
    Pass one or more provider name contained in double quotes and comma separated (sintax example, provider:"Amazon","Edx").
    Be aware you must encapsulate each provider name in double quotes and separate them by comma or you will get an "INVALID-PROVIDER-VALUE" error.
    See this examples to understand how to use this filter.
  • course_id (multiple values, comma separated)
    set this parameter to one or more course_id (comma saparated) to get only courses specified.
  • edited_after (UTC timestamp in millisecond. Example 1537793541000)
    set this parameter to filter your query by course edited time. Pass a UTC timestamp in milliseconds to get courses edited in our database after this timestamp (including specified millisecond). This parameter is usefult to obtain only those courses edited in our database since your last request with same parameters.
  • lang (two digit lang code)
    set this parameter to get course categories in the language needed. You can obtain available languages quering the "option" endpoint with type "translations_languages" (/options?type=translations_languages)

Invalid parameters will raise an INVALID-PARAMETER error.

Invalid parameters values will raise an INVALID-<PARAMETER_NAME>-VALUE error.

Pagination

Result set is limited to maximum 30 elements per call.

You need to use start and size parameters to paginate your results:

  • start is the pointer to the starting record in the result set
  • size is the length of the result set.

If you don't pass the start parameter it will be 0 by default.

If you don't pass the size parameter it will be 20 by default.
The maximum value for the size parameter is 30.
If you pass a value over 30, it will be changed to 30 as the result set is limited to a maximum of 30 elements per call.

Sorting

You can pass an order parameter to sort your result set.
Order values are documented in Key Values chapter.
If you don't pass any order, the result set will be sorted by default (relevance based on what you searched) 

Response Fields

Here are listed the response fields for the course:

  • course_id: unique ID of the course
  • course_title: title of the course (string)
  • course_syllabus: syllabus of the course (string). Syllabus is truncated at 140 characters and sanitized removing html tags inside it to give you a preview of the entire text. To obtain entire syllabus you must call single /course endpoint.
  • course_image: small image of the course (url) for listing purpose. In case no image is provided for a given course, we will serve a fallback image related to that course's category
  • course_hosting_platform: hosting platform of the course. Call endpoint /options to understand returned values
  • course_owner: owner of the course (string array)
  • course_provider: provider of the course (string array)
  • course_level: level of the course. See Key Values chapter to understand returned values.
  • course_duration: duration of the course (minutes)
  • course_certificate_available: defines if the course has a certificate available: "Y" (available) / "N" (unavailable)
  • course_pricing_value: cost of the course (dollars)
  • course_pricing_type: type of course pricing. See Key Values chapter to understand returned values.
  • course_active: defines if the course is still available on the hosting platform: "Y" (active), "N" (inactive).
  • course_categories: an array of course categories (object array). Each category object will have these attributes:
    • course_category_id: category id
    • course_category_name: category name
    • course_category_level: category level (0 for parent categories, 1 for subcategories)
    • course_category_parent_id: category parent id (0 for parent categories)
    • course_category_parent_name: category parent name (null for parent categories)
  • search_count: total count of courses matching search's criteria.

Examples

https://api.of-course.me/courses-search?query=Javascript
Returns first 20 (default values for start=0, size=20, ordered by relevance) courses matching "Javascript" term in their title, subtitle or categories.
https://api.of-course.me/courses-search?query=Javascript&lang=it
Returns first 20 (default values for start=0, size=20, ordered by relevance) courses matching "Javascript" term in their title, subtitle or categories. Course categories are translated in italian
https://api.of-course.me/courses-search?query=Javascript&level=1
Returns first 20 courses matching "Javascript" term AND which level is Beginner
https://api.of-course.me/courses-search?query=Javascript&level=1,3
Returns first 20 courses matching "Javascript" term, AND which level is Beginner OR Advanced
https://api.of-course.me/courses-search?query=Javascript&order=ED&start=100&size=10
Returns 10 (size) courses starting from record 100 (start), ordered by effort (descending), matching "Javascript" term
https://api.of-course.me/courses-search?query=Javascript&level=1&platform=1
Returns first 20 courses matching "Javascript" term AND which level is Beginner AND which platform is Coursera
https://api.of-course.me/courses-search?query=Javascript&level=1,3&platform=1,3
Returns first 20 courses matching "Javascript" term, AND which level is Beginner OR Advanced, AND which platform is Coursera OR Udacity
https://api.of-course.me/courses-search?query=Javascript&category=22
Returns first 20 courses matching "Javascript" term which category is Web Development
https://api.of-course.me/courses-search?category=22
Returns first 20 courses which category is "Web Development"
https://api.of-course.me/courses-search?category=22,23
Returns first 20 courses which category is "Web Development" or "Programming Languages"
https://api.of-course.me/courses-search?category=22&effort=1&start=100&size=30
Returns first 30 (size) courses, starting from record 100 (start), which category is "Web Development" and which effort is less than between 20 minutes and 2 hours
https://api.of-course.me/courses-search?level=1
Returns first 20 courses which level is "Beginner"
https://api.of-course.me/courses-search?level=1&effort=2,3
Returns first 20 courses which level is "Beginner" AND which effort is between 2 hours and 10 hours OR between 10 hours and 100 hours
https://api.of-course.me/courses-search?price=1&order=PD
Returns first 20 courses which price is less than 50 dollars, ordered by price descending
https://api.of-course.me/courses-search?price=1,3&order=PD
Returns first 20 courses which price is less than 50 dollars or between 100 and 300 dollars, ordered by price descending
https://api.of-course.me/courses-search?course_id=286226,293406
Returns course which course_id is 286226 or 293406

Provider Filter Examples

https://api.of-course.me/courses-search?provider="Amazon"
Returns first 20 courses which provider is Amazon
https://api.of-course.me/courses-search?provider="Amazon","Edx"
Returns first 20 courses which provider is Amazon OR Edx
https://api.of-course.me/courses-search?provider=Amazon
This call is invalid as provider name is not incapsulated in double quotes
https://api.of-course.me/courses-search?provider="Amazon";"Edx"
This call is invalid as providers names are not comma separated

Subset

Learn more about subset and exclusive content

Your calls could be limited by a defined subset.
Calling this endpoint without any parameter will return you all courses included in your subset.

Assume your subset defines that you can see only courses which are related to category "22" ("Web Development").
This means you can never retrieve courses associated ONLY to other categories, but you can always retrieve courses related to other categories AND category "22".
Assume also that exist at least a course which is associated to "Web Development" ("22") AND "Programming Languages" ("23"), this course is part of your subset.

Assume your subset defines that you can see only courses which are related to platform "3" ("Udacity").
This means you can never retrieve courses associated to other platforms, but only those courses served by Udacity.

Subset could be defined by a combination of multiple parameters.
Assume your subset defines that you can see only courses which are related to category "22" ("Web Development") and platform "3" ("Udacity").
This means you can never retrieve courses associated ONLY to other categories, but you can always retrieve courses related to other categories AND category "22".
It also means that those courses should be served by "Udacity".
Assume that there's at least a course which is associated to "Web Development" ("22") AND "Programming Languages" ("23") served by platform "1" ("Coursera"), this course is not part of your subset.
Assume also that there's at least a course which is associated to "Web Development" ("22") AND "Programming Languages" ("23") served by platform "3", this course is part of your subset.

You should not do anything to limit your subset, as it is automatically computed on your API-key or IP address. See below example for more information

https://api.of-course.me/courses-search
Assume your subset defines that you should see only courses related to category "22" and exist at least one course which is related to category "22" AND another category,
returns all courses directly associated to category "22", courses associated to category "22" AND other categories are included
https://api.of-course.me/courses-search?category=23
Assume your subset defines that you should see only courses related to category "22" and exist only one course which is related to category "22" AND category "23",
returns only the course associated to category "22" AND category "23"
https://api.of-course.me/courses-search
Assume your subset defines that you should see only courses served by platform "3",
returns all courses served by platform "3"
https://api.of-course.me/courses-search?platform=4
Assume your subset defines that you should see only courses served by platform "3",
returns no courses

User tracking parameters

It is possible, if desired, to identify a single user by appending a "user_id" parameter to your API-calls.
You can use a session id or an internal id (integer/string) to set "user_id" parameter.
Also, if desidered, you could identify a user group, family or entity by appending a "entity_id" parameter to your API-calls.
You can use an internal group, family or entity id (integer/string) to set "entity_id" parameter.
This will help us computing API-usage statistics and metrics by single user and / or by user group / or by user family / or by user entity.
User tracking parameters are optionals.

https://api.of-course.me/courses-search?user_id=USER-ID
The "user_id" parameter is properly set to identify a single user
https://api.of-course.me/courses-search?entity_id=GROUP-ID
The "entity_id" is properly set to identify user group
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=GROUP-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user group
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=FAMILY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user family
https://api.of-course.me/courses-search?user_id=USER-ID&entity_id=ENTITY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user entity

Code Examples

For testing purpouse only

  		
$.ajax({
	url: "https://api.of-course.me/courses-search?query=javascript&category=22",
	type: GET,
	headers: {"x-api-key": "**********************************IcAuSy"} // insert your API Key
})
.done(function(response) {
     console.log(response);
})
.fail(function(err) {
     console.log(err);
});
  		
  		
  		
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.of-course.me/courses-search?query=javascript&category=22"");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = ['x-api-key: **********************************IcAuSy']; // insert your API Key
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$_output = curl_exec ($ch);

curl_close ($ch);

print $_output ;
  		
  		
  		
public static void Main(string[] args) {

     // Create a request for the URL.
     WebRequest request = WebRequest.Create("https://api.of-course.me/courses-search?query=javascript&category=22");
     // Set API KEY
     request.Headers.Add("X-Api-Key", "x-api-key: **********************************IcAuSy");
     // Get the response.
     WebResponse response = request.GetResponse();
     // Display the status.
     Console.WriteLine (((HttpWebResponse)response).StatusDescription);
     // Get the stream containing content returned by the server.
     Stream dataStream = response.GetResponseStream();
     // Open the stream using a StreamReader for easy access.
     StreamReader reader = new StreamReader(dataStream);
     // Read the content.
     string responseFromServer = reader.ReadToEnd();
     // Display the content.
     Console.WriteLine(responseFromServer);
     // Clean up the streams and the response.
     reader.Close();
     response.Close();

}

  		
  		
  		
private static void main() throws Exception {

	String site = "https://api.of-course.me/courses-search?query=javascript&category=22";
	URL obj = new URL(site);
	try {
		//make API call
		HttpURLConnection con = (HttpURLConnection) obj.openConnection();
		con.setRequestMethod("GET");
		con.setRequestProperty("X-Api-Key", "**********************************IcAuSy");
		int responseCode = con.getResponseCode();

		//read API response
		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();
		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print API response
		System.out.println(response.toString());

	} catch (Exception ex) {

	}

}
  		
  		

Endpoint "/course"

Description

Call endpoint https://api.of-course.me/course

You must pass the course_id parameter.

This parameter is mandatory to use this endpoint or you'll get the "NO-COURSE-ID-PARAMETER" error.

This parameter should be an integer or you'll get the "INVALID-COURSE-ID-PARAMETER" error.

If you pass a "course_id" which does not correspond to a course in our database, you'll get an "NO-COURSE-FOUND" error.

You can pass a parameter "lang" (two digit lang code) to get course categories in the language needed.
You can obtain available languages quering the "option" endpoint with type "translations_languages" (/options?type=translations_languages)

Response Fields

Here are listed the response fields for the course:

  • course_id: OfCourseMe unique ID of the course
  • course_url: url of the course (string)
  • course_title: title of the course (string)
  • course_sub_title:sub title of the course (string)
  • course_syllabus: syllabus of the course (string)
  • course_image: high resolution image of the course (url). In case no image is provided for a given course, we will serve a fallback image related to that course's category
  • course_hosting_platform: hosting platform of the course. Call endpoint /options to understand returned values
  • course_owner: owner of the course (string array)
  • course_provider: provider of the course (string array)
  • course_duration: duration of the course (minutes)
  • course_languages : languages of the course. Call endpoint /options to understand returned values
  • course_certificate_available: defines if the course has a certificate available: "Y" (available) / "N" (unavailable)
  • course_certificate_pricing_value cost of the certificate if available
  • course_pricing_value: cost of the course (dollars)
  • course_pricing_discounted_value: discounted cost of the course (dollars)
  • course_pricing_type: type of course pricing. See Key Values chapter to understand returned values.
  • course_release_date: release date of the course (date)
  • course_enrollment_deadline
  • course_key_skill_aquired
  • course_avg_salary
  • course_learners_feedback
  • course_number_choose
  • course_number_raccomend
  • course_active: defines if the course is still available on the hosting platform: "Y" (active), "N" (inactive).
  • course_last_import: OfCourseMe last course data import (date)
  • course_categories: an array of course categories (object array). Each category object will have these attributes:
    • course_category_id: category id
    • course_category_name: category name
    • course_category_level: category level (0 for parent categories, 1 for subcategories)
    • course_category_parent_id: category parent id (0 for parent categories)
    • course_category_parent_name: category parent name (null for parent categories)

Examples

https://api.of-course.me/course?course_id=183559
Returns course which id is 183559
https://api.of-course.me/course?course_id=183559&lang=it
Returns course which id is 183559. Course categories are translated in italian

Subset

Learn more about subset and exclusive content

Your calls could be limited by a defined subset.
This endpoint returns you the course only if it is part of your subset.

User tracking parameters

It is possible, if desired, to identify a single user by appending a "user_id" parameter to your API-calls.
You can use a session id or an internal id (integer/string) to set "user_id" parameter.
Also, if desidered, you could identify a user group, family or entity by appending a "entity_id" parameter to your API-calls.
You can use an internal group, family or entity id (integer/string) to set "entity_id" parameter.
This will help us computing API-usage statistics and metrics by single user and / or by user group / or by user family / or by user entity.
User tracking parameters are optionals.

https://api.of-course.me/course?course_id=183559&user_id=USER-ID
The "user_id" parameter is properly set to identify a single user
https://api.of-course.me/course?course_id=183559&entity_id=GROUP-ID
The "entity_id" is properly set to identify user group
https://api.of-course.me/course?course_id=183559&user_id=USER-ID&entity_id=GROUP-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user group
https://api.of-course.me/course?course_id=183559&user_id=USER-ID&entity_id=FAMILY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user family
https://api.of-course.me/course?course_id=183559&user_id=USER-ID&entity_id=ENTITY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user entity

Code Examples

For testing purpouse only

  		
$.ajax({
     url: "https://api.of-course.me/course?course_id=183559",
     type: GET,
     headers: {"x-api-key": "**********************************IcAuSy"} // insert your API Key
})
.done(function(response) {
     console.log(response);
})
.fail(function(err) {
     console.log(err);
});
  		
  		
  		
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.of-course.me/course?course_id=183559"");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = ['x-api-key: **********************************IcAuSy']; // insert your API Key
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$_output = curl_exec ($ch);

curl_close ($ch);

print $_output ;
  		
  		
  		
public static void Main(string[] args) {

     // Create a request for the URL.
     WebRequest request = WebRequest.Create("https://api.of-course.me/course?course_id=183559");
     // Set API KEY
     request.Headers.Add("X-Api-Key", "x-api-key: **********************************IcAuSy");
     // Get the response.
     WebResponse response = request.GetResponse();
     // Display the status.
     Console.WriteLine (((HttpWebResponse)response).StatusDescription);
     // Get the stream containing content returned by the server.
     Stream dataStream = response.GetResponseStream();
     // Open the stream using a StreamReader for easy access.
     StreamReader reader = new StreamReader(dataStream);
     // Read the content.
     string responseFromServer = reader.ReadToEnd();
     // Display the content.
     Console.WriteLine(responseFromServer);
     // Clean up the streams and the response.
     reader.Close();
     response.Close();

}

  		
  		
  		
private static void main() throws Exception {

	String site = "https://api.of-course.me/course?course_id=183559";
	URL obj = new URL(site);
	try {
		//make API call
		HttpURLConnection con = (HttpURLConnection) obj.openConnection();
		con.setRequestMethod("GET");
		con.setRequestProperty("X-Api-Key", "**********************************IcAuSy");
		int responseCode = con.getResponseCode();

		//read API response
		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();
		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print API response
		System.out.println(response.toString());

	} catch (Exception ex) {

	}

}
  		
  		

Endpoint "/options"

Description

Call endpoint https://api.of-course.me/options

This endpoint is useful to:

  • get values which should be passed as parameters to filter "/courses-search" per platform or language
  • get values to understand "/courses-search" or "/course" response field values

To use this endpoint you must pass the type parameter (mandatory).

Set type value to:

  • platforms: endpoint will return all platforms value-label couple
  • providers: endpoint will return all providers allowed values (strings)
  • languages: endpoint will return all the languages (two-character) value for which there is at least one course in the database. Use the Key Values chapter to understand the corresponding language
  • translations_languages: endpoint will return all languages available to translate API content
  • translations: endpoint will return all key-values (see key-values section) translated in language specified by filter lang (default "en"). See this example

If you don't pass a "type" parameter or you pass an invalid value, the API will return an "INVALID-TYPE-PARAMETER" error.

Examples

https://api.of-course.me/options?type=platforms
Returns platforms key-values
https://api.of-course.me/options?type=providers
Returns providers allowed values
https://api.of-course.me/options?type=language
Returns languages key-values

Translations Examples

https://api.of-course.me/options?type=translations_languages
Returns all languages available to translate API content
https://api.of-course.me/options?type=translations
Returns all key-values translated in english by default
https://api.of-course.me/options?type=translations&lang=it
Returns all key-values translated in italian

Subset

Learn more about subset and exclusive content

Your calls could be limited by a defined subset on options basis.
This behavior affects also this endpoint.

Assume your subset defines that you can see only courses which are related to platform "3" ("Udacity").
This means you can never retrieve courses associated to other platforms, but only those courses served by Udacity.
Calling /options?type=platform endpoint with no params will result in ANY platform related to courses defined in your subset.
In this case you will get only platform "3" ("Udacity").

Assume your subset defines that you can see only courses which are provided by provider "Google".
This means you can retrieve all courses provided by "Google".
It also means you can never retrieve courses provided ONLY by other providers, but you can always retrieve courses provided by other providers AND "Google".
Assume also that exist at least a course which is provided by "Google" AND "TED", this course is part of your subset.
For the same reason, calling /options?type=provider endpoint not necessarily will result only in providers which defines the subset.
In this case, your subset is limited only to courses provided by "Google".
So, calling this endpoint, you will NOT receive only "Google" but ALL providers which are related to courses provided by "Google".
As we have assumed that exist at least a course which is provided by "Google" AND "TED", this endpont response will include both providers as well as other providers which are providing courses with "Google".

Important notice:
You can use every option returned by this endpoint in /courses-search parameters always not exceeding your subset definition.
In our last assumption, if you ask for courses related to provider "TED", as your subset defines these courses should be provided also by "Google", you'll get only courses provided by both ("Google" and "TED"), even not specifying provider "Google" in your query.

https://api.of-course.me/options?type=platforms
Assume your subset defines that you should see only courses served by platform "3" (Udacity),
returns only platform "3" (Udacity)
https://api.of-course.me/options?type=providers
Assume your subset defines that you should see only courses provided by "Google" and exist one course provided by both "Google" and "TED",
returns at least both providers "Google" and "TED" (and all other providers which are providing courses with "Google")

User tracking parameters

It is possible, if desired, to identify a single user by appending a "user_id" parameter to your API-calls.
You can use a session id or an internal id (integer/string) to set "user_id" parameter.
Also, if desidered, you could identify a user group, family or entity by appending a "entity_id" parameter to your API-calls.
You can use an internal group, family or entity id (integer/string) to set "entity_id" parameter.
This will help us computing API-usage statistics and metrics by single user and / or by user group / or by user family / or by user entity.
User tracking parameters are optionals.
Here is a basic example about "/courses-search" endpoint.

https://api.of-course.me/options?type=providers&user_id=USER-ID
The "user_id" parameter is properly set to identify a single user
https://api.of-course.me/options?type=providers&entity_id=GROUP-ID
The "entity_id" is properly set to identify user group
https://api.of-course.me/options?type=providers&user_id=USER-ID&entity_id=GROUP-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user group
https://api.of-course.me/options?type=providers&user_id=USER-ID&entity_id=FAMILY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user family
https://api.of-course.me/options?type=providers&user_id=USER-ID&entity_id=ENTITY-ID
The "user_id" parameter is properly set to identify a single user and "entity_id" is properly set to identify user entity

Code Examples

For testing purpouse only

  		
$.ajax({
     url: "https://api.of-course.me/options?type=platforms",
     type: GET,
     headers: {"x-api-key": "**********************************IcAuSy"} // insert your API Key
})
.done(function(response) {
     console.log(response);
})
.fail(function(err) {
     console.log(err);
});
  		
  		
  		
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.of-course.me/options?type=platforms");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = ['x-api-key: **********************************IcAuSy']; // insert your API Key
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$_output = curl_exec ($ch);

curl_close ($ch);

print $_output ;
  		
  		
  		
public static void Main(string[] args) {

     // Create a request for the URL.
     WebRequest request = WebRequest.Create("https://api.of-course.me/options?type=platforms");
     // Set API KEY
     request.Headers.Add("X-Api-Key", "x-api-key: **********************************IcAuSy");
     // Get the response.
     WebResponse response = request.GetResponse();
     // Display the status.
     Console.WriteLine (((HttpWebResponse)response).StatusDescription);
     // Get the stream containing content returned by the server.
     Stream dataStream = response.GetResponseStream();
     // Open the stream using a StreamReader for easy access.
     StreamReader reader = new StreamReader(dataStream);
     // Read the content.
     string responseFromServer = reader.ReadToEnd();
     // Display the content.
     Console.WriteLine(responseFromServer);
     // Clean up the streams and the response.
     reader.Close();
     response.Close();

}

  		
  		
  		
private static void main() throws Exception {

	String site = "https://api.of-course.me/options?type=platforms";
	URL obj = new URL(site);
	try {
		//make API call
		HttpURLConnection con = (HttpURLConnection) obj.openConnection();
		con.setRequestMethod("GET");
		con.setRequestProperty("X-Api-Key", "**********************************IcAuSy");
		int responseCode = con.getResponseCode();

		//read API response
		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();
		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		//print API response
		System.out.println(response.toString());

	} catch (Exception ex) {

	}

}

  		
  		

Key-values

Here is a list of all key-values to understand each field or parameter involved in the previously described API methods

You can obtain key-values via "options" endpoint with type "translations" filtered by lang desidered (see "options" endpoint)

Level

  • 1 = Beginner
  • 2 = Intermediate
  • 3 = Advanced

Effort

  • 0 = <20m (between 1 and 19 minutes)
  • 1 = >20m and <= 2h (between 20 and 119 minutes)
  • 2 = >2h and <= 10h (between 120 and 600 minutes)
  • 3 = >10h and <= 100h (between 600 and 6000 minutes)
  • 4 = >100h (>6000 minutes)

Price Type

  • F = Free
  • 1 = Single Course
  • 2 = Subscription 

Price

  • 1 = Between 0 to 49 Dollars
  • 2 = Between 50 to 100 Dollars
  • 3 = Between 100 to 300 Dollars
  • 4 = >301 Dollars

Order

  • EA = Effort Ascendant
  • ED = Effort Descendent
  • PA = Price Ascendant
  • PD = Price Descendent

Language Codes

Here is a list of all two digit codes for each language to understand the language field/parameter involved in this API

CODE

LANGUAGE

ab

Abkhazian

aa

Afar

af

Afrikaans

ak

Akan

sq

Albanian

am

Amharic

ar

Arabic

an

Aragonese

hy

Armenian

as

Assamese

av

Avaric

ae

Avestan

ay

Aymara

az

Azerbaijani

bm

Bambara

ba

Bashkir

eu

Basque

be

Belarusian

bn

Bengali

bh

Bihari languages

bi

Bislama

bs

Bosnian

br

Breton

bg

Bulgarian

my

Burmese

ca

Catalan Valencian

km

Central Khmer

ch

Chamorro

ce

Chechen

ny

Chichewa Chewa Nyanja

zh

Chinese

cu

Church Slavonic Old Bulgarian Old Church Slavonic

cv

Chuvash

kw

Cornish

co

Corsican

cr

Cree

hr

Croatian

cs

Czech

da

Danish

dv

Divehi Dhivehi Maldivian

nl

Dutch

dz

Dzongkha

en

English

eo

Esperanto

et

Estonian

ee

Ewe

fo

Faroese

fj

Fijian

fi

Finnish

fr

French

ff

Fulah

gd

Gaelic Scottish Gaelic

gl

Galician

lg

Ganda

ka

Georgian

de

German

ki

Gikuyu Kikuyu

el

Greek

kl

Greenlandic Kalaallisut

gn

Guarani

gu

Gujarati

ht

Haitian Haitian Creole

ha

Hausa

he

Hebrew

hz

Herero

hi

Hindi

ho

Hiri Motu

hu

Hungarian

is

Icelandic

io

Ido

ig

Igbo

id

Indonesian

ia

Interlingua (International Auxiliary Language Association)

ie

Interlingue

iu

Inuktitut

ik

Inupiaq

ga

Irish

it

Italian

ja

Japanese

jv

Javanese

kn

Kannada

kr

Kanuri

ks

Kashmiri

kk

Kazakh

rw

Kinyarwanda

kv

Komi

kg

Kongo

ko

Korean

kj

Kwanyama Kuanyama

ku

Kurdish

ky

Kyrgyz

lo

Lao

la

Latin

lv

Latvian

lb

Letzeburgesch Luxembourgish

li

Limburgish Limburgan Limburger

ln

Lingala

lt

Lithuanian

lu

Luba-Katanga

mk

Macedonian

mg

Malagasy

ms

Malay

ml

Malayalam

mt

Maltese

gv

Manx

mi

Maori

mr

Marathi

mh

Marshallese

ro

Romanian

mn

Mongolian

na

Nauru

nv

Navajo Navaho

nd

Northern Ndebele

ng

Ndonga

ne

Nepali

se

Northern Sami

no

Norwegian

nb

Norwegian Bokmål

nn

Norwegian Nynorsk

ii

Nuosu Sichuan Yi

oc

Occitan (post 1500)

oj

Ojibwa

or

Oriya

om

Oromo

os

Ossetian Ossetic

pi

Pali

pa

Panjabi Punjabi

ps

Pashto Pushto

fa

Persian

pl

Polish

pt

Portuguese

qu

Quechua

rm

Romansh

rn

Rundi

ru

Russian

sm

Samoan

sg

Sango

sa

Sanskrit

sc

Sardinian

sr

Serbian

sn

Shona

sd

Sindhi

si

Sinhala Sinhalese

sk

Slovak

sl

Slovenian

so

Somali

st

Sotho Southern

nr

South Ndebele

es

Spanish

su

Sundanese

sw

Swahili

ss

Swati

sv

Swedish

tl

Tagalog

ty

Tahitian

tg

Tajik

ta

Tamil

tt

Tatar

te

Telugu

th

Thai

bo

Tibetan

ti

Tigrinya

to

Tonga (Tonga Islands)

ts

Tsonga

tn

Tswana

tr

Turkish

tk

Turkmen

tw

Twi

ug

Uighur Uyghur

uk

Ukrainian

ur

Urdu

uz

Uzbek

ve

Venda

vi

Vietnamese

vo

Volap_k

wa

Walloon

cy

Welsh

fy

Western Frisian

wo

Wolof

xh

Xhosa

yi

Yiddish

yo

Yoruba

za

Zhuang Chuang

zu

Zulu


API Configurator

You can use OfCourseMe API configurator to test out API Calls.

API configurator provides a simple UI which helps to perform an api, call passing paramters needed and obtaining JS/PHP code which can be integrated in your systems.
Please note that client scripting API calls (Ajax Call via Javascript, for example) are for testing purpose only and they will be disabled once in production: you must develop your production code integration with server side languages or it will not work.

Clich here to use API configurator