Spam API - Reverse New Zealand Developer Tools

« Back to the developer index

The Spam API

The spam API allows you to make your own decisions as to whether a number is spammy or not. Our results include our spam score, total number of complaints, complaints within the last 6 and 12 months, and a time-stamp of the last complaint we have found or received.


Spam Score

We are actively collecting complaints we find about phone numbers from all around in internet. Every time we find a complaint we dupe check it against our database and note down the time of the complaint. We then use a simple algorithm based on the frequency of complaints over time to calculate our spam score. The higher a spam score, the more complaints we have found recently. The algorithm we use is as follows: (min(10, total_complaints)/20*100) + (min(10, complaints_last_12_months)/40*100) + (min(10, complaints_last_6_months)/40*100). This gives a score from 0 to 100, with any 10 complaints always resulting in a score of at least 50, and requiring at least 10 complaints in the last six months to score a 100.

The request to our API is a standard HTTP GET request as follows:

http://api.reversenewzealand.com/spamlookup.php?format=FORMAT&key=APIKEY&q=PHONE

Parameters

format (required)

valid options are json, xml, text

key (required)

32 characters long, provided when you join the developer program

q (required)

valid New Zealand phone number


Example Query Results

Text

http://api.reversenewzealand.com/spamlookup.php?format=text&key=EXAMPLE&q=0280905401
result (tab separated)
(02) 8090 5401 \t 32 \t 2 \t 1 \t 5 \t 1288249200

JSON

http://api.reversenewzealand.com/spamlookup.php?format=json&key=EXAMPLE&q=0280905401
result
{"phone":"(02) 8090 5401","score":32,"lastYear":2,"last6Months":1,"total":5,"lastComplaint":1288249200}

XML

http://api.reversenewzealand.com/spamlookup.php?format=xml&key=EXAMPLE&q=0280905401
result
<?xml version="1.0" encoding="iso-8859-1"?><record><phone>(02) 8090 5401</phone><score>32</score><lastYear>2</lastYear><last6Months>1</last6Months><total>5</total><lastComplaint>1288249200</lastComplaint></record>


API Support

Please contact support@reversenewzealand.com if you are having trouble implementing our API