Import Udemy Data to Google Sheets

In this guide, we’ll walk through how to pull course data from the Udemy API directly into Google Sheets, using the API Connector add-on for Sheets.

We'll first get some credentials from Udemy, and then set up a request to pull in data to your spreadsheet.


Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Udemy API Credentials

  1. Log in to your Udemy account and click your account icon in the top right, then API Clients from the left sidebar (or click to go there directly).
  2. Click Request Affiliate API Client
  3. You'll be asked to provide some information about how you'll use their API data. Fill it out with the relevant details and click Save.
  4. You will need to wait a day or so to be approved. Once you receive your approval email, click back into the API Client section, and you should now see your authentication details. Pay attention to the client ID and secret as we'll need those next.

Part 2: Create Your API Request

Udemy requires that we encode our client ID and secret using Basic Auth. To speed things up a little, let's import a cURL snippet. This will set up the whole request in one go, and take care of encoding your credentials for you.

  1. Copy the following snippet to your clipboard
  2. Click Extensions > API Connector > Import / Export > Import cURL and paste in that snippet. It should look like this. Don't hit import just yet.
  3. Now substitute in your client ID and client secret (leave the colon separator between them). Click Import and you'll see the request appear in the API Connector sidebar.
  4. One last step: the API response from Udemy is pretty nested, which can cause issues with rows not lining up. As a simple solution, I suggest choosing the "concatenate" report style.
  5. Click Run and you'll see a list of 100 Music courses from Udemy, sorted by review count.
  6. Of course you can go back and edit this request to get the categories or search terms you're interested in. This page contains a handy request builder you can use to check out different parameters:

Part 3: Handle Pagination

By default, Udemy only returns a maximum of 100 records. To get more you need to navigate through their next page URLs. In API Connector you can set up automatic pagination handling as follows:

  • URL: set up your URL as usual, including the page_size=100 parameter
  • Pagination type: next page URL
  • Next page path: next
  • Run until: choose when to stop fetching data

Part 4: API Documentation

Official API documentation:

3 thoughts on “Import Udemy Data to Google Sheets”

  1. Have you tried this lately? I stopped getting results and found if I added a "?search=@all" I could get results again. However, I keep getting the same results from page one over and over again. My search should bet 1200 results and no matter what search parameters I add, I get 360 unless my limited bring my results below 360 results. I can't find a forum or a help desk to report my issue.

    • Hey Tracy, you're right, their API seems totally broken. I tested it in their own request builder and got the same results as you (zero results without adding search=@all, and pagination links not working). I sent their support a message explaining the issue, hopefully they'll take a look and address it.
      Update: they responded saying "Our team has been alerted and is currently working on a solution."


Leave a Comment

Jump To