---
title: "Making requests"
slug: "making-requests"
updated: 2026-05-19T09:53:48Z
published: 2026-05-19T09:53:48Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Making requests

This page contains general information that you might need, when making requests to Supermetrics API.

- [Authentication](/v1-api/apidocs/making-requests#authentication)
- [GET method](/v1-api/apidocs/making-requests#get-method)
- [Pretty JSON](/v1-api/apidocs/making-requests#pretty-json)
- [CORS support](/v1-api/apidocs/making-requests#cors-support)
- [Postman examples](/v1-api/apidocs/making-requests#postman-examples)

## Authentication

All endpoints that require authentication, accept either an [api_key](/v1-api/apidocs/managing-your-api-keys) parameter, or an Authorization header. Read more about [authentication](/v1-api/apidocs/authentication).

```plaintext
Authorization: Bearer <your api key>
```

## GET method

When the endpoint supports the GET method, you can choose to either use the traditional GET query parameters, as defined in [RFC 1738](http://www.faqs.org/rfcs/rfc1738.html), or a JSON string representing the query parameters, sent as the json parameter.

The documentation shows examples mostly with the latter approach.

Example:

```plaintext
GET /enterprise/v2/query/data/json?json={
  "api_key": "<api key>",
  "ds_id": "GAWA",
  "ds_accounts": "567890",
  "start_date": "2024-01-01",
  "end_date": "today",
  "fields": "date, impressions",
  "settings": {"no_headers": true},
  "filter": "impressions > 0 AND impressions < 100",
  "order_rows": "impressions desc,date desc",
  "max_rows": 1000
} HTTP/1.1
Host: api.supermetrics.com
Accept: */*
Accept-Encoding: gzip,deflate)

@fancy_anchor({"id": "post-method"})
#### POST method

When endpoint supports the _POST_ method, you either choose to send the request body 
as POST fields with content type _application/x-www-form-urlencoded_, or as a JSON 
string with content type _application/json_.

###### Example

@fancy_endpoint_example(
POST /enterprise/v2/query/data/json HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: api.supermetrics.com
Accept: */*
Accept-Encoding: gzip,deflate
Authorization: Bearer <your api key>

{
  "ds_id": "GAWA",
  "ds_accounts": "567890",
  "start_date": "2024-01-01",
  "end_date": "today",
  "fields": "date, impressions",
  "settings": {"no_headers": true},
  "filter": "impressions > 0 AND impressions < 100",
  "order_rows": "impressions desc,date desc",
  "max_rows": 1000
}
```

## Pretty JSON

URL query parameter pretty can be used to pretty-print JSON responses in a human-readable format. Please note that this also increases the response size, and it should not be used for automated requests.

```plaintext
GET /enterprise/v2/query/data/json?json={...}&pretty=true
```

## CORS support

Currently, we discourage making authenticated requests to Supermetrics API from browser applications, as they are likely to expose credentials to end users. Therefore, we do not accept [cross-origin HTTP requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) by default. Please [contact us](/v1-api/apidocs/support) if this behaviour is vital to your integration.

## Postman examples

The following Postman collection contains request examples for Supermetrics API endpoints. You can either download the file and import it into Postman, or have Postman import it from the URL the link below points to. See Postman's documentation on how to [import collections](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-data-into-postman).

[](https://cdn.document360.io/a13cead5-eaae-456f-9bd1-0941d590c0e3/Images/Documentation/supermetrics_api_postman_20221004.json)supermetrics_api_postman_2022100429.08 KB[**](https://cdn.document360.io/a13cead5-eaae-456f-9bd1-0941d590c0e3/Images/Documentation/supermetrics_api_postman_20221004.json)

> [!NOTE]
> Please remember to enter your API key into your Postman variables, and to add suitable parameter values to the requests, before running them.
