Skip to main content
GET
/
api
/
v2
/
stats
/
usage
Usage
curl --request GET \
  --url https://{search_zone}-api.doofinder.com/api/v2/stats/usage \
  --header 'Authorization: <api-key>'
{
  "results": [
    {
      "count": 12,
      "timestamp": 1581120000000
    }
  ],
  "total": 1,
  "total_count": 12
}

Authorizations

Authorization
string
header
required

Doofinder API key. Pass it as: Authorization: Token <api_key>

Query Parameters

from
string
required

Start date of the period in the format of UNIX timestamp or YYYYMMDD.

Pattern: ^20\d{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$|^\d{10}|^\d{13}$
to
string
required

End date of the period in the format of UNIX timestamp or YYYYMMDD.

Pattern: ^20\d{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$|^\d{10}$|^\d{13}
hashids
string[]

Unique id of the search engine. It accepts an array of values. If you want to work with all user search engines just don't send this parameter. Arrays parameters must be in the format param[]=value.

Pattern: ^[a-f0-9]{32}$
hashid
string[]
Pattern: ^[a-f0-9]{32}$
account_code
string

The account code to filter by.

aggregate
boolean
default:true

Flag to indicate when to aggregate all Search Engines stats data.

type
enum<string>

Filter usage by the given type, query_counters for requests to search API, and api_counters for requests to management API. You can also filter by product or obtain everything with all. If no type is provided it filters by search.

Available options:
api_counters,
query_counters,
recommendations_counters,
visual_counters,
quiz_counters,
category_page_counters,
search,
quizzes,
recommendations,
assistant_counters,
all
format
enum<string>
default:json

Indicates which response format should be used

Available options:
json,
csv

Response

Stats retrieved.

Stats counter with timestamp.

total
integer

Sum of all elements retrieved.

Example:

1

total_count
integer

Total sum of all elements count. If element does not have a "count", this has the same value as total.

Example:

12

results
object[]