PHPackages                             migda/gugik-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. migda/gugik-php-sdk

ActiveLibrary[API Development](/categories/api)

migda/gugik-php-sdk
===================

PHP SDK for http://capap.gugik.gov.pl/api/fts/ API

00PHP

Since Sep 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/migda/gugik-php-sdk)[ Packagist](https://packagist.org/packages/migda/gugik-php-sdk)[ RSS](/packages/migda-gugik-php-sdk/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP SDK for  API
====================================================

[](#php-sdk-for-httpcapapgugikgovplapifts-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1afd5d15c0d576ba0e6ed00760d98a7d3f0adfb7132673b69cdcfcc09c424d36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696764612f677567696b2d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/migda/gugik-php-sdk)[![GitHub Tests Action Status](https://camo.githubusercontent.com/921d571735a569c98c9ba136f7da7140100f18f03e987c954901b1996e327780/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d696764612f677567696b2d7068702d73646b2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/migda/gugik-php-sdk/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c4c751cb2626d5f4e9d0d40cd9cf9801535d6369212ae36f5596b2c7383fe946/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d696764612f677567696b2d7068702d73646b2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/migda/gugik-php-sdk/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/4e9014be8c0f307b16832d109c00343cd2751cc9cc3ef332b937278575f03268/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696764612f677567696b2d7068702d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/migda/gugik-php-sdk)

---

PLEASE READ TERMS OF USE OF CAPAP GUGiK API BEFORE USE THIS PACKAGE: [http://capap.gugik.gov.pl/api/fts/#\_informacja\_o\_licencji](http://capap.gugik.gov.pl/api/fts/#_informacja_o_licencji)

---

PHP SDK for  API - geocoding and reverse geocoding of administration units, addresses, plots, etc in Poland.

This is an unofficial PHP SDK for the CAPAP GUGiK API.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require migda/gugik-php-sdk
```

Usage
-----

[](#usage)

```
// Geocode commune

$gugik = new Gugik();

$reqs = new GcSingleJpaCollection([
    new GcSingleJpa([
        "gm_nazwa" => "dębno",
        "pow_nazwa" => "brzeski",
        "woj_nazwa" => "małopolskie",
    ]),
]);

$req = new GcReqJpa([
    'reqs' => $reqs,
]);

$results = $gugik->gcGmi($req);
$currentResult = $results->current();
```

```
// Reverse geocode address point

$gugik = new Gugik();

$req = new RgcReqAdr([
    'd' => 500.00,
    'x' => 16.925,
    'y' => 51.089,
]);

$result = $gugik->rgcAdr($req);
```

```
// Reverse geocode plot

$gugik = new Gugik();

$req = new RgcReqDze([
    'd' => 500.00,
    'x' => 16.925,
    'y' => 51.089,
]);

$result = $gugik->rgcDze($req);
```

### Available methods:

[](#available-methods)

#### Geocoding

[](#geocoding)

```
/**
 * Geokodowanie działek - lpis
 * Geocode plots (lpis) using post
 *
 * http://capap.gugik.gov.pl/api/fts/#_geocodedzelpisusingpost
 */
public function gcDzeLpis(GcReqDze $req): GcResultCollection

/**
 * Geokodowanie gmin
 * Geocode communes using post
 *
 * http://capap.gugik.gov.pl/api/fts/#_geocodegmiusingpost
 */
public function gcGmi(GcReqJpa $req): GcResultCollection
```

#### Reverse geocoding

[](#reverse-geocoding)

```
/**
 * Odwrotne geokodowanie - punkty adresowe
 * Reverse geocode address points using get
 *
 * http://capap.gugik.gov.pl/api/fts/#_d8df035f1b22f89d3c826789834b2d65
 */
public function rgcAdr(RgcReqAdr $req): GcResult

/**
 * Odwrotne geokodowanie - działki
 * Reverse geocode plots using get
 *
 * http://capap.gugik.gov.pl/api/fts/#_dzeusingget
 */
public function rgcDze(RgcReqDze $req): GcResult
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

TODO
----

[](#todo)

1. Handle more endpoints from:
2. More complex DTO for responses (right now there is only very basic GcResult class)
3. More tests
4. Improve exceptions

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Rafal Migda](https://github.com/migda)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4677b51c2a1a7ae09a6214b117d2944c02217b2ad2e9c5ac3fd66e867faa5242?d=identicon)[migda](/maintainers/migda)

---

Top Contributors

[![migda](https://avatars.githubusercontent.com/u/18553011?v=4)](https://github.com/migda "migda (8 commits)")

### Embed Badge

![Health badge](/badges/migda-gugik-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/migda-gugik-php-sdk/health.svg)](https://phpackages.com/packages/migda-gugik-php-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
