Skip to Main Content
Performance

Get Web Performance Data for Any WebSite via A Simple JSON API

 

Access Web Performance Data for Any Website via JSON APIYottaa is all about web performance. We monitor thousands of websites and collect their performance data into our database (currently adding a whopping amount of web performance monitoring data as much as 370GB per day). As an open web performance archive, we actually have an unpublished API that has been in operation for 8 months. In response to various user demands, I’m posting information about this API now.

Note this post does not guarantee that this API will not change. Actually, it will change for sure. We also ask people do not abuse this API by calling it millions of times per day. If you are going to use this API in your application, please get in touch with us via http://support.yottaa.com. Otherwise we will not be able to notify you for API changes.

 

How to access the API?

Really simple. If you add “.json” to the URL of the Yottaa website performance assessment report for your site, you will get all the data in that report returned as a JSON document.

For example, the public web performance assessment report for consumer car review website www.edmunds.com is
http://www.yottaa.com/url/www-edmunds-com-4c767868d235ec7b84000006, see screen shot below:

Edmunds.com Web Performance Report

If you simply add the “.json” extension to that URL, you will get the URL for the JSON API:
http://www.yottaa.com/url/www-edmunds-com-4c767868d235ec7b84000006.json (click this URL and you will see the returned JSON data). When you issue an HTTP REST call to this URL, you will get the JSON data back.

JSON Web Performance Data Example

The following is an example of returned JSON data for www.google.com:

{
    "mca_errors":{},
    "page_load":{
        "new_alerts":0,
        "locations":{
          "aws-us-west":[
                ["time_to_title",146],
                    ["time_to_display",228],
                    ["first_paint",394],
                    ["time_to_interact",515]
                   ],
         "aws-ap-southeast":[
        ["time_to_title",210],
                ["time_to_display",339],
                ["first_paint",559],
                ["time_to_interact",1402]
              ],
         "aws-eu-west":[
                ["time_to_title",241],
                ["time_to_display",353],
                ["first_paint",511],
                ["time_to_interact",780]
              ],
        "aws-us-east":[
                ["time_to_title",116],
                ["time_to_display",137],
                ["first_paint",398],
                ["time_to_interact",543]
               ]
        },
      "score":907
    },
 "yottaa_score":{
        "percentile_rank":"yottaarific",
        "values":[
        [1301097600000,100],
            [1301184000000,100],
            [1301270400000,99],
            [1301356800000,100],
            [1301443200000,97],
            //Additional data points omitted here.
            //Manually formatting JSON is no fun.
            [1303689600000,95]
          ],
    "percentage":99,
    "average":59,
    "score":100
},
"timestamp":1301228163,
"reachability":{
        "new_alerts":0,
         "locations":{
             "aws-us-west":[
                    ["connection",6],
                ["first_byte",66],
                    ["last_byte",81]
                ],
             "aws-ap-southeast":[
                    ["connection",7],
                    ["first_byte",104],
                    ["last_byte",108]
               ],
            "aws-eu-west":[
                    [ "connection", 3],
            ["first_byte",12],
                    ["last_byte",14]
                   ],
             "aws-us-east":[
            ["connection",6],
                    ["first_byte",49],
                    ["last_byte",53]
                ],
         "linode-eu-west-linux":[
                ["connection",3],
                    ["first_byte",22],
                    ["last_byte",23]
               ]
            },
        "score":36
   },
"optimization":{
    "new_alerts":0,
    "poor_scores":[
            ["yexternal",0],
            ["yexpires",78],
            ["ycompress",81]
            ],
    "score":94,
    "good_scores":[
            ["yimgnoscale",100],
            ["yxhrmethod",100],
            ["ydns",100]
            ],
    "yesterday_score":93
    },
"url":"http://www.google.com",
"complexity":{
    "new_alerts":0,
    "assets":{
        "html":{
            "uncompressweight":12521,
            "breakdown":3,
            "weight":9518
            },
        "css":{
            "uncompressweight":0,
            "breakdown":0,
            "weight":0
            },
        "images":{
            "uncompressweight":7330,
            "breakdown":2,
            "weight":7329
            },
        "javascript":{
            "uncompressweight":62989,
            "breakdown":1,
            "weight":63004
            },
        "other":{
            "uncompressweight":0,
            "breakdown":0,
            "weight":0
            },
        "flash":{
            "uncompressweight":0,
            "breakdown":0,
            "weight":0
            }
        },
    "overall":{
        "dom_elements":86,
        "assets":6,
        "domains":2,
        "page_size":79851
        },
    "score":79851
    },
"groups":[
    "yottaa_score",
    "reachability",
    "page_load",
    "optimization",
    "complexity",
    "percentile_rank",
    "mca_errors"
    ]
}

JSON Format for Web Performance Data

As shown in the above example, the returned JSON document contains web performance monitoring data from Yottaa for this website. The data are organized in the following groups:

  • yottaa_score: this section contains the Yottaa Score for this site and the percentile ranking of this site;
  • page_load: This section reports the key timing data for page load: Time to Title, Time to First Paint, Time to Display and Time to Interact, as well as the locations where the samples were measured from.
  • reachability: this section reports the connection time, first byte time and last byte time for connecting to the website from different locations.
  • optimization: the YSlow assessment information for this URL.
  • complexity: the content complexity of this webpage, including the size of different types of content (HTML, Javascript, CSS, Flash, Image…) and the number of DOM elements, number of Javascript files, etc.
  • mca_errors: if there is an error in web performance data collection, it will be reported here.
  • url: the URL of the web page being tested
  • timestamp:The time stamp when the data sample is collected.

Edmunds-com-performance-Page-load-reachability-complexity-yslowThe data correspond to the visual UI display, as shown in the screen shot here. If you have questions about what a certain snippet means, take a look at the visual report and you should be able to figure it out. If you have more questions, please get in touch with us at our support website.

The returned JSON data will evolve. For example, right now we only report data from 4-5 locations for page load timing, but we report 8 to 9 locations for global reachability. We will also add data measured from various browsers and connectivity options in the future.

Another change will come is that we’ll add an API key to the usage of this API in the future so that we can prevent API abuse.  Let us know if you have suggestions or recommendations in terms of how to make this API more useful and valuable, as we are continuously improving our system, via our support forum at http://support.yottaa.com.



Yottaa Ebook How to Identify 10 Performance Problems in 10 Seconds Download

 

Don’t let slow site performance cost you conversions.Let's Talk