Skip to main content

Traffic Analytics by Countries

Shows the traffic usage details based on country.

Parameters

Parameter

Type

Required

Description

user_key

string

Yes

API User Token

user_secret

string

Yes

API User Secret Token

from

string

Yes

Y-m-d date format.

to

string

Yes

Y-m-d date format.

type

string

No

stream or progressive. Default null

zone_ids

array

No

Int value(s).

Return Values

Variable

Type

country

string

code

string

hit

int

traffic

float

bandwidth

float

timezone

string

Example PHP Code

CODE
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.medianova.com/v1/report/country",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example Output

CODE
{
   "status":true,
   "data":{
      "TURKEY":{
         "country":"TURKEY",
         "code":"TR",
         "hit":111916121,
         "traffic":9070884895856,
         "bandwidth":839896750,
         "timezone":"GMT+3"
      },
      "TURKMENISTAN":{
         "country":"TURKMENISTAN",
         "code":"TM",
         "hit":31716,
         "traffic":1062105864,
         "bandwidth":98343,
         "timezone":"GMT+3"
      },
      "UKRAINE":{
         "country":"UKRAINE",
         "code":"UA",
         "hit":187669,
         "traffic":4606814168,
         "bandwidth":426557,
         "timezone":"GMT+3"
      },
      "UNITED ARAB EMIRATES":{
         "country":"UNITED ARAB EMIRATES",
         "code":"AE",
         "hit":154114,
         "traffic":8752634532,
         "bandwidth":810429,
         "timezone":"GMT+3"
      },
      "UNITED KINGDOM":{
         "country":"UNITED KINGDOM",
         "code":"GB",
         "hit":1137756,
         "traffic":28447635717,
         "bandwidth":2634040,
         "timezone":"GMT+3"
      },
      "UNITED STATES":{
         "country":"UNITED STATES",
         "code":"US",
         "hit":6288941,
         "traffic":182864831598,
         "bandwidth":16931929,
         "timezone":"GMT+3"
      },
      "URUGUAY":{
         "country":"URUGUAY",
         "code":"UY",
         "hit":390,
         "traffic":5098012,
         "bandwidth":472,
         "timezone":"GMT+3"
      }
   }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.