PHPackages                             albawebstudio/petfinder-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. [API Development](/categories/api)
4. /
5. albawebstudio/petfinder-api

ActiveLibrary[API Development](/categories/api)

albawebstudio/petfinder-api
===========================

Laravel package to incorporate Petfinder API

1.1.0(2y ago)016MITPHPPHP &gt;=8.1

Since Jul 10Pushed 2y ago1 watchersCompare

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

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

Petfinder API helper for New Leash Rescue website
=================================================

[](#petfinder-api-helper-for-new-leash-rescue-website)

These library will help you with the usage of Petfinder API.

[![Latest Version on Packagist](https://camo.githubusercontent.com/7d1ab7243397b9a9677dc229d33878e85c858fe9b434d14c87e2e3826a9179f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c626177656273747564696f2f70657466696e6465722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/albawebstudio/petfinder-api)[![Total Downloads](https://camo.githubusercontent.com/091c3c6482f1c940472bb1606cf97ad5070a99ae8b51934a2df3dcf05c96e290/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c626177656273747564696f2f70657466696e6465722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/albawebstudio/petfinder-api)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Packagist PHP Version](https://camo.githubusercontent.com/ac8e39a0efca4e80c7904049444cca1a37360b2096d8675377fbff31b4d05a30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f616c626177656273747564696f2f70657466696e6465722d6170692f706870)](https://packagist.org/packages/albawebstudio/petfinder-api)

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

[](#installation)

Require this package with composer. It is recommended to only require the package for development.

```
composer require albawebstudio/petfinder-api
```

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel without auto-discovery:

[](#laravel-without-auto-discovery)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
albawebstudio\PetfinderApi\ServiceProvider::class,
```

You can also set in your config with Petfinder API key, API secret and organization ID with .env vars.

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="albawebstudio\\PetfinderApi\\ServiceProvider"
```

Using in Laravel Project
------------------------

[](#using-in-laravel-project)

You can implement the requests using the following instructions.

### Update .env

[](#update-env)

Append the following to the end of your `.env` file. You can find the API access information in the [Developer Settings](https://www.petfinder.com/user/developer-settings/) of your Petfinder account.

You can fetch your organization ID in several ways. Look at the [animal shelter and rescue](https://www.petfinder.com/animal-shelters-and-rescues/search/)page and search for your organization. In the "shelter search results", hover over the search icon in the "Pet List" column. Your organization ID is the value after `shelter_id=`.

For example, if you hover over and see the following URL `https://www.petfinder.com/pet-search?shelter_id=MN452`, your organization ID is `MN452`.

```
# PETFINDER

PETFINDER_API_KEY=
PETFINDER_API_SECRET=
PETFINDER_ORGANIZATION_ID=
```

Create a new controller for making the API requests. Our example we have created a controller `PetfinderApiController`.

```
