Component Registry Create your component

Discover and integrate high-quality WebAssembly components to elevate your Edgee projects.

Learn more about the component registry in our documentation.

Geolocation

Geolocation

1.0.1

This component will activate a simple and efficient geolocation endpoint that provides visitor location information through a REST API endpoint. This component allows developers to easily retrieve IP-based geolocation data for their users.

Key Features

  • Real-time geolocation data
  • JSON response format
  • CORS enabled
  • No caching (fresh data every request)
  • Simple integration
  • Customizable endpoint path

API Response Structure

{
    "continent": "string",    // Continent name
    "country_name": "string", // Full country name
    "country_code": "string", // ISO 3166-1 alpha-2 country code
    "region": "string",       // Region/state name
    "city": "string",         // City name
    "ip": "string"           // Visitor's IP address
}

Example Response

{
    "continent": "Europe",
    "country_name": "France",
    "country_code": "FR",
    "region": "Île-de-France",
    "city": "Paris",
    "ip": "192.168.1.1"
}

Technical Details

  • Returns HTTP 200 OK on success
  • Content-Type: application/json
  • CORS headers enabled for cross-origin requests
  • No-cache headers to ensure fresh data
  • Real-time IP geolocation

Use Cases

  • Location-based content delivery
  • Geographic analytics
  • Regional content targeting
  • Compliance with regional regulations
  • User experience personalization

Author

Edgee

Information

Last Update:

Creation: