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: Pull Wikipedia API Data into Sheets

For this example, we'll pull in the most viewed Wikipedia articles in December, 2022. Where it says your_contact_info, enter your email address or the URL to a contact page. While this request will work without including it, Wikipedia requests that you set a unique User-Agent that allows them to contact you quickly.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URL
    • Headers:
      • User-Agentyour_contact_info
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run.

Part 2: More Example API URLs

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

  • Fetch a random Wikipedia article:
  • 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

Part 3: API Documentation

Official API documentation:

Pageview analytics documentation:

Leave a Comment

Jump To