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
- Part 1: Pull Wikipedia API Data into Sheets
- Part 2: More Example API URLs
- Part 3: API Documentation
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.
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form enter the following:
- Request URL:
- Create a new tab and click Set current to use that tab as your data destination.
- 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: https://en.wikipedia.org/api/rest_v1/
Pageview analytics documentation: https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageviews