IPRout

IP geolocation API code examples

Choose a language or runtime to call the caller IP and explicit IP endpoints with secret-safe authentication, request timeouts, HTTP error checks, and JSON response parsing.

Last updated August 14, 2026

Languages & Runtimes

Use standard or widely adopted HTTP clients from command-line tools and application runtimes.

cURL

Authenticated IP lookup using cURL command line, including usage, testing, timeout, and error handling.

View tutorial →

JavaScript

Authenticated IP lookup using JavaScript fetch, including usage, testing, timeout, and error handling.

View tutorial →

TypeScript

Authenticated IP lookup using typed TypeScript fetch, including usage, testing, timeout, and error handling.

View tutorial →

Node.js

Authenticated IP lookup using Node.js built-in fetch, including usage, testing, timeout, and error handling.

View tutorial →

Python

Authenticated IP lookup using Python requests, including usage, testing, timeout, and error handling.

View tutorial →

PHP

Authenticated IP lookup using PHP cURL, including usage, testing, timeout, and error handling.

View tutorial →

Go

Authenticated IP lookup using Go net/http, including usage, testing, timeout, and error handling.

View tutorial →

Java

Authenticated IP lookup using Java HttpClient, including usage, testing, timeout, and error handling.

View tutorial →

C# and .NET

Authenticated IP lookup using .NET HttpClient, including usage, testing, timeout, and error handling.

View tutorial →

Ruby

Authenticated IP lookup using Ruby Net::HTTP, including usage, testing, timeout, and error handling.

View tutorial →

Rust

Authenticated IP lookup using Rust reqwest, including usage, testing, timeout, and error handling.

View tutorial →

Swift

Authenticated IP lookup using Swift URLSession, including usage, testing, timeout, and error handling.

View tutorial →

Kotlin

Authenticated IP lookup using Kotlin Java HTTP client, including usage, testing, timeout, and error handling.

View tutorial →

Deno

Authenticated IP lookup using Deno fetch, including usage, testing, timeout, and error handling.

View tutorial →

Frameworks & Server Integrations

Keep IPRout credentials server-side inside common web frameworks and maintained client libraries.