API Connector Documentation
What is a GET Request?
Contents
- What is a GET Request?
- GET Request Example
- GET Request Limitations
- How to Run GET Requests in API Connector?
What is a GET Request?
As the name suggests, GET
requests are a type of request method used for getting data from a server. You might use GET
requests to fetch stock prices, get flight status, look up the weather in a location, and so on.
This method can only be used for retrieving data, it can't change data or otherwise affect data on the server. However, you do still send data in a GET
request. That data is sent to the server in a request URL, and tells the server what type of response to send back.
Once the server receives the URL and processes the request, it sends back the response.
GET Request Example
The most common example of a GET
request would be the method you used to find this web page. Entering a URL into your web browser produces a GET
request, where the response is the HTML that gets processed and displayed by your web browser.
If you open the Developer Tools console on your browser (F12 on Windows/Linux or option + ⌘ + J on OSX) and click Network, you can see all the GET
requests being made as you navigate around the web. As you can see, while the URL is the only part you see in your browser, the full GET
request is made up of the Request URL, the Request Method, and the Request Headers.
GET Request Limitations
GET
requests are subject to a few limitations:
- Because all information is passed in the URL, parameters may be stored in your browser history or logged by the server. This means
GET
requests are not as secure as other methods (for this reason many APIs pass API keys in request headers instead of in the URL) - Maximum URL length is 2048 characters, which may become an issue for requests that require a lot of parameters. For this reason, some APIs require
POST
instead ofGET
for fetching data, as request bodies don't have this length limitation. - Can not be used to change data on a server. This makes
GET
requests less flexible, but also means they are perfectly safe in the sense that they will never make changes to an existing data store.
How to Run GET Requests in API Connector
To run a GET
request in API Connector (and most other no-code API clients), open the Request Method dropdown and select GET
.
Then enter your API request URL (if you just want to try it out, here's a list of interesting request URLs that don't require authentication), and hit Run to see the data in your sheet.