Import Torn API Data to Google Sheets
In this guide, we’ll walk through how to pull player and market data from the Torn API directly into Google Sheets, using the API Connector add-on.
We'll first get an API key from Torn, and then set up a request to pull in information from Torn to your spreadsheet.
- Before You Begin
- Part 1: Get your Torn API Key
- Part 2: Pull Torn Data into Sheets
- Part 3: Notes
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your Torn API Key
- While logged into Torn, click the Account icon in the top right corner, and then Settings
- From here click API Keys > +Create New Key
- You'll be prompted to name your key and select the level of access you'd like it to have. This page shows which access level corresponds to which data points. Click Add
- Your key is ready! Copy it and keep it safe, we'll use it shortly.
Part 2: Pull Torn Data into Sheets
To use your key, append it to the end of your API request. Here's a complete request configuration example.
- Request URL:
The whole request should look like this:
Part 3: Notes
By default, some of the Torn API's endpoints will return data that gets parsed into separate columns. You can select API Connector's grid report style for a more compact output with fewer columns.
Part 4: API Documentation
Official API documentation: https://www.torn.com/api.html
The Torn API is divided into categories for User, Property, Faction, Company, Market, and Torn. You can retrieve data from any of these categories by entering the associated URL into API Connector.
In the documentation, click the Try It! button for a convenient way to construct and try out requests directly in the browser. That way you can simply copy and paste their auto-created URLs into the API Connector request URL field.