Search API Connector Documentation
Create a Custom Request
In this article, we’ll walk through how to create a custom request using the API Connector add-on for Google Sheets.
Contents
- Before You Begin
- Step 1: Open the Sidebar
- Step 2: Add a New Request
- Step 3: Choose Custom Application
- Step 4: Enter a Request URL
- Step 5: Set a Destination Sheet
- Step 6: Choose Output Options
- Step 7: Edit Fields
- Step 8: Name and Run
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Step 1: Open the Sidebar
After installing the plugin in Google Sheets, click Extensions > API Connector > Open
Step 2: Add a New Request
Once the sidebar opens, click Create request to start a new request.

Step 3: Choose Custom Application
Make sure Custom is selected in the Application menu.
Step 4: Enter a Request URL
Enter a request URL. Available request URLs should be provided by your application’s API documentation. For example, enter this URL to fetch data about Radiohead from the iTunes API:
https://itunes.apple.com/search?term=radiohead

Each application’s API documentation will also tell you whether authentication is required, and, if so, how to apply it. Typically authentication is applied by including a query string parameter in the URL, including a key-value pair as a header, or by logging into the target site (i.e. OAuth).
Step 5: Set a Destination Sheet
Set where you’d like to send the response data. Type in a sheet name or click Set current to set the destination to your currently focused cell.
Step 6: Choose Output Options
(optional) Click the Output options button and customize your request. Options include setting the output mode to overwrite vs. append, choosing a report style, and more.
Step 7: Edit Fields
(optional) Click the Edit Fields button to preview your request. This will bring up a preview window where you can map fields to specific columns and choose which fields to display in your sheet.
For more information on the visual field editor, see here: Edit Fields
Step 8: Name and Run
Give your request a name and click Run. You should see the response data from your API request in your sheet.
Questions?
Please leave a comment below, contact support, or leave a message in the API Connector user community. You’ll receive a response shortly.
hello there.
I’m using an API in a site called Bling. I’m trying to get all my products on google sheets.
The resquest runs without any error, but it only gets the first 100 products (1st page on the system website)
There is something I can do about it?
Thanks!
Hi Urian, API Connector displays all records returned from the API. Most likely your API limits the number of records in a single response (this is called “pagination”). There’s some info on this in the troubleshooting documentation, but basically you need to check Bling’s API documentation for how to receive additional records. There’s probably some query string you need to adjust to receive the next 100.
Thank tou very much!
I will check that =]
How does it works with GraphQL API?
When you work with GraphQL APIs, you add parameters to a “query” query string (documentation). For example if we’re pulling from the Countries GraphQL API, the graphQL query looks like this:
You can run this in API Connector like this:
1) Add that whole block into your sheet, say cell A1 of sheet called Input
2) Now in cell A2, add the following formula: =ENCODEURL(A1). This will encode the whole query so we can add it to the end of the URL.
3) Now in API Connector, enter the following API Request URL: https://countries.trevorblades.com/?query=+++Input!A2+++
4) Click Run and you’ll see the results populate your sheet.
Do I need to create each API URL or is there somewhere they are listed?
You need to create them based on the API documentation provided by each website or platform.
Thanks, so no-one has compiled a fully created list yet that you know of?
There are a few API directories, e.g. https://apilist.fun/ and https://github.com/public-apis/public-apis.
Thank you for this, this was so useful.
When I run my request, no matter the configuration, it only produces maximum 26 rows of data – significantly less than there actually are in Facebook. Could you please help? Thank you!
By default Facebook limits the number of results in a single response as described here: https://developers.facebook.com/docs/graph-api/using-graph-api/#paging. To get more records, you can page through the results as described and/or add ‘&limit=1000’ (or some other number) to the end of your URL.
Thank you – this did the trick.
i use the Url: https://www.simcompanies.com/api/v2/players/1689309/buildings/11386268/sales-orders/
the results isnt a table.
try with json2table, everything goes right.
When I try that URL I get a
{"message": "Building not found"}
error, so I can’t really say much about this.I tried one of their other URLs (https://www.simcompanies.com/api/v1/market-ticker/2022-02-24T09:04:24.196Z/) and it seemed to work fine.
Have you tried a different report style? Or if you can share the JSON I can take a look and see what’s happening.
ah thanks, U are right. I found the problem. This Url is not outgoing, must be opened by myself with the account.
How can i import the Api which is private.
[{"id": 6229102, "datetime": "2022-02-22T12:45:25.827083+00:00", "searchCost": 27832, "resources": [{"amount": 3, "price": 86851, "kind": {"name": "\u8c6a\u534e\u98de\u673a", "image": "images/resources/private-jet.png", "db_letter": 96, "transportation": 1000, "retailable": true, "research": false}}, {"amount": 1, "price": 61265, "kind": {"name": "\u4eba\u9020\u536b\u661f", "image": "images/resources/satellite.png", "db_letter": 99, "transportation": 10, "retailable": true, "research": false}}], "qualityBonus": 1.78, "speedBonus": 0}, {"id": 6229104, "datetime": "2022-02-22T12:45:26.188100+00:00", "searchCost": 27832, "resources": [{"amount": 2, "price": 229334, "kind": {"name": "\u55b7\u6c14\u5ba2\u673a", "image": "images/resources/jumbojet2.png", "db_letter": 95, "transportation": 2000, "retailable": true, "research": false}}, {"amount": 2, "price": 62710, "kind": {"name": "\u4eba\u9020\u536b\u661f", "image": "images/resources/satellite.png", "db_letter": 99, "transportation": 10, "retailable": true, "research": false}}], "qualityBonus": 1.68, "speedBonus": 0}]
Normally APIs provide an API key for APIs that are private. If this API doesn’t provide an API key then there wouldn’t be a way to access the data through Sheets, since it runs in a sandbox separate from the browser. Is there any documentation you can check?
the url is not public*
How does this work with Wise?
Hey Matt, their documentation says that this API only allows access through OAuth for approved partners. So unfortunately you can’t set up your own custom OAuth connection as with other APIs. I’ll look into applying and getting access for Mixed Analytics so we can add this to our list of preset connections in the future.
Hello,
I am trying to pull data, but I do not know if the code I have is compatible with your API conector.
Here is the code :
(from https://developer.rentalsunited.com/?xml#list-reservations)
[UserName]
[Password]
2013-08-17 14:00:00
2013-08-17 14:20:00
0
I don’t think this will work as we only enable sending JSON in request bodies, while it looks like this API requires an XML request body. Sorry for the inconvenience, will look into adding support for this in the future!
Thank you for the quick answer
Hello,
is it possible to get the request url from a field in the sheet rather than typing it in every time?
Sure, you can use cells in your request like this:
+++Sheet1!A1+++
Please check this article for more info: https://mixedanalytics.com/knowledge-base/api-connector-create-api-request-based-on-cell/
Hi,
I am trying to fetch freshdesk tickets, however, showing a 401 error that credentials invalid. Freshdesk is logged in but with company’s common Microsoft account, however, I am using my gmail account.
How to solve this?
Response:
We received an error from freshdesk.com (401)
{“code”:”invalid_credentials”,”message”:”You have to be logged in to perform this action.”}
You don’t actually have to be logged in to Freshdesk to use their API, so I think this is just a poor error message. The real problem is shown in the “code” value, which shows you have entered invalid credentials. Please doublecheck the token you’ve entered in the Headers section, and make sure you’ve correctly encoded it as shown here.
Hi I am trying to connect my mortgage software system API to google sheets to create KPI’s. I don’t see anywhere to enter my API Key?
Usually you include your API key in the URL or as a Header, but it could be in the request body. There’s no generic input field for API keys, since every API is different. The API’s documentation will tell you where to include it. If you can share the name of the API, I’ll be happy to check it out for you and give you more specific instructions.
Hi,
I want to get monthly matomo data automatically importet per API.
The API is working but I don´t get my data set automatically for the last month.
Are there any ideas how to get it working. Thank a lot in advanced.
The export url looks like this:
module=API&format=CSV&idSite=1&period=month&date=2022-07-01&method=Actions.getPageUrls&flat=1&translateColumnNames=1&language=de&token_auth=xxxxxxxxx&filter_limit=-1&convertToUnicode=0
Hi there, sorry, I didn’t totally understand the question. Are you getting the wrong data when you run your request, or are you asking how to get your data automatically?
If you want to run requests automatically, you can set up scheduling as shown in this article: https://mixedanalytics.com/knowledge-base/api-connector-scheduling/. Let me know if that answers your question, or please elaborate further and I’ll be happy to answer here.