PHPackages                             salernolabs/petfinder - 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. salernolabs/petfinder

ActiveLibrary[API Development](/categories/api)

salernolabs/petfinder
=====================

An unofficial PHP Petfinder API SDK.

1.0.0(8y ago)171MITPHPPHP &gt;=5.6

Since Jun 7Pushed 8y ago2 watchersCompare

[ Source](https://github.com/salernolabs/petfinder)[ Packagist](https://packagist.org/packages/salernolabs/petfinder)[ Docs](http://www.salernolabs.com/)[ RSS](/packages/salernolabs-petfinder/feed)WikiDiscussions master Synced 1mo ago

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

salernolabs/petfinder
=====================

[](#salernolabspetfinder)

[![Build Status](https://camo.githubusercontent.com/0e450a4dab16f867d34c2ed5647a64ed8a962efa3ea7882f6ca6ee43f1e9d839/68747470733a2f2f7472617669732d63692e6f72672f73616c65726e6f6c6162732f70657466696e6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/salernolabs/petfinder)

This is an unofficial PHP Petfinder API SDK that uses the freely available [petfinder api](https://www.petfinder.com/developers/api-docs). Here are some important bits from their documentation that you should read before using this.

```
Getting Started

You will need an API key and secret to access the Petfinder API, which you can obtain by registering here. You will also be asked for the domain of the web site on which your applications will run. We do not currently use this information for restricting access, but we may do so in the future to protect your security information. Developers of commercial or high-volume sites and applications should refer to the restrictions below.
Restrictions

The following usage restrictions apply to users of the API:
Total requests per day: 10,000
Records per request: 1,000
Maximum records per search: 2,000
If your usage may exceed these limits, please contact us at api-help@petfinder.com.

```

When you have your API key and secret you can use this library.

This is built for an upcoming animal rescue site and we weren't happy with the current PHP based offerings for petfinder API libraries. Not 100% working but almost there so far. To use this library:

```
composer require salernolabs/petfinder

```

Queries
-------

[](#queries)

All examples that follow assume you have a $configuration object built with your api key and secret.

```
$configuration = new \SalernoLabs\Petfinder\Configuration();

$configuration
    ->setKey($key, $secret);

```

There are some other values you can adjust in the configuration object, see code for more details.

### auth.getToken

[](#authgettoken)

```
$request = new \SalernoLabs\Petfinder\Requests\Auth\GetToken($configuration);
$data = $request->execute();

```

### breed.list

[](#breedlist)

```
$request = new \SalernoLabs\Petfinder\Requests\Breed\GetList($configuration);
$data = $request
            ->setAnimal('dog')
            ->execute();

```

### pet.find

[](#petfind)

```
$request = new \SalernoLabs\Petfinder\Requests\Pet\Find($configuration);
$data = $request
            ->setAnimal('dog')
            ->setBreed('shnauzer')
            ->setSize('XL')
            ->setSex('M')
            ->setLocation('12345')
            ->setAge('Young')
            ->setCount(10)
            ->setOffset($lastOffset)
            ->setOutput('full')
            ->execute();

```

### pet.get

[](#petget)

```
$request = new \SalernoLabs\Petfinder\Requests\Pet\Get($configuration);
$data = $request
            ->setId(12345)
            ->execute();

```

### pet.getRandom

[](#petgetrandom)

```
$request = new \SalernoLabs\Petfinder\Requests\Pet\GetRandom($configuration);
$data = $request
            ->setAnimal('dog')
            ->setBreed('shnauzer')
            ->setSize('XL')
            ->setSex('M')
            ->setLocation('12345')
            ->setShelterId('NJ1234')
            ->setOutput('basic')
            ->execute();

```

### shelter.find

[](#shelterfind)

```
$request = new \SalernoLabs\Petfinder\Requests\Shelter\Find($configuration);
$data = $request
            ->setLocation('12345')
            ->setCount(10)
            ->setOffset($lastOffset)
            ->execute();

```

### shelter.get

[](#shelterget)

```
$request = new \SalernoLabs\Petfinder\Requests\Shelter\Get($configuration);
$data = $request
            ->setId(12345)
            ->execute();

```

### shelter.getPets

[](#sheltergetpets)

```
$request = new \SalernoLabs\Petfinder\Requests\Shelter\GetPets($configuration);
$data = $request
            ->setId(12345)
            ->setCount(10)
            ->setOffset($lastOffset)
            ->execute();

```

### shelter.listByBreed

[](#shelterlistbybreed)

```
$request = new \SalernoLabs\Petfinder\Requests\Shelter\ListByBreed($configuration);
$data = $request
            ->setAnimal('dog')
            ->setBreed('shnauzer')
            ->setCount(10)
            ->setOffset($lastOffset)
            ->execute();

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

3258d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155974?v=4)[Eric Salerno](/maintainers/ericsalerno)[@ericsalerno](https://github.com/ericsalerno)

---

Top Contributors

[![ericsalerno](https://avatars.githubusercontent.com/u/155974?v=4)](https://github.com/ericsalerno "ericsalerno (1 commits)")

---

Tags

petfinderpetfinder-apiphpsdktestedunofficialphpapisdkPetfinder

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M23](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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