Documentation

Geography Distribution API

The Geography Distribution API allows you to input a domain and receive traffic share per country.


    Parameters


    Params Description
    Domain Enter your target domain including only the top-level and second-level names, ie: "cnn.com", "edition.cnn.com"
    Start Month (start_date) Start Month (YYYY-MM)
    End Month (end_date) End Month (YYYY-MM)
    Main Domain (main_domain_only) True /False
    True returns data for main domain only
    False returns data for subdomains as well.
    UserKey (api_key) Enter your unique API Key


    Example: Geography Distribution API input for "facebook.com"

    
    https://api.similarweb.com/v1/website/facebook.com/Geo/traffic-by-country?api_key={UserKey}&start_date=2016-01&end_date=2016-04&main_domain_only=false
    

    Example: Geography Distribution API output in JSON for "facebook.com"

     
    records": [
    
        {
            "country": 840,
            "share": 0.16355368831749706,
            "visits": 10698219046.146748,
            "pages_per_visit": 14.583127543862661,
            "average_time": 993.08791909675028,
            "bounce_rate": 0.15266768596331448,
            "rank": 2
        },
        {
            "country": 76,
            "share": 0.077637909801039892,
            "visits": 5078377466.63431,
            "pages_per_visit": 19.263436895561707,
            "average_time": 1369.6213758742676,
            "bounce_rate": 0.1671650266293066,
            "rank": 2
        },
        {
            "country": 826,
            "share": 0.041056000085212117,
            "visits": 2685516215.4312,
            "pages_per_visit": 16.158560574734857,
            "average_time": 1107.3851596647642,
            "bounce_rate": 0.15796088932053848,
            "rank": 2
        },
        {
            "country": 250,
            "share": 0.039112845533289448,
            "visits": 2558412429.2015018,
            "pages_per_visit": 15.799547412040724,
            "average_time": 1045.9930731070785,
            "bounce_rate": 0.13378605986501477,
            "rank": 2
        },
      ... 
    }