Key/sites activity

An endpoint to keep track of the sites that are using your Akismet API key.

https://rest.akismet.com/1.2/key-sites

All parameters can be passed via the GET or POST methods.

Required parameters

api_key
Your Akismet API key. You can find this on your account dashboard at https://akismet.com/account/

Optional parameters

month
The month for which you would like to get the report (e.g. 2022‑09). Defaults to the current month.

filter
Filter results by site URL or partial site URL.

For example, a filter of “domain.tld” will return activity for all sites with “domain.tld” in their URL.

format
The format in which you would like the results to be returned.

order
The column by which you would like the results to be sorted.

  • total (default): Total number of API calls (spam + ham).
  • spam: Order by the number of spam caught.
  • ham: Order by the number of non‑spam let through.
  • missed_spam: Order by the number of reported missed spam.
  • false_positives: Order by the number of reported false positives.

limit
The maximum number of results returned in the report (defaults to 500).

offset
The offset of the results returned in the report (defaults to 0).

PHP example

$data = file_get_contents( 'https://rest.akismet.com/1.2/key-sites?api_key=123YourAPIKey&month=2022-09&format=csv' );
 
var_dump( $data );

Sample results (json)

{
    "2022-09":[
        {
            "site":"site6735.domain.tld",
            "api_calls":"2072",
            "spam":"2069",
            "ham":"3",
            "missed_spam":"0",
            "false_positives":"4",
            "is_revoked":false
        },{
            "site":"site4748.domain.tld",
            "api_calls":"1633",
            "spam":"3",
            "ham":"1630",
            "missed_spam":"0",
            "false_positives":"0",
            "is_revoked":true
        }
    ],
    "limit": 10,
    "offset": 0,
    "total": 2
}

Sample results (csv)

Active sites for 123YourAPIKey during 2022-09 (limit:10, offset: 0, total: 4)
Site,Total API Calls,Spam,Ham,Missed Spam,False Positives,Is Revoked
site6735.domain.tld,14446,33,13,0,9,false
site3026.domain.tld,8677,101,6,0,0,false
site3737.domain.tld,4230,65,5,2,0,true
site5653.domain.tld,2921,30,1,2,6,false

Results keys

site
The hostname of the site querying the API using your API key.

api_calls
The total number of API calls (spam + ham) the site has placed in the queried month.

spam
The number of times Akismet returned true for spam in the queried month.

ham
The number of times Akismet returned false for spam in the queried month.

missed_spam
The number of missed spam reports submitted by the site in the queried month.

false_positives
The number of false positive reports submitted by the site in the queried month.

is_revoked
Indicates if the site has been revoked from using your API key, or not.

limit
The maximum number of results returned in the report. Can be set using the limit parameter.

offset
The offset of the results returned in the report. Can be set using the offset parameter.

total
The total number of sites using the API key in the queried month.

We’re here to help

If you ever get stuck or need help troubleshooting something, please don’t hesitate to contact us.