{"id":27974226,"url":"https://github.com/geocodefarm/geocodefarm-php","last_synced_at":"2026-02-17T02:04:12.719Z","repository":{"id":286189550,"uuid":"960657405","full_name":"geocodefarm/geocodefarm-php","owner":"geocodefarm","description":"Geocode.Farm SDK for PHP","archived":false,"fork":false,"pushed_at":"2025-04-05T15:27:37.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T03:04:52.785Z","etag":null,"topics":["composer","composer-library","composer-package","geocode","geocode-api","geocode-farm","geocodefarm","geocoder","geocoder-php","geocoder-provider","geocoding","geocoding-api","geocoding-library","geocoding-service","geocoding-services","php","php-library","php-sdk","php7","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geocodefarm.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,"zenodo":null}},"created_at":"2025-04-04T20:21:39.000Z","updated_at":"2025-04-05T20:26:33.000Z","dependencies_parsed_at":"2025-04-04T21:35:14.721Z","dependency_job_id":"298841ef-1ac4-406a-b5f2-1d6112bbccf8","html_url":"https://github.com/geocodefarm/geocodefarm-php","commit_stats":null,"previous_names":["geocodefarm/geocodefarm-php"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/geocodefarm/geocodefarm-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocodefarm%2Fgeocodefarm-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocodefarm%2Fgeocodefarm-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocodefarm%2Fgeocodefarm-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocodefarm%2Fgeocodefarm-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geocodefarm","download_url":"https://codeload.github.com/geocodefarm/geocodefarm-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geocodefarm%2Fgeocodefarm-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29530242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"online","status_checked_at":"2026-02-17T02:00:08.105Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["composer","composer-library","composer-package","geocode","geocode-api","geocode-farm","geocodefarm","geocoder","geocoder-php","geocoder-provider","geocoding","geocoding-api","geocoding-library","geocoding-service","geocoding-services","php","php-library","php-sdk","php7","php8"],"created_at":"2025-05-08T00:13:13.894Z","updated_at":"2026-02-17T02:04:12.704Z","avatar_url":"https://github.com/geocodefarm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geocode.Farm PHP SDK\n\nA lightweight, dependency-free PHP SDK for interacting with the [Geocode.Farm](https://geocode.farm) geocoding API.\n\nThis SDK allows developers to easily perform **forward** (address to coordinates) and **reverse** (coordinates to address) geocoding using a simple object-oriented interface.\n\n---\n\n## 📦 Installation\n\nYou can install the SDK via [Composer](https://getcomposer.org):\n\n```bash\ncomposer require geocodefarm/geocodefarm-php\n```\n\n---\n\n## 🚀 Quick Start\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse GeocodeFarm\\GeocodeClient;\n\n// Initialize the client with your API key\n$client = new GeocodeClient('YOUR_API_KEY');\n\n// Forward geocoding: address to lat/lon\n$response = $client-\u003eforward('30 N Gould St, Sheridan, WY');\nprint_r($response);\n\n// Reverse geocoding: lat/lon to address\n$response = $client-\u003ereverse(44.797773, -106.954918);\nprint_r($response);\n```\n\n---\n\n## ✅ Response Format\n\nBoth methods (`forward()` and `reverse()`) return an array like this on success:\n\n```php\n[\n    'success' =\u003e true,\n    'status_code' =\u003e 200,\n    'lat' =\u003e 44.797773,\n    'lon' =\u003e -106.954918,\n    'accuracy' =\u003e 'EXACT_MATCH',\n    'full_address' =\u003e '30 N Gould St, Sheridan, WY 82801',\n    'result' =\u003e [\n        'house_number' =\u003e '30',\n        'street_name' =\u003e 'N Gould St',\n        'locality' =\u003e 'Sheridan',\n        'admin_2' =\u003e 'Sheridan County',\n        'admin_1' =\u003e 'WY',\n        'country' =\u003e 'United States',\n        'postal_code' =\u003e '82801',\n        'formatted_address' =\u003e '30 N Gould St, Sheridan, WY 82801',\n        'latitude' =\u003e 44.797773,\n        'longitude' =\u003e -106.954918,\n        'accuracy' =\u003e 'EXACT_MATCH'\n    ]\n]\n```\n\nIf an error occurs:\n\n```php\n[\n    'success' =\u003e false,\n    'status_code' =\u003e 403,\n    'error' =\u003e 'API returned failure: INVALID_KEY'\n]\n```\n\n---\n\n## 📝 License\n\nThis SDK is released under [The Unlicense](https://unlicense.org/) — public domain. Use it freely.\n\n---\n\n## 🤝 Contributing\n\nPull requests and issues are welcome!\n\n---\n\n## 🌐 About\n\nFor more information about the geocoding API, visit [https://geocode.farm](https://geocode.farm).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeocodefarm%2Fgeocodefarm-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeocodefarm%2Fgeocodefarm-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeocodefarm%2Fgeocodefarm-php/lists"}