PHPackages                             namara/namara - 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. namara/namara

ActiveLibrary[API Development](/categories/api)

namara/namara
=============

The official PHP client for the Namara open data service

v0.1.2(10y ago)017Apache-2.0PHPPHP &gt;=5.3.3

Since May 1Pushed 10y ago2 watchersCompare

[ Source](https://github.com/namara-io/namara-php)[ Packagist](https://packagist.org/packages/namara/namara)[ RSS](/packages/namara-namara/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Namara
======

[](#namara)

The official PHP client for the Namara Open Data service. [namara.io](https://namara.io)

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

[](#installation)

```
composer require namara/namara
```

Usage
-----

[](#usage)

### Instantiation

[](#instantiation)

You need a valid API key in order to access Namara (you can find it in your My Account details on namara.io).

To load package, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading).

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

$namara = new Namara({YOUR_API_KEY});
```

You can also optionally enable debug mode:

```
$namara = new Namara({YOUR_API_KEY}, true);
```

### Getting Data

[](#getting-data)

To make a basic request to the Namara API you can call `get` on your instantiated object and pass it the ID of the data set you want and the version of the data set:

```
$response = namara->get('5885fce0-92c4-4acb-960f-82ce5a0a4650', 'en-1');
```

Without a third options argument passed, this will return data with the Namara default offset (0) and limit (250) applied. To specify options, you can pass an options argument:

```
$options = (Object) array('offset' => 0, 'limit' => 150);

$namara->get('5885fce0-92c4-4acb-960f-82ce5a0a4650', 'en-1', options);
```

### Options

[](#options)

All [Namara data options](https://namara.io/#/api) are supported.

**Basic options**

```
$options = (Object) array(
  'select'=> 'market_nam,website',
  'where' => 'town = "Toronto" AND nearby(geometry, 43.6, -79.4, 10km)',
  'offset' => '0',
  'limit' => '20'
);
```

**Aggregation options**Only one aggregation option can be specified in a request, in the case of this example, all options are illustrated, but passing more than one in the options object will throw an error.

```
$options = (Object) array(
  'operation' => 'sum(p0)',
  'operation' => 'avg(p0)',
  'operation' => 'min(p0)',
  'operation' => 'max(p0)',
  'operation' => 'count(*)',
  'operation' => 'geocluster(p3, 10)',
  'operation' => 'geobounds(p3)'
);
```

### Running Tests

[](#running-tests)

```
./vendor/bin/phpunit test_namara.php
```

### License

[](#license)

Apache License, Version 2.0

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3711d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1477940?v=4)[namara](/maintainers/namara)[@namara](https://github.com/namara)

---

Top Contributors

[![danny-forest-tdw](https://avatars.githubusercontent.com/u/11962209?v=4)](https://github.com/danny-forest-tdw "danny-forest-tdw (1 commits)")

---

Tags

apigovernmentopen datacanadausindependentnamara

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/namara-namara/health.svg)

```
[![Health](https://phpackages.com/badges/namara-namara/health.svg)](https://phpackages.com/packages/namara-namara)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.5k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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