Skip to documentation
Developer documentationAPI v1.0.0OpenAPI ↓
DocsDeveloper tools

Developer tools

Server-side code examples

Copy small, dependency-light request examples for cURL, Node.js, Python and PHP.

API 1.0.0Contract reviewed 9 Nov 2026

Runtime requirements#

LanguageRequirements
cURLA shell and cURL. Keep the API key in an environment variable.
Node.jsA server-side Node runtime with built-in fetch and AbortSignal.timeout; use an ES module or wrap the example in an async function.
PythonPython 3 standard library: json, os and urllib.
PHPPHP with cURL and JSON support.

IP lookup examples#

cURL example
curl --request POST 'https://api.lookupnest.com/api/v1/lookup/ip' \
  --header "x-api-key: $LOOKUPNEST_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Origin: https://app.example.com' \
  --data '{"ip":"203.0.113.42"}'

Email lookup examples#

cURL example
curl --request POST 'https://api.lookupnest.com/api/v1/lookup/email' \
  --header "x-api-key: $LOOKUPNEST_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Origin: https://app.example.com' \
  --data '{"email":"[email protected]"}'

Response parsing and logs#

Do not hard-code the illustrative IP response into your application. Check the documented nested structure and handle missing fields. For email, the published response schema is incomplete: use the field guide as an observation, not a required-field guarantee.

Examples do not retry automatically, print secrets, or log the full customer input. They are request examples, not official language SDK packages.

Need help with this integration?

Contact developer support ↗