PHPackages                             liviu-hariton/pinmeto-php-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. liviu-hariton/pinmeto-php-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

liviu-hariton/pinmeto-php-api
=============================

A PHP library for interacting with the PinMeTo API

v0.2.0(1y ago)11161[1 PRs](https://github.com/liviu-hariton/pinmeto-php-api/pulls)MITPHPPHP 8.\*

Since Mar 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/liviu-hariton/pinmeto-php-api)[ Packagist](https://packagist.org/packages/liviu-hariton/pinmeto-php-api)[ RSS](/packages/liviu-hariton-pinmeto-php-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

PinMeToAPI PHP Library
======================

[](#pinmetoapi-php-library)

PinMeToAPI is a PHP library that provides convenient access to the [PinMeTo](https://www.pinmeto.com/) API, allowing users to interact with PinMeTo's locations data and metrics.

Overview
--------

[](#overview)

Integration with PinMeTo offers the ability to fetch information and send updates through PinMeTo API for:

- Locations
- Insights (Google™ and Facebook™)
- Keywords (Google™)
- Reviews (Google™ and Facebook™)

Table Of Content
----------------

[](#table-of-content)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Get all available locations](#get-all-available-locations)
    - [Get a specific location](#get-a-specific-location)
    - [Create a new location](#create-a-new-location)
    - [Update an existing location](#update-an-existing-location)
    - [Get locations metrics data](#metrics)
    - [Get locations Google keywords](#google-keywords)
    - [Get locations ratings](#ratings)
    - [Get network categories](#network-categories)
- [License](#license)
- [PinMeTo official API documentation](#pinmeto-official-api-documentation)
- [Disclaimer](#disclaimer)
- [Laravel package](#laravel-package)

Requirements
------------

[](#requirements)

- a [PinMeTo](https://www.pinmeto.com/login) user account with API access enabled
- PHP &gt;= 8.0
- PinMeToAPI uses curl extension for handling HTTP calls. So you need to have the [curl](https://www.php.net/manual/en/book.curl.php) extension installed and enabled with PHP.
- [json](https://secure.php.net/manual/en/book.json.php) support enabled with PHP

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

[](#installation)

You can install the PinMeToAPI PHP library via Composer. Run the following command in your terminal:

```
composer require liviu-hariton/pinmeto-php-api
```

or add the following to your composer.json file

```
{
  "require": {
    "liviu-hariton/pinmeto-php-api": "^0.1.0"
  }
}
```

and run Composer's install or update commands to complete installation

```
composer install
```

Usage
-----

[](#usage)

Make sure to include the autoloader:

```
require_once 'vendor/autoload.php';
```

Initialize the PinMeToAPI object with your PinMeTo `Account ID`, `App ID`, and `App Secret` values. You can obtain these credentials from your PinMeTo Account Settings [here](https://places.pinmeto.com/account-settings/).

```
$pinmeto = new LHDev\PinMeToAPI\PinMeToAPI([
    'app_id' => 'PINMETO_APP_ID',
    'app_secret' => 'PINMETO_APP_SECRET',
    'account_id' => 'PINMETO_ACCOUNT_ID',
    'mode' => 'test' // or 'live' for production
]);
```

Once initialized, you can use various methods provided by the PinMeToAPI class to interact with the PinMeTo API.

### Get all available locations

[](#get-all-available-locations)

```
$locations = $pinmeto->getLocations();
```

Optionally, you can also pass an array of parameters

```
$parameters = [
    'pagesize' => '2' // Number of locations that the request returns, default 100, max 250
    'next' => '569652a91151474860f5e173', // (string) Id of starting point to next page
    'before' => '569649b49c5ec8685e11175e', // (string) Id of starting point to previous page
];

$locations = $pinmeto->getLocations($parameters);
```

### Get a specific location

[](#get-a-specific-location)

```
$store_id = 8;

$location = $pinmeto->getLocation($store_id);
```

### Create a new location

[](#create-a-new-location)

```
$parameters = [
    'name' => 'Your store name',
    'storeId' => 'your_store_id',
    'address' => [
        'street' => 'Store address',
        'zip' => 'Zipcode',
        'city' => 'The City',
        'country' => 'The Country',
    ],
    'location' => [
        'lat' => 59.333755678571,
        'lon' => 18.056143908447,
    ],
];

$pinmeto->createLocation($parameters);
```

You can also use the "Upsert" option by passing an additional parameter

```
$pinmeto->createLocation($parameters, true);
```

### Update an existing location

[](#update-an-existing-location)

```
$store_id = 8;

$parameters = [
    'name' => 'The new store name',
    'address' => [
        'street' => 'The new store address',
        'zip' => 'Some other zipcode',
        'city' => 'In some other city',
        'country' => 'In some other country',
    ],
];

$pinmeto->updateLocation($store_id, $parameters);
```

### Metrics

[](#metrics)

Get the Google™ or Facebook™ metrics data for all locations

```
$metrics = $pinmeto->getMetrics(
    source: 'google', // the source can be either `facebook` or `google`
    from_date: '2024-01-01', // the format is `YYYY-MM-DD`
    to_date: '2024-03-31', // the format is `YYYY-MM-DD`
    fields: [
        'businessImpressionsDesktopMaps', 'businessImpressionsDesktopSearch'
    ] // All available fields are described here https://api.pinmeto.com/documentation/v3/
);
```

or for a specific location by passing the Store ID

```
$metrics = $pinmeto->getMetrics(
    source: 'facebook', // the source can be either `facebook` or `google`
    from_date: '2024-01-01', // the format is `YYYY-MM-DD`
    to_date: '2024-03-31', // the format is `YYYY-MM-DD`
    store_id: 8
);
```

### Google keywords

[](#google-keywords)

Get the Google™ keywords data for all locations

```
$keywords = $pinmeto->getKeywords(
    from_date: '2024-01', // the format is `YYYY-MM`
    to_date: '2024-03' // the format is `YYYY-MM`
);
```

or for a specific location by passing the Store ID

```
$keywords = $pinmeto->getKeywords(
    from_date: '2024-01', // the format is `YYYY-MM`
    to_date: '2024-03', // the format is `YYYY-MM`
    store_id: 8
);
```

### Ratings

[](#ratings)

Get the Google™ or Facebook™ ratings data for all locations

```
$ratings = $pinmeto->getRatings(
    source: 'google', // the source can be either `facebook` or `google`
    from_date: '2024-01-01', // the format is `YYYY-MM-DD`
    to_date: '2024-03-31' // the format is `YYYY-MM-DD`
);
```

or for a specific location by passing the Store ID

```
$ratings = $pinmeto->getRatings(
    source: 'facebook', // the source can be either `facebook` or `google`
    from_date: '2024-01-01', // the format is `YYYY-MM-DD`
    to_date: '2024-03-31', // the format is `YYYY-MM-DD`
    store_id: 8
);
```

### Network categories

[](#network-categories)

Get the list of categories per network. The available networks are `google` or `apple` or `facebook` or `bing`

```
$category_networks = $pinmeto->getNetworkCategories(
    network: 'apple'
);
```

Response
--------

[](#response)

For every method described here, the response will be a JSON data format. Please find al the details in the [PinMeTo official API documentation](#pinmeto-official-api-documentation).

License
-------

[](#license)

This library is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for details.

PinMeTo official API documentation
----------------------------------

[](#pinmeto-official-api-documentation)

- The V2 documentation (locations data) is available on [PinMeTo GitHub](https://github.com/PinMeTo/documentation)
- The V3 documentation (locations metrics) is available on [PinMeTo API - Documentation](https://api.pinmeto.com/documentation/v3/)

Disclaimer
----------

[](#disclaimer)

I am not affiliated with PinMeTo, but I am a developer who sees the value of their location services and wanted to create tools to simplify integration for the PHP community.

While this library facilitate integration with PinMeTo's location services API, it is a separate entity maintained and supported by me. Any issues, questions, or inquiries related to these library should be directed to me and not to PinMeTo.

I greatly appreciate the availability of PinMeTo's API, which has enabled me to create this library and enhance the functionality of applications that rely on location-based services. However, the development and maintenance of this library is solely my responsibility (and any contributors to this repository).

Feel free to explore this library here on GitHub, contribute, and make the most of PinMeTo’s powerful location services!

Laravel package
---------------

[](#laravel-package)

A Laravel package is available also [here](https://github.com/liviu-hariton/pinmeto-laravel).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

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.

###  Release Activity

Cadence

Every ~70 days

Total

3

Last Release

638d ago

PHP version history (2 changes)v0.1.0PHP ^8.0

v0.1.1PHP 8.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/645671c0071b2de6d7f084ef7d0c3b45f8ab432258e95d9d2cecd7f4b4bd01d4?d=identicon)[liviu-hariton](/maintainers/liviu-hariton)

---

Top Contributors

[![liviu-hariton](https://avatars.githubusercontent.com/u/133125272?v=4)](https://github.com/liviu-hariton "liviu-hariton (7 commits)")

---

Tags

restpinmetopinmeto-phppinmeto-restpinmeto-api

### Embed Badge

![Health badge](/badges/liviu-hariton-pinmeto-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/liviu-hariton-pinmeto-php-api/health.svg)](https://phpackages.com/packages/liviu-hariton-pinmeto-php-api)
```

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[psr/link

Common interfaces for HTTP links

2.5k144.1M68](/packages/psr-link)[league/fractal

Handle the output of complex data structures ready for API output.

3.5k64.1M476](/packages/league-fractal)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k58.7M210](/packages/lexik-jwt-authentication-bundle)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)

PHPackages © 2026

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