{"id":23128000,"url":"https://github.com/antoniojmsjr/ipgeolocation","last_synced_at":"2026-02-07T10:30:56.851Z","repository":{"id":113071042,"uuid":"220716548","full_name":"antoniojmsjr/IPGeoLocation","owner":"antoniojmsjr","description":"⚡ Biblioteca de geolocalização por IP.","archived":false,"fork":false,"pushed_at":"2025-03-28T02:40:45.000Z","size":773,"stargazers_count":41,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-21T15:44:25.872Z","etag":null,"topics":["api","delphi","ip2location","ipapi","ipdig","ipgeolocation","ipify","ipinfo","ipstack","ipwhois","pascal"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoniojmsjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-09T23:24:52.000Z","updated_at":"2025-07-01T10:34:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"890cc987-cc2e-4788-aa27-501e48916ce2","html_url":"https://github.com/antoniojmsjr/IPGeoLocation","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/antoniojmsjr/IPGeoLocation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FIPGeoLocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FIPGeoLocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FIPGeoLocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FIPGeoLocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniojmsjr","download_url":"https://codeload.github.com/antoniojmsjr/IPGeoLocation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FIPGeoLocation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29192602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","delphi","ip2location","ipapi","ipdig","ipgeolocation","ipify","ipinfo","ipstack","ipwhois","pascal"],"created_at":"2024-12-17T09:16:04.463Z","updated_at":"2026-02-07T10:30:56.819Z","avatar_url":"https://github.com/antoniojmsjr.png","language":"Pascal","readme":"![Maintained YES](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square\u0026color=important)\n![Memory Leak Verified YES](https://img.shields.io/badge/Memory%20Leak%20Verified%3F-yes-green.svg?style=flat-square\u0026color=important)\n![Release](https://img.shields.io/github/v/release/antoniojmsjr/IPGeoLocation?label=Latest%20release\u0026style=flat-square\u0026color=important)\n![Stars](https://img.shields.io/github/stars/antoniojmsjr/IPGeoLocation.svg?style=flat-square)\n![Forks](https://img.shields.io/github/forks/antoniojmsjr/IPGeoLocation.svg?style=flat-square)\n![Issues](https://img.shields.io/github/issues/antoniojmsjr/IPGeoLocation.svg?style=flat-square\u0026color=blue)\u003c/br\u003e\n![Compatibility](https://img.shields.io/badge/Compatibility-VCL,%20Firemonkey,%20DataSnap,%20Horse,%20RDW,%20RADServer-3db36a?style=flat-square)\n![Delphi Supported Versions](https://img.shields.io/badge/Delphi%20Supported%20Versions-Tokyo%2010.2.3%20and%20above-3db36a?style=flat-square)\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/antoniojmsjr/IPGeoLocation/blob/master/Image/logo.png\"\u003e\n    \u003cimg alt=\"IPGeolocation\" height=\"150\" src=\"https://github.com/antoniojmsjr/IPGeoLocation/blob/master/Image/logo.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# IPGeoLocation\n\nBiblioteca de geolocalização por IP.\n\nImplementado na linguagem Delphi, utiliza o conceito de [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) para guiar no uso da biblioteca.\u003c/br\u003e\nBiblioteca desenvolvida utilizando os principais players do mercado de solução de \"IP-Geolocation\", em anexo a lista dos provedores homologados.\n\n## O que é a geolocalização de IP?\n\nA geolocalização baseada em endereços IP é uma técnica usada para estimar a localização geográfica de um dispositivo conectado à Internet usando o endereço IP do mesmo.  Este mecanismo depende de que o endereço IP do dispositivo apareça em um banco de dados com sua respectiva localização, endereço postal, cidade, país, região ou coordenadas geográficas, que são alguns dos níveis de detalhe que podem ser registrados.\n\nPara mais informações: [Geolocalização de IPs](https://www.lacnic.net/3107/3/lacnic/geolocalizac%C3%A3o-de-ips)\n\n## Para que?\n\nEssa tecnologia é amplamente usada em:\n\n* Geo Marketing\n  * Propagandas direcionadas/sob medida\n  * Informação interessante com base na localização\n  * Promoções/campanhas destinadas a certo público/local\n  * Empresas de turismo, companhias aéreas, redes hoteleiras\n  * Entretenimento\n\n* Direcionamento de conteúdo\n  * Portais “globais” com conteúdos “locais”\n  * Informações no idioma do leitor\n  * Conteúdo de interesse local (notícia, novidades, etc)\n  * Portais de notícias\n  * Serviços de informação meteorológica\n  * Serviços de emergência\n\n* Controle de acesso (à conteúdos/serviços)\n  * Restringir acesso conteúdo/serviços com base na “localização” do usuário\n  * Conteúdos específicos para determinado “público”\n  * Censura\n  * Jogos online\n  * Streaming vídeos/músicas\n\n* Segurança\n  * Restringir tráfego, por localização do usuário\n  * Em situação de emergência/ataque descartar tráfego “não esperado”\n  * Controle de SPAM\n  * Firewalls\n\n## Provedores Homologados\n\n| Provedor | Site | API | Free Requests |\n|---|---|---|---|\n| IP2Location | https://www.ip2location.com | https://api.ip2location.com/v2 | 30.000 yearthly |\n| IP2Location.io | https://www.ip2location.io | https://api.ip2location.io | 50.000 monthly |\n| IPGeolocation | https://ipgeolocation.io | https://api.ipgeolocation.io/ipgeo | 1.500 daily |\n| IPStack  | https://ipstack.com | http://api.ipstack.com | 10.000 monthly |\n| IPIfy | https://geo.ipify.org | https://geo.ipify.org/api/v1 | 1.000 monthly |\n| IPAPI | https://ipapi.com | http://api.ipapi.com/api | 10.000 yearthly |\n| IPInfo | https://ipinfo.io | https://ipinfo.io | 50.000 monthly |\n| IPGeolocationAPI | https://ipgeolocationapi.com | https://api.ipgeolocationapi.com/geolocate | Unlimited |\n| IPWhois | https://ipwhois.io | http://ipwhois.app | 10.000 monthly |\n| IPDig | https://ipdig.io | https://ipdig.io | Unlimited |\n| IPData | https://ipdata.co | https://api.ipdata.co | 1.500 daily |\n| IPLabstack | https://labstack.com/ip | https://ip.labstack.com/api/v1 | 10.000 monthly |\n| IPTwist | https://iptwist.com | https://iptwist.com | 1.000 monthly |\n| IP-API | https://ip-api.com | http://ip-api.com | Unlimited |\n| DB-IP | https://db-ip.com | http://api.db-ip.com/v2 | Unlimited |\n\n## Instalação Automatizada\n\nUtilizando o [**Boss**](https://github.com/HashLoad/boss) (Dependency anager for Delphi) é possível instalar a biblioteca de forma automática.\n\n```\nboss install github.com/antoniojmsjr/IPGeoLocation\n```\n\n## Instalação Manual:\n\nProject \u003e Options \u003e Delphi Compiler \u003e Target \u003e All Configurations \u003e Search path\n\n```\n..\\IPGeoLocation\\Source\n```\n\n## Uso\n```delphi\nuses IPGeoLocation, IPGeoLocation.Interfaces, IPGeoLocation.Types;\n```\n\n```delphi\nvar\n  lMsgError: string;\n  lGeoLocation: IGeoLocation;\nbegin\n\n  try\n    lGeoLocation := TIPGeoLocation.New\n      .IP['201.86.220.241']\n      .Provider[TIPGeoLocationProviderKind.IPInfo]\n        //.SetTimeout(5000) //[OPCIONAL]\n        //.SetAPIKey('TOKEN') //[OPCIONAL]: VERIFICAR ARQUIVO: APIKey.inc\n      .Request\n        //.SetResultLanguageCode('pt-br') //[OPCIONAL]\n        .Execute;\n\n    Application.MessageBox(PWideChar(lGeoLocation.ToJSON), 'JSON', MB_OK + MB_ICONINFORMATION); //JSON COM O RESULTADO DA GEOLOCALIZAÇÃO\n  except\n    on E: EIPGeoLocationRequestException do\n    begin\n      lMsgError := Concat(lMsgError, Format('IP: %s', [E.IP]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('IPVersion: %s', [E.IPVersion]), sLineBreak);      \n      lMsgError := Concat(lMsgError, Format('Provider: %s', [E.Provider]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('DateTime: %s', [DateTimeTostr(E.DateTime)]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('Kind: %s', [E.Kind.AsString]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('URL: %s', [E.URL]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('Method: %s', [E.Method]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('Status Code: %d', [E.StatusCode]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('Status Text: %s', [E.StatusText]), sLineBreak);\n      lMsgError := Concat(lMsgError, Format('Message: %s', [E.Message]));\n\n      Application.MessageBox(PWideChar(lMsgError), 'A T E N Ç Ã O', MB_OK + MB_ICONERROR);\n    end;\n    on E: Exception do\n    begin\n      Application.MessageBox(PWideChar(E.Message), 'A T E N Ç Ã O', MB_OK + MB_ICONERROR);\n    end;\n  end;\n\nend;\n```\n\n## Demo\n[![Download](https://img.shields.io/badge/Download-Demo.zip-orange.svg)](https://github.com/antoniojmsjr/IPGeoLocation/files/5663736/Demo.zip)\n![IP Geolocalização](https://user-images.githubusercontent.com/20980984/70379772-a2843a80-190f-11ea-98b7-2bde17365438.png)\n\n## Youtube\n[![Vídeo Youtube](https://user-images.githubusercontent.com/20980984/72579261-5c7ba880-38b7-11ea-9b20-942d806a14d9.png)](https://www.youtube.com/watch?v=x8CVAudNkSY)\n\n## Licença\n`IPGeoLocation` is free and open-source software licensed under the [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/antoniojmsjr/IPGeoLocation/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniojmsjr%2Fipgeolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniojmsjr%2Fipgeolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniojmsjr%2Fipgeolocation/lists"}