Skip to main content
GET
/
user-sites
Get User Sites
curl --request GET \
  --url https://api.adgreg.com/user-sites \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.adgreg.com/user-sites"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.adgreg.com/user-sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.adgreg.com/user-sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.adgreg.com/user-sites"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.adgreg.com/user-sites")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.adgreg.com/user-sites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "page": 123,
  "sites": 123,
  "page_size": 123,
  "page_count": 123,
  "response": [
    {
      "website": "<string>",
      "website_id": 123,
      "api_websites": [
        {
          "adnetwork": "<string>",
          "site_id": "<string>",
          "website_name": "<string>"
        }
      ]
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
Returns the websites you have configured in the website connector in your Adgreg dashboard. Each item in the response contains one Adgreg website with the list of adnetwork site IDs linked to it.
The website_id values returned here are Adgreg-issued IDs. Use them when querying statistics — Adgreg will automatically resolve which adnetwork sites belong to that website.

Authorizations

X-API-Key
string
header
required

Query Parameters

ad_network
enum<string> | null
Available options:
exoclick,
trafficstars,
kadam,
clickadilla,
onclicka,
twinred,
trafficshop,
hilltop
site_id
integer | null
page
integer
default:1
Required range: x >= 1
page_size
integer
default:100
Required range: 10 <= x <= 100

Response

Successful Response

page
integer
required
sites
integer
required
page_size
integer
required
page_count
integer
required
response
UserSiteItem · object[]
required