apyhub
GEOLOCATION · SECURITY & PRIVACY

Score IP Risk API

What it does

IP Risk Score checks an IP address and returns a heuristic risk assessment based on ASN type and country. Send an ip query value and get back the IP, ASN, ASN description, ASN country code, a risk_score from 0 to 100, a risk_level of low, medium, or high, and any flags the service identifies.

Use it when you need a quick signal for login protection, abuse detection, fraud screening, or bot filtering. The response is compact and easy to feed into allow/deny rules, step-up verification flows, or internal triage dashboards.

Because the score is heuristic, it’s best used as one input alongside your own behavioral checks and account history. The returned ASN fields help you understand why an address was scored the way it was, without adding extra lookup steps.

IP Risk Score fits workflows where you need to evaluate traffic in real time and make an immediate decision from a single IP lookup.

GET
Heuristic risk score for an IP based on ASN type and country
http://localhost:8080/dosvak/ip-risk-score
QUICKSTARTGUIDE

Quickstart

Look up the risk score for a single IP address by passing it as a query parameter.

curl -X GET "http://localhost:8080/dosvak/ip-risk-score?ip=8.8.8.8" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with these top-level fields: ip (string), asn (string or null), flags (array of string), risk_level (string enum: low, medium, or high), risk_score (integer from 0 to 100), asn_description (string or null), and asn_country_code (string).

{
  "ip": "8.8.8.8",
  "asn": "AS15169",
  "flags": ["dns"],
  "risk_level": "low",
  "risk_score": 12,
  "asn_description": "Google LLC",
  "asn_country_code": "US"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns a heuristic risk assessment for an IP address based on ASN type and country. You provide an ip query parameter, and the response includes the IP plus risk-related fields such as risk_level and risk_score.

Query Parameter(s)

AttributeTypeMandatoryDescription
ipStringYesThe IP address to evaluate.

Response

Returns a JSON object with ip, asn, flags, risk_level, risk_score, asn_description, and asn_country_code fields. risk_level is an enum with values low, medium, or high, and risk_score is an integer from 0 to 100.

ParameterTypeMandatoryDescription
ipStringNoThe IP address evaluated.
asnStringNoThe ASN associated with the IP. Nullable.
flagsString ArrayNoA list of string flags associated with the risk assessment.
risk_levelENUMNoThe risk level. Allowed values: low, medium, high.
risk_scoreIntegerNoThe numeric risk score. Minimum 0, maximum 100.
asn_descriptionStringNoDescription of the ASN. Nullable.
asn_country_codeStringNoThe ASN country code.

Query parameters

Name
Type
Description
ipREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.