Docs

SDKs

Official, thin SDKs that wrap the /v1/check endpoint with typed responses. Prefer plain HTTP? The API is just one GET — see the quickstart.

Install

npm install @geoq/sdk
pip install geoq
go get github.com/Evercay/geoq-go

Usage

import { GeoQ } from "@geoq/sdk";

const geoq = new GeoQ(process.env.GEOQ_API_KEY);
const r = await geoq.check("8.8.8.8");

console.log(r.risk.score, r.risk.reasons);
if (r.signals.is_datacenter) {
  console.log("hosting:", r.signals.datacenter_provider);
}
from geoq import GeoQ

geoq = GeoQ(api_key="geoq_live_***")
r = geoq.check("8.8.8.8")

print(r.risk.score, r.risk.reasons)
if r.signals.is_tor:
    require_step_up()
package main

import (
    "fmt"
    "github.com/Evercay/geoq-go"
)

func main() {
    c := geoq.New("geoq_live_***")
    r, err := c.Check("8.8.8.8")
    if err != nil { panic(err) }
    fmt.Println(r.Risk.Score, r.Risk.Reasons)
}

Source

All SDKs are open source under the Evercay/geoq organisation. Issues and PRs welcome. The JavaScript package is published on npm.

Conventions

  • Each SDK reads GEOQ_API_KEY from the environment if you don't pass a key explicitly.
  • Network and 5xx errors are retried with exponential backoff (configurable).
  • 429 responses surface the reset time so you can back off until quota refreshes.