API Connector Documentation
What is an API URL?
Contents
What is an API URL?
As you probably already know, a URL is what you see in the address bar of your browser, e.g. https://mixedanalytics.com/api-connector/
When you type that URL into your browser, you're making a request to our servers, which respond by showing you the content of our website.
An API URL is exactly the same! However, instead of sending back a website, the application server will send you back an API response.
How is an API URL structured?
An API URL is structured exactly like a "regular" website URL, but the naming conventions are a bit different, and they typically adhere to a stricter organizational logic. There are 3 parts to an API URL:
- The base URL. The base URL is the initial part of the API URL. Typically all API requests to that API will use the same base URL. For example, Stripe's base URL is
https://api.stripe.com/v1/
- The endpoint. The endpoint identifies which resource you want to access. For example, Stripe has endpoints for
/balance
,/charges
,/customers
, and so on. - Query parameters. Query parameters come after an initial question mark, and are generally used to filter or customize the API request. For example, Stripe's API supports including
?limit=100
to fetch 100 records. (Note: not all API URLs use query parameters; some APIs don't allow customized queries, or customize the request via the request body instead).
The full API URL will combine these 3 segments into a complete URL, e.g. https://api.stripe.com/v1/charges?limit=100
https://api.stripe.com/v1/charges?limit=100&after=123456
How to find API Request URLs?
To find your API request URL, you'll need to check the API documentation for your API of interest.
For example, here's the API documentation for the CryptingUp API. It shows the base URL right at the top:
Below that they clearly show the endpoints and any available parameters:
Depending on the API's complexity and the strength of its documentation, available endpoints and parameters may be more or less easy to discover, but everything you need should be right there in the docs.
How to use the API Request URL?
The API request URL is the basic building block of any modern API, so most coding languages will have a method (or plugin) that allows you to construct API requests and input your API URL.
For example, you're using your terminal, you can include the URL as a curl command, e.g. curl -X GET "https://store.myshopify.com/admin/api/2023-10/orders.json?status=any" \
-H "X-Shopify-Access-Token: {access_token}"
If you're using a no-code tool like Postman or API Connector for Sheets, you can copy and paste the API URL into the request URL field, like this:
From where I will get API request URL?
You can generally find API request URLs in each website's documentation, as shown here. You can also find directories and lists of APIs online, e.g. here.
Hi, I want an api url from my Spotify premium account, which is the right address ?
That depends on what kind of data you're trying to fetch. You can see this article for information on connecting to Spotify.