Skip to main content
API v2 is the recommended version of the Greip API. It uses the same dashboard API key and billing as v1, but different base URLs, routes, authentication rules, and JSON shapes. You can run v1 and v2 in parallel while you migrate endpoint by endpoint.
Use the version switcher at the top of these docs to compare API v2 (default) with API v1 (Legacy) reference pages side by side.

Base URL

All v2 endpoint URLs in the API Reference use the v2 host.

Authentication

Send the same key from your dashboard:
See Authentication for key safety practices.

Request shape

Shared query options (params, lang, format, mode, callback, source, user_id) behave like v1 unless noted on the v2 endpoint page. See Customize response modules and Development environment.

Response envelope

Success and error wrappers differ. Update any code that checks response.status === "success". v2 success example:
v2 error example:
Error codes and types are the same across versions. See Error codes.

Geo and IP lookup data (largest schema change)

v1 returns a flat object (countryCode, continentName, ipType, optional modules at the top level). v2 returns nested objects: Security module (query params=security, response key security): Bulk IP lookup: v2 data is an object whose keys are IP strings; each value has the same shape as a single IP lookup. Free Get-IP: v2 GET /ip returns data.ip metadata (no auth). See the Free Get-IP page.

Scoring and validation endpoints

Use the matching v2 API Reference page for full request and response property lists.

Endpoint map (v1 path to v2)

Migration checklist

1

Pick an endpoint

Start with read-only traffic (for example GeoIP or IP lookup) before payment or deletion APIs.
2

Change base URL and path

Point requests to https://v2.greipapi.com and the v2 path from the table above or API Reference.
3

Move authentication to Bearer

Remove key from query strings and JSON bodies for v2 calls.
4

Use mode=test

Set mode=test while you update parsers; v2 returns deterministic sample data in test mode like v1.
5

Update response parsing

Check success instead of status, read execution_ms, and map nested data fields (geo/security/scoring).
6

Ship gradually

Run v1 and v2 in parallel per route, compare responses in staging, then cut over and remove v1 calls.

What stays the same

  • Same Greip account, API key, plans, usage limits, and custom rules behavior for equivalent endpoints.
  • Same error codes and types (only the success wrapper field name changes on v2).
  • Response formats (JSON, XML, CSV, Newline) and JSONP callback where supported on the endpoint.

Need help?