Check IP address reputation

You can use the Spam Shield API to check the reputation of an IP address with a simple query. Using HTTPie and “jq”, try the following:

#!/bin/bash

# Replace this with your API key
SPAM_SHIELD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

http https://api.spamshield.cloud/ip/123.123.123.123 X-ApiKey:${SPAM_SHIELD_API_KEY} | jq .

This returns a JSON response like this:

{
	"ipAddress": "123.123.123.123",
	"country": "CN",
	"isSpammer": false,
	"isHeavySpammer": false,
	"isHacker": false,
	"isHardBlocked": false,
	"reputation": "Neutral",
	"trustedSource": null,
	"queryTime": "2022-06-23 20:19:21.786"
}

Possible values in the trustedSource property are “null”, “Loopback”, “Private”, “Reserved” or some external trusted source such as “Google Services”, “Stripe” and a few others.