{"id":21874359,"url":"https://github.com/baikho/loqate-php","last_synced_at":"2025-06-11T20:35:03.576Z","repository":{"id":37853081,"uuid":"332051765","full_name":"baikho/loqate-php","owner":"baikho","description":"A PHP Wrapper for the Loqate API","archived":false,"fork":false,"pushed_at":"2025-03-25T18:43:15.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"2.x","last_synced_at":"2025-05-26T04:12:39.500Z","etag":null,"topics":["address","address-autocomplete","address-lookup","address-verification","api-client","api-wrapper","lookup","php","php-library","php8","uk"],"latest_commit_sha":null,"homepage":"https://www.loqate.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baikho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2021-01-22T20:10:43.000Z","updated_at":"2025-03-25T18:04:46.000Z","dependencies_parsed_at":"2025-04-15T01:29:18.256Z","dependency_job_id":"dbb2a3ad-c52b-4031-8bfb-dce1e8d415d6","html_url":"https://github.com/baikho/loqate-php","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/baikho/loqate-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baikho%2Floqate-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baikho%2Floqate-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baikho%2Floqate-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baikho%2Floqate-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baikho","download_url":"https://codeload.github.com/baikho/loqate-php/tar.gz/refs/heads/2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baikho%2Floqate-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259335044,"owners_count":22842481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["address","address-autocomplete","address-lookup","address-verification","api-client","api-wrapper","lookup","php","php-library","php8","uk"],"created_at":"2024-11-28T07:12:05.564Z","updated_at":"2025-06-11T20:35:03.494Z","avatar_url":"https://github.com/baikho.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loqate PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/baikho/loqate-php.svg)](https://packagist.org/packages/baikho/loqate-php)\n[![Total Downloads](https://img.shields.io/packagist/dt/baikho/loqate-php.svg)](https://packagist.org/packages/baikho/loqate-php)\n[![MIT Licensed](https://img.shields.io/github/license/baikho/loqate-php.svg)](https://github.com/baikho/loqate-php/blob/main/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/baikho/loqate-php.svg)](https://github.com/baikho/loqate-php/issues)\n[![GitHub stars](https://img.shields.io/github/stars/baikho/loqate-php.svg)](https://github.com/baikho/loqate-php/stargazers)\n\nA PHP Wrapper for the [Loqate API](https://www.loqate.com/resources/support/apis/).\n\n## Installation\n\n```\ncomposer require baikho/loqate-php\n```\n\n## Usage\n\n```php\n$loqate = new \\Baikho\\Loqate\\Loqate('API Key');\n```\n\n### Address Verification API\n\n#### Find Address:\n\n```php\n// Simple example.\n$result = $loqate-\u003eaddress()-\u003efind('foo');\n\n// Advanced example.\n$result = (new \\Baikho\\Loqate\\Address\\Find('API Key'))\n  -\u003esetText('foo')\n  -\u003esetIsMiddleWare(TRUE)\n  -\u003esetContainer('bar')\n  -\u003esetCountries('NL')\n  -\u003emakeRequest();\n```\n\n#### Retrieve Address:\n\n```php\n// Simple example.\n$result = $loqate-\u003eaddress()-\u003eretrieve('XX|XX|XXX|XXXXXXXXXX');\n\n// Advanced example.\n$result = (new \\Baikho\\Loqate\\Address\\Retrieve('API Key'))\n  -\u003esetId('XX|XX|XXX|XXXXXXXXXX')\n  -\u003emakeRequest();\n```\n\n### Geocoding API\n\nThe only APIs currently supported are\n\n- [Distance](https://www.loqate.com/resources/support/apis/DistancesAndDirections/Interactive/Distance/1/)\n- [Directions](https://www.loqate.com/resources/support/apis/DistancesAndDirections/Interactive/Directions/2/)\n- [International Geocode](https://www.loqate.com/resources/support/apis/Geocoding/International/Geocode/1.1/)\n- [UK Find](https://www.loqate.com/resources/support/apis/Geocoding/UK/Find/2/)\n- [UK Geocode](https://www.loqate.com/resources/support/apis/Geocoding/UK/Geocode/2.1/)\n- [UK Retrieve](https://www.loqate.com/resources/support/apis/Geocoding/UK/Retrieve/2/)\n\n#### Calculate distance between two points.\n\nEasting/Northing, Latitude/Longitude \u0026 Postcodes are supported.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003edistance('381600,259400', '380600,25840');\n$result = $loqate-\u003egeocoding()-\u003edistance('51.4733514399,-0.00088499646', '51.492914695,-0.1215161806');\n$result = $loqate-\u003egeocoding()-\u003edistance('SE10 8XJ', 'SW1A 0AA');\n```\n\n#### Get directions between two points.\n\nEasting/Northing, Latitude/Longitude \u0026 Postcodes are supported.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003edirections('381600,259400', '380600,25840');\n$result = $loqate-\u003egeocoding()-\u003edirections('51.4733514399,-0.00088499646', '51.492914695,-0.1215161806');\n$result = $loqate-\u003egeocoding()-\u003edirections('SE10 8XJ', 'SW1A 0AA');\n```\n\n#### Geocode an International Place or Location\n\nCountry must be supplied as an ISO2 or ISO3 country code.\nLocation can be a postal code or place name, Loqate ID also works.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003egeocode('GB', 'London');\n```\n\n#### Find a UK Place or Location\n\nThis can be a full or partial postcode, a place name or street comma town.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003eukFind('London');\n```\n\n#### Geocode a UK Place or Location\n\nThis can be a full or partial postcode, a place name or street comma town.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003eukGeocode('London');\n```\n\n#### Retrieve a UK Place or Location\n\nThis can be a full or partial postcode, a place name or street comma town.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003eukRetrieve('XX|XX|XXX|XXXXXXXXXX');\n```\n#### Reverse Geocode a position to Address or Location\n\nReturns the nearest address or location to the given coordinates. A postcode or coordinates (latitude, longitude or easting, nothing) of the centre of the search.\n\n```php\n$result = $loqate-\u003egeocoding()-\u003eukReverseGeocode('51.4733514399,-0.00088499646');\n```\n\n### Email Verification API\n\n#### Validate Email Address:\n\n```php\n$result = $loqate-\u003eemail()-\u003evalidate('foo@example.com');\n```\n\n### Bank Account Verification API\n\n#### Validate Bank Account:\n\n```php\n$result = $loqate-\u003ebankAccount()-\u003evalidate('XXXXXXXX', 'XX-XX-XX');\n```\n\n### Phone Verification API\n\n#### Validate Phone Number:\n\n```php\n$result = $loqate-\u003ephone()-\u003evalidate('1234567890');\n$result = $loqate-\u003ephone()-\u003evalidate('1234567890', 'NL');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaikho%2Floqate-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaikho%2Floqate-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaikho%2Floqate-php/lists"}