With the Query endpoint, we provide an easy way to grab the events in your log. By using the Loggr Query Language you can make a single call to get individual events or aggregated data about the events.


GET /logs/{logkey}/query?query={lql}&tz={offset}


// This example returns the text field for last 5 events that were posted 

GET /logs/foo/query?query=GET%20events%20TAKE%205%20SORT%20created%20DESC%20OCCURS(TODAY)%20COLUMNS(text)&tz=-5

You will need to URL encode the actual query for it to work. See the Loggr Query Language page for more details on queries you can use.

The tz parameter specifies the timezone offset. When running queries in the browser, your current timezone offset is automatically set. If ommited it assumes UTC. The example above uses the value -5 which represents EST. The table below shows common values for tz:

Timezone tz Value Type
Japan 9
E Central Africa 2
UTC 0 (default)
US Eastern -5
US Central -6
US Mountain -7
US Pacific -8
Pacific Ocean -11

The query method requires READ authorization, so make sure you are passing an APIKEY that is allowed to read.


If your request does not do any grouping, you will get an array of events back, like:

Status: 200 OK

        "text":"A user was created",

If your request does grouping, you will get an array of aggregate info like below. Notice that the results are for a query that groups by DAY so the key will be a date.

Status: 200 OK