Web-Stat API

get your stats programmatically in XML

You can now access your traffic stats and visitors details programmatically in XML format. There are two main access points:

  1. Stats summary: will generate an XML file with, for each day that traffic has been measured:
    • the number of total visits
    • the number of repeat visits
    • the number of first time visits
    • the number of bounces
    • the number of page views
    • the number of conversions 1, 2, 3, 4 and 5

    Usage: generate the file in real-time by going to http://www.web-stat.com/XMLstats.htm?key=API_key

    Your API key is available from the Settings Panel

    Example XML file

  2. Visitors details: will generate an XML file containing the details of your recent visitors. For each visit you will get:
    • visit ID
    • timestamp of entrance
    • URL, page name and page group of entrance page
    • full click-path (timestamp, URL, page name, and page group of any subsequent page views during the session)
    • IP
    • number of visits by this visitor
    • referrer (if any)
    • keywords (if any)
    • user agent
    • screen size
    • screen color

    Usage: generate the file in real-time by going to http://www.web-stat.com/XMLdetails.htm?key=API_key

    Your API key is available from the Settings Panel


    • Time period: you can have the file list only visitors during a certain time period by adding time_min and time_max parameters to the URL: http://www.web-stat.com/XMLdetails.htm?key=API_key&time_min=timeMin&time_max=timeMax

      Both timeMin and timeMax must be in the format YYYY-MM-DD HH:MM:SS

      Example: http://www.web-stat.com/XMLdetails.htm?key=API_key&time_min=2012-11-08 03:16:57&time_max=2012-11-08 06:16:57

    • IP: you can have the file list only visitors connecting from a certain IP by adding an ip parameter to the URL: http://www.web-stat.com/XMLdetails.htm?key=API_key&ip=IP

      Example: http://www.web-stat.com/XMLdetails.htm?key=API_key&ip=

    • Limit length of file: you can have the file list only the last N visitors by adding the n_lines parameter to the URL: http://www.web-stat.com/XMLdetails.htm?key=API_key&n_lines=N

      Example: http://www.web-stat.com/XMLdetails.htm?key=API_key&n_lines=100

      Note that the n_lines parameter will not be taken in consideration if used in conjonction with an IP or a time range parameter. It needs to be used alone.

    Example XML file