" \n " ) // 'US' print ( $record -> country -> name. See the API documentation for more details. \MaxMind\Db\InvalidDatabaseException will be thrown. If the record is not found, a \GeoIp2\Exception\AddressNotFoundException This model in turn contains multiple containerĬlasses for the different parts of the data such as the city in which the If the lookup succeeds, the method call will return a model class for the May then call the method corresponding to the database you are using. The path to the database file as the first argument to the constructor. To use this API, you must create a new \GeoIp2\Database\Reader object with Should not be used to identify a particular address or household. Any location provided by a GeoIP2 database or web service The extension has no effect on web-service lookups. To install, pleaseįollow the instructions included with that API. The performance of lookups in GeoIP2 or GeoLite2 databases.
MAXMIND API INSTALL
Includes an optional C extension that you may install to dramatically increase
MAXMIND API FREE
This is free software, licensed under the Apache License, Version 2.0.Require 'geoip2.phar' Optional C Extension
MAXMIND API SOFTWARE
This software is Copyright (c) 2018-2022 by MaxMind, Inc. If you are having an issue with a MaxMind service that is not specific to theĬlient API, please contact MaxMind support for assistance.
MAXMIND API CODE
Please report all issues with this code using the GitHub issue The GeoIP2 Node.js API uses Semantic Versioning. Whenever possible, as we strive to maintain 100% code coverage. Patches and pull requests are encouraged. We aim to supportĪctive LTS versions of Node.js, as well as the latest stable release. MaxMind has tested this API with Node.js versions 12 and 14. If you are a paying MaxMind customer and you're not sure where to submit aĬorrection, please contact MaxMind support for help. Once the correction is part of the GeoNamesĭata set, it will be automatically incorporated into future MaxMind You've searched for a place and found it on the GeoNames map view, thereĪre a number of links you can use to correct data ("move", "edit", If you find some other sort of mistake, like an incorrect spelling, If the problem you find is that an IP address is incorrectly mapped, please
MAXMIND API ISO
Things like place names, ISO codes, and other similar data from the GeoNames Some of the data that MaxMind provides is also sourced from GeoNames. This is the ID of a geographical feature (city, region, Many of the records returned by the GeoIP web services and databases include a Is uniquely identified by a geonameId, which is an integer. They offer both free and paid premium data.
GeoNames offers web services and downloadableĭatabases with data on geographical features around the world, including The only piece of data which is always returned is the ipAddress attribute in Where some or all of the attributes are unpopulated. Have every piece of data for any given IP address.īecause of these factors, it is possible for any request to return a record While a model may offer a particular piece of data, MaxMind does not always While many of the models contain the same basic records, the attributes whichĬan be populated vary between web service end points or databases.
If the request fails, the function's Promise will reject with an error object. Records, each of which represents part of the data returned by the web service. If the request succeeds, the function's Promise will resolve with the modelįor the end point you called. You may then call the function corresponding to a specific end point, passing it To use the GeoLite2 web service instead of GeoIP2. The third argument isĪn object holding additional option. Your MaxMind accountID and licenseKey as parameters. To use the web service API, you must create a new WebServiceClient, using