Find Free Udemy Courses with Google Sheets and the Udemy API

Learn how to use the Udemy API with Google Apps Script to find free programming courses on Udemy on any topic.

Whether you are looking to learn a programming language, enhance your Microsoft Excel skills, or acquire knowledge in Machine Learning, Udemy probably has a video course for you. Udemy courses are usually affordable, there are no subscription fee and you can learn at your own pace.

Free Udemy Courses on Programming

While most video tutorials on Udemy require payment, the website also offers some of their highly-rated courses for free. I’ve prepared a Google Sheet that lists all the free programming courses currently available on Udemy. The spreadsheet is updated automatically every few hours. You can also access the web version for easy browsing.

Free Udemy Courses ✨ You may use the search function of the browser (Ctrl + F) to find courses for a specific programming language or topic. The courses are sorted by popularity.

There’s no secret sauce. Udemy has an developer API that provides access to all the course data available on the website, including user ratings, number of students who have taken the course, duration, preview video lectures, and more.

Use the Udemy API with Google Sheets

The Udemy API is free to use but requires authentication. You can generate the credentials for your Udemy account and then use the /courses endpoint to fetch the list of free courses.

const parseCourseData_ = (courses) =>
  courses
    .filter(
      ({ is_paid, primary_category }) =>
        is_paid === false && ['Development', 'IT & Software'].includes(primary_category.title)
      // We are primarily interested in programming courses on Udemy
    )
    .map((e) => [
      `=IMAGE("${e.image_240x135}")`,
      `=HYPERLINK("https://www.udemy.com${e.url}";"${e.title}")`,
      e.visible_instructors.map(({ display_name }) => display_name).join(', '),
      e.num_subscribers,
      Math.round(e.avg_rating * 100) / 100,
      e.num_reviews,
      e.content_info_short,
      e.num_lectures,
      new Date(e.last_update_date),
    ]);

const listUdemyCoursesGoneFree = () => {
  // Put your Udemy credentials here
  const CLIENT_ID = '';
  const CLIENT_SECRET = '';

  const params = {
    page: 1,
    page_size: 100,
    is_paid: false,
    'fields[course]': '@all',
  };

  const query = Object.entries(params)
    .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
    .join('&');

  const apiUrl = `https://www.udemy.com/api-2.0/courses/?${query}`;
  const bearer = Utilities.base64Encode(`${CLIENT_ID}:${CLIENT_SECRET}`);
  const options = {
    muteHttpExceptions: true,
    headers: {
      Authorization: `Basic ${bearer}`,
    },
  };

  const courses = [];

  do {
    const response = UrlFetchApp.fetch(apiUrl, options);
    const { results = [], next } = JSON.parse(response);
    courses.push(...parseCourseData_(results));
    url = next;
  } while (url && courses.length < 500);

  const ss = SpreadsheetApp.getActiveSpreadsheet();
  const [sheet] = ss.getSheets();
  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()).clearContent();
  sheet.getRange(2, 1, courses.length, courses[0].length).setValues(courses);
};

We use the UrlFetch service of Google Scripts to fetch the data from the Udemy API and the data is then parsed and inserted into the Google Sheet. The course thumbnail image is rendered using the IMAGE formula and the course title is linked to the Udemy website using the HYPERLINK formula.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.