Skip to main content
Use AvraAPI::location() to resolve one permitted IP address. The Location service has one released operation and returns ApiResponse.
Use AvraAPI::location()->withPrivacyMode()->lookupIp('IP_ADDRESS') for the shared one-request privacy control. It sends X-Privacy-Mode: 1 only for the next request, then clears automatically. The existing privacyMode: true argument remains supported.

Look up an IP address

lookupIp(string $ip, bool $privacyMode = false): ApiResponse accepts IPv4 or IPv6 text. The optional privacyMode: true argument remains available; use withPrivacyMode() immediately before the call for a consistent style. SDK function
Copy the SDK call
Resolve an IP address in a Laravel service

Response

Every result field can be null when the selected provider has no matching data. Privacy Mode does not anonymise the request. See the REST API guide for the privacy guarantee.

Select a configured provider for one request

Every provider service inherits withProvider(string $providerCode): static. It sets X-Provider-Override for the next request only, then the SDK clears the override. Use it only with a provider configured for the project environment.
Optional provider selection
meta.provider_override reports the requested hint; it does not guarantee that every returned field originated from that provider.

Use the result safely

Keep Location calls in backend Laravel code and process only IP addresses you are permitted to use. Do not treat country, city, network, or coordinates as identity proof. See Look up an IP address for the request, result fields, and error contract. For SDK failures, use the typed exception pattern in Laravel Overview and setup.
Last modified on October 1, 2026