The Fasterize API allows you to retrieve the access logs of your account for the last seven days in JSON or Apache format.


You will find the API token on your dashboard and the identifier of your configuration in the dashboard URL of your configuration.


The URL of the Access Log API is https://api.fasterize.com/v1/configs/ $ config_id / logs .


The extraction window is 15 minutes by default.

Setting


There are various optional parameters:


  • from : seconds since the unix era
  • to : seconds since unix time
  • domain : list of targeted domains
  • onlySeoVisit : filter visitor logs from a search engine (Google, Bing, Baidu, Yandex)
  • onlySearchBot : filters logs from search engine bot traffic (Google, Bing, Baidu, Yandex)
  • format:  json or apache


API request example


# Retrieve the logs of the last fifteen minutes 

curl "https://api.fasterize.com/v1/configs/ $ config_id / logs" -H "Authorization: $ myApiToken "


# Récupérer les logs de la veille

from=$(date -d "yesterday 00:00:00" '+%s')

to=$(date -d "yesterday 23:59:59" '+%s')

curl "https://api.fasterize.com/v1/configs/${configID}/logs?from=${from}&to=${to}" -H"Authorization:${token}"


Response format


Each log consists of the following fields:

  • client_ip (IPv4 address of the client),
  • content_length
  • content_type
  • domain
  • fstrz_flags (see the list of fields )
  • method
  • protocol
  • referer
  • response_time (in msec)
  • status
  • timestamp
  • url
  • user_agent
  • user_agent_class (mobile / desktop_recent / tablet / bot / old)

Example:


{
  "client_ip":"217.167.19.73",
  "content_length":40945,
  "content_type":"text/html;charset=UTF-8",
  "domain":"www.nocibe.fr",
  "fstrz_flags":"o",
  "method":"GET",
  "protocol":"http",
  "referer":"",
  "request_id":"42024b74-f79f-4173-91b5-c2c9f236c57d",
  "response_time":1.552,
  "status":"200",
  "timestamp":"2017-04-10T15:38:18.830Z",
  "url":"/giorgio-armani-si-gel-douche-p-206477",
  "user_agent":"Screaming Frog SEO Spider/7.2","user_agent_class":"desktop_recent"
}


Apache Combined Log Format


The Apache log format used is the combined format:


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""


This format is the only one supported by SEO analysis tools such as Screaming Frog Log Analyzer.