Search API Connector Documentation


Import Wikipedia Data to Google Sheets

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


Before You Begin

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

Part 1: Create Your API Request URL

We’ll first pull in information about a random Wikipedia article, then show how to extend this to other API requests.

  • Base URL:
  • Endpoint: /page/random/summary

Putting it together, we get the full API Request URL:

Part 2: Pull Wikipedia API Data into Sheets

Now let’s enter that URL into API Connector.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create screen, enter the Request URL we just created
  3. Leave OAuth set to None.
  4. Under Headers, enter a key-value pair like this:

    While this request will work without including a header, Wikipedia’s global API rules request that you set a unique User-Agent that allows them to contact you quickly. You may use an Email address or the URL to a contact page, like this:

  5. Create a new tab and click Set current to use that tab as your data destination.
  6. Name your request and click Run. A moment later you’ll see information about a random article populate your Google Sheet. If you’d like more random articles, switch to Append mode, and hit Run several times.wikipedia-img3

Part 3: More Example API URLs

Experiment with endpoints as described in the documentation here. If you just want to get started, you can try out the following requests, one at a time:

  • Get metadata and an abstract about a specific page:
  • List of births on a specific day:
  • Pageviews per day for in April 2020 for the Wikipedia article on Tiger King
  • Top 1000 articles in March, 2020 (Tip: switch to the Compact report style to avoid timing out):

The article Create API Request Based on a Cell describes how you can point to a cell to dynamically change the date or endpoint in the URL, which can be very convenient for constructing requests.

Part 4: API Documentation

Official API documentation:

Pageview analytics documentation:

Previous Import Webflow Data to Google Sheets
Next Import WooCommerce Data to Google Sheets

Leave a Comment

Table of Contents