Introduction to petpy

The following post introduces the petpy package and its methods for interacting with the Petfinder API. The goal of the petpy library is to enable other users to interact with the rich data available in the Petfinder database with an easy-to-use and straightforward Python interface. Methods for coercing the often messy JSON and XML API outputs into pandas DataFrame are also available to help facilitate users who are more interested in using the API for data analysis. More information on the Petfinder API itself can be found on the API documentation page.

Installation

If not already installed, install petpy using pip:

pip install petpy

Then, import the package.

In [2]:
import petpy

The Petfinder API requires an API key to authenticate access. To receive an API key, register with Petfinder on their developer page: https://www.petfinder.com/developers/api-key

The API key received from Petfinder is then used to authenticate the Petfinder class in petpy.

The API key is first stored as an environment variable and then loaded using the os library. Storing your keys received from APIs and other sensitive information in a secure file or as an environment variable is considered best practice to avoid any potential malicious activity.

In [3]:
import os

key = os.getenv('PETFINDER_KEY')
In [4]:
pf = petpy.Petfinder(key)

The pf variable is the initialized Petfinder class with our given API key. We can now use this instance to interact with and extract data from the Petfinder API.

Examples using the petpy package

Pet Methods

The following examples demonstrate some simple usage of using petpy to interact with and pull data from the Petfinder database. petpy contains methods for coercing the returned API results into a pandas DataFrame for easier data analysis and exporting the results into more common formats such as .csv or Excel. More examples of how to use petpy in conjunction with the Python scientific computing stack (Scipy, Numpy, pandas, scikit-learn, etc.) to analyze the results can be found in the later chapters of this introduction.

Getting Animal Breeds

Pulling the list of animal breeds from the Petfinder database is straightforward with petpy. Let's say we are interested in finding the available breeds of cats:

In [19]:
cats = pf.breed_list('cat')

The default return format is JSON, but can be changed to XML by setting the default parameter outputformat to 'xml'.

In [20]:
cats
Out[20]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'breeds': {'@animal': 'cat',
   'breed': [{'$t': 'Abyssinian'},
    {'$t': 'American Curl'},
    {'$t': 'American Shorthair'},
    {'$t': 'American Wirehair'},
    {'$t': 'Applehead Siamese'},
    {'$t': 'Balinese'},
    {'$t': 'Bengal'},
    {'$t': 'Birman'},
    {'$t': 'Bobtail'},
    {'$t': 'Bombay'},
    {'$t': 'British Shorthair'},
    {'$t': 'Burmese'},
    {'$t': 'Burmilla'},
    {'$t': 'Calico'},
    {'$t': 'Canadian Hairless'},
    {'$t': 'Chartreux'},
    {'$t': 'Chausie'},
    {'$t': 'Chinchilla'},
    {'$t': 'Cornish Rex'},
    {'$t': 'Cymric'},
    {'$t': 'Devon Rex'},
    {'$t': 'Dilute Calico'},
    {'$t': 'Dilute Tortoiseshell'},
    {'$t': 'Domestic Long Hair'},
    {'$t': 'Domestic Long Hair (Black & White)'},
    {'$t': 'Domestic Long Hair (Black)'},
    {'$t': 'Domestic Long Hair (Brown)'},
    {'$t': 'Domestic Long Hair (Buff & White)'},
    {'$t': 'Domestic Long Hair (Buff)'},
    {'$t': 'Domestic Long Hair (Gray & White)'},
    {'$t': 'Domestic Long Hair (Gray)'},
    {'$t': 'Domestic Long Hair (Orange & White)'},
    {'$t': 'Domestic Long Hair (Orange)'},
    {'$t': 'Domestic Long Hair (White)'},
    {'$t': 'Domestic Medium Hair'},
    {'$t': 'Domestic Medium Hair (Black & White)'},
    {'$t': 'Domestic Medium Hair (Black)'},
    {'$t': 'Domestic Medium Hair (Brown)'},
    {'$t': 'Domestic Medium Hair (Buff & White)'},
    {'$t': 'Domestic Medium Hair (Buff)'},
    {'$t': 'Domestic Medium Hair (Gray & White)'},
    {'$t': 'Domestic Medium Hair (Gray)'},
    {'$t': 'Domestic Medium Hair (Orange & White)'},
    {'$t': 'Domestic Medium Hair (Orange)'},
    {'$t': 'Domestic Medium Hair (White)'},
    {'$t': 'Domestic Short Hair'},
    {'$t': 'Domestic Short Hair (Black & White)'},
    {'$t': 'Domestic Short Hair (Black)'},
    {'$t': 'Domestic Short Hair (Brown)'},
    {'$t': 'Domestic Short Hair (Buff & White)'},
    {'$t': 'Domestic Short Hair (Buff)'},
    {'$t': 'Domestic Short Hair (Gray & White)'},
    {'$t': 'Domestic Short Hair (Gray)'},
    {'$t': 'Domestic Short Hair (Mitted)'},
    {'$t': 'Domestic Short Hair (Orange & White)'},
    {'$t': 'Domestic Short Hair (Orange)'},
    {'$t': 'Domestic Short Hair (White)'},
    {'$t': 'Egyptian Mau'},
    {'$t': 'Exotic Shorthair'},
    {'$t': 'Extra-Toes Cat / Hemingway Polydactyl'},
    {'$t': 'Havana'},
    {'$t': 'Himalayan'},
    {'$t': 'Japanese Bobtail'},
    {'$t': 'Javanese'},
    {'$t': 'Korat'},
    {'$t': 'LaPerm'},
    {'$t': 'Maine Coon'},
    {'$t': 'Manx'},
    {'$t': 'Munchkin'},
    {'$t': 'Nebelung'},
    {'$t': 'Norwegian Forest Cat'},
    {'$t': 'Ocicat'},
    {'$t': 'Oriental Long Hair'},
    {'$t': 'Oriental Short Hair'},
    {'$t': 'Oriental Tabby'},
    {'$t': 'Persian'},
    {'$t': 'Pixie-Bob'},
    {'$t': 'Ragamuffin'},
    {'$t': 'Ragdoll'},
    {'$t': 'Russian Blue'},
    {'$t': 'Scottish Fold'},
    {'$t': 'Selkirk Rex'},
    {'$t': 'Siamese'},
    {'$t': 'Siberian'},
    {'$t': 'Silver'},
    {'$t': 'Singapura'},
    {'$t': 'Snowshoe'},
    {'$t': 'Somali'},
    {'$t': 'Sphynx / Hairless Cat'},
    {'$t': 'Tabby'},
    {'$t': 'Tabby (Black)'},
    {'$t': 'Tabby (Brown)'},
    {'$t': 'Tabby (Buff)'},
    {'$t': 'Tabby (Gray)'},
    {'$t': 'Tabby (Orange)'},
    {'$t': 'Tabby (White)'},
    {'$t': 'Tiger'},
    {'$t': 'Tonkinese'},
    {'$t': 'Torbie'},
    {'$t': 'Tortoiseshell'},
    {'$t': 'Turkish Angora'},
    {'$t': 'Turkish Van'},
    {'$t': 'Tuxedo'}]},
  'header': {'status': {'code': {'$t': '100'}, 'message': {}},
   'timestamp': {'$t': '2017-11-22T16:57:26Z'},
   'version': {'$t': '0.1'}}}}

The return_df parameter can also be set to True to coerce the results into a pandas DataFrame.

In [21]:
cats_df = pf.breed_list('cat', return_df=True)
cats_df.head()
Out[21]:
cat breeds
0 Abyssinian
1 American Curl
2 American Shorthair
3 American Wirehair
4 Applehead Siamese

Please note the coercion to a pandas DataFrame removes the metadata returned in the JSON format to make the conversion process more efficient and straightforward.

According to Petfinder's API documentation, the available animals to search are ['barnyard', 'bird', 'cat', 'dog', 'horse', 'reptile', 'smallfurry']. Searching for an animal not available in the Petfinder database will return a JSON object with a message stating 'invalid arguments'.

In [16]:
pf.breed_list('zebra')
Out[16]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'header': {'status': {'code': {'$t': '200'},
    'message': {'$t': 'invalid arguments'}},
   'timestamp': {'$t': '2017-11-21T19:06:51Z'},
   'version': {'$t': '0.1'}}}}

Returning random Petfinder pet records

The petpy method pet_getRandom() provides a wrapper for the Petfinder pet.getRandom method. The potential results can be filtered to a subset by the method parameters, otherwise the method can be called simply as:

In [17]:
pf.pet_getRandom()
Out[17]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'header': {'status': {'code': {'$t': '100'}, 'message': {}},
   'timestamp': {'$t': '2017-11-21T19:06:54Z'},
   'version': {'$t': '0.1'}},
  'petIds': {'id': {'$t': '39801731'}}}}

The default record output contains only the pet record's ID and the call's JSON metadata. If we wish to return a more complete random pet record, we can set the parameter output to basic (name, age, animal, breed, shelterID) or full (complete record with description).

In [18]:
pf.pet_getRandom(output='full')
Out[18]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'header': {'status': {'code': {'$t': '100'}, 'message': {}},
   'timestamp': {'$t': '2017-11-21T19:06:58Z'},
   'version': {'$t': '0.1'}},
  'pet': {'age': {'$t': 'Adult'},
   'animal': {'$t': 'Dog'},
   'breeds': {'breed': {'$t': 'Chihuahua'}},
   'contact': {'address1': {},
    'address2': {},
    'city': {'$t': 'Parkland'},
    'email': {'$t': 'info@getalifepetrescue.com'},
    'fax': {},
    'phone': {'$t': '954-629-2445'},
    'state': {'$t': 'FL'},
    'zip': {'$t': '33067'}},
   'description': {'$t': "Shakira Long Haired Chihuahua is approximately 6-7-year-old, 6.5-pound bundle of joy. She so very much wants to be loved and she shows it with her head tilts as she tunes into your baby talk while she wags her tail. She is a sweet girl who arrived at us as a stray so the vet is figuring her age by her blood work, teeth, and her eyes. She is healthy and she has received a dental cleaning along with her other vetting. She enjoys being next to you and is good with other dogs so she would make a great addition to your doggy home. SHe is a wonderful companion. She is calm and sweet so she is the perfect package. \nHer adoption fee is $300 to go towards her vetting (vaccines, spay/neuter, heartworm/Ehrlichia/Lyme test, fecal test, pre-op blood work, dental cleaning, and microchip). If you are interested in adopting please fill out the adoption application} http://www.getalifepetrescue.com/galpr-info/adoption-application.html\n\nAdoption Procedure:\nFill out our Adoption Application\nMeet with the dog(s)Home check\nAdoption Contract\nAdoption Donation (Between $150-$400)\n\nMedical Care That We Give To Our Rescued Pets:\nComplete Physical Examination\nSpay or Neuter Surgery\nHeartworm/Ehrlichia/Lyme Tested\nFecal Exam\nVACCINES~ Bordatella, Distemper, Rabies, Parvo, Corona, Adenovirus Type-2  \nDewormed\nMicrochipped plus lifetime registration (not for cats)\nGrooming (as needed)\nDental Cleaning (if needed)\nStarted on Heartworm Preventative and Flea & Tick Preventative\n\nWhat Makes A Qualified Adopter:\nApplicant must be 21 years or older Applicant's current pet should be up-to-date with appropriate vaccines Applicant's current pet must be altered, unless medical reasons do not permit All people in household need be present for home check Need Landlord or Home Owners Association's approval (if applicable) to have a pet  Applicant must be in the state of Florida preferable in Dade, Broward or Palm Beach Counties."},
   'id': {'$t': '39881634'},
   'lastUpdate': {'$t': '2017-11-10T19:17:04Z'},
   'media': {'photos': {'photo': [{'$t': 'http://photos.petfinder.com/photos/pets/39881634/1/?bust=1510340490&width;=60&-pnt.jpg',
       '@id': '1',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/1/?bust=1510340490&width;=95&-fpm.jpg',
       '@id': '1',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/1/?bust=1510340490&width;=500&-x.jpg',
       '@id': '1',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/1/?bust=1510340490&width;=300&-pn.jpg',
       '@id': '1',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/1/?bust=1510340490&width;=50&-t.jpg',
       '@id': '1',
       '@size': 't'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/2/?bust=1510340495&width;=60&-pnt.jpg',
       '@id': '2',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/2/?bust=1510340495&width;=95&-fpm.jpg',
       '@id': '2',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/2/?bust=1510340495&width;=500&-x.jpg',
       '@id': '2',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/2/?bust=1510340495&width;=300&-pn.jpg',
       '@id': '2',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/2/?bust=1510340495&width;=50&-t.jpg',
       '@id': '2',
       '@size': 't'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/3/?bust=1510340500&width;=60&-pnt.jpg',
       '@id': '3',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/3/?bust=1510340500&width;=95&-fpm.jpg',
       '@id': '3',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/3/?bust=1510340500&width;=500&-x.jpg',
       '@id': '3',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/3/?bust=1510340500&width;=300&-pn.jpg',
       '@id': '3',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/3/?bust=1510340500&width;=50&-t.jpg',
       '@id': '3',
       '@size': 't'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/4/?bust=1510340515&width;=60&-pnt.jpg',
       '@id': '4',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/4/?bust=1510340515&width;=95&-fpm.jpg',
       '@id': '4',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/4/?bust=1510340515&width;=500&-x.jpg',
       '@id': '4',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/4/?bust=1510340515&width;=300&-pn.jpg',
       '@id': '4',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/4/?bust=1510340515&width;=50&-t.jpg',
       '@id': '4',
       '@size': 't'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/5/?bust=1510340519&width;=60&-pnt.jpg',
       '@id': '5',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/5/?bust=1510340519&width;=95&-fpm.jpg',
       '@id': '5',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/5/?bust=1510340519&width;=500&-x.jpg',
       '@id': '5',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/5/?bust=1510340519&width;=300&-pn.jpg',
       '@id': '5',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/39881634/5/?bust=1510340519&width;=50&-t.jpg',
       '@id': '5',
       '@size': 't'}]}},
   'mix': {'$t': 'no'},
   'name': {'$t': 'Shakira'},
   'options': {'option': [{'$t': 'hasShots'},
     {'$t': 'altered'},
     {'$t': 'housetrained'}]},
   'sex': {'$t': 'F'},
   'shelterId': {'$t': 'FL597'},
   'shelterPetId': {'$t': 'shakira'},
   'size': {'$t': 'S'},
   'status': {'$t': 'A'}}}}

We can also pull a specified number of pet records from the API by setting the records parameter and return the collected results as a pandas DataFrame by setting return_df to True.

In [19]:
random_pet_df = pf.pet_getRandom(records=5, return_df=True)
In [20]:
random_pet_df
Out[20]:
age animal breed0 breed1 breeds.breed contact.address1 contact.city contact.email contact.phone contact.state ... photos9 sex shelterId shelterPetId size status status0 status1 status2 status3
0 Adult Dog Boxer Labrador Retriever NaN PO Box 60935 Fort Myers rescueanimalsinneed@gmail.com 407-414-2866 FL ... http://photos.petfinder.com/photos/pets/367743... F FL1027 NaN M A hasShots noKids altered housetrained
0 Young Dog Beagle NaN Beagle P.O. Box 402 Liberty Center heritagefarms08@gmail.com 419-591-6621 OH ... http://photos.petfinder.com/photos/pets/391432... M OH743 NaN S A hasShots altered NaN NaN
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair NaN Kansas City coquina2@aol.com NaN MO ... http://photos.petfinder.com/photos/pets/314172... M MO608 NaN M A hasShots noDogs altered housetrained
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair 185 N Industrial Drive Erwin unicoicountyanimalshelter@gmail.com 423-743-3071 TN ... http://photos.petfinder.com/photos/pets/394589... F TN489 12046973 M A altered housetrained NaN NaN
0 Young Dog Rottweiler NaN Rottweiler 3550 Aumsville Hwy SE Salem DOG@co.marion.or.us 503-588-5233 OR ... http://photos.petfinder.com/photos/pets/399528... F OR177 17-1349 L A hasShots altered NaN NaN

5 rows × 52 columns

Return a pet record associated with a specific petId

The pet_get method can be used to extract a full record from the Petfinder database. We use the pet ID retrieved from the previous call to pet_getRandom to illustrate.

In [19]:
pet = pf.pet_get('26417898')
In [20]:
pet
Out[20]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'header': {'status': {'code': {'$t': '100'}, 'message': {}},
   'timestamp': {'$t': '2017-11-21T14:41:59Z'},
   'version': {'$t': '0.1'}},
  'pet': {'age': {'$t': 'Young'},
   'animal': {'$t': 'Dog'},
   'breeds': {'breed': {'$t': 'American Staffordshire Terrier'}},
   'contact': {'address1': {'$t': '940 Little Britain Rd.'},
    'address2': {},
    'city': {'$t': 'New Windsor'},
    'email': {'$t': 'info@hudsonvalleyspca.org'},
    'fax': {},
    'phone': {'$t': '845-564-6810 '},
    'state': {'$t': 'NY'},
    'zip': {'$t': '12553'}},
   'description': {'$t': 'Zack is a 5 year old m/n very high energy dog.\xa0 He loves people and is very friendly. Because of his high energy level he needs to be a home with older kids and/or an owner who is an experienced dog owner.'},
   'id': {'$t': '26417898'},
   'lastUpdate': {'$t': '2017-03-09T20:52:21Z'},
   'media': {'photos': {'photo': [{'$t': 'http://photos.petfinder.com/photos/pets/26417898/1/?bust=1371453164&width;=60&-pnt.jpg',
       '@id': '1',
       '@size': 'pnt'},
      {'$t': 'http://photos.petfinder.com/photos/pets/26417898/1/?bust=1371453164&width;=95&-fpm.jpg',
       '@id': '1',
       '@size': 'fpm'},
      {'$t': 'http://photos.petfinder.com/photos/pets/26417898/1/?bust=1371453164&width;=500&-x.jpg',
       '@id': '1',
       '@size': 'x'},
      {'$t': 'http://photos.petfinder.com/photos/pets/26417898/1/?bust=1371453164&width;=300&-pn.jpg',
       '@id': '1',
       '@size': 'pn'},
      {'$t': 'http://photos.petfinder.com/photos/pets/26417898/1/?bust=1371453164&width;=50&-t.jpg',
       '@id': '1',
       '@size': 't'}]}},
   'mix': {'$t': 'yes'},
   'name': {'$t': 'Zack'},
   'options': {'option': [{'$t': 'hasShots'},
     {'$t': 'noKids'},
     {'$t': 'altered'},
     {'$t': 'noCats'},
     {'$t': 'housetrained'}]},
   'sex': {'$t': 'M'},
   'shelterId': {'$t': 'NY213'},
   'shelterPetId': {},
   'size': {'$t': 'M'},
   'status': {'$t': 'A'}}}}

The record can also be returned as a DataFrame.

In [21]:
pf.pet_get('39801731', return_df=True)
Out[21]:
age animal breeds.breed contact.address1 contact.city contact.email contact.phone contact.state contact.zip description ... photos5 photos6 photos7 photos8 photos9 photos10 photos11 photos12 photos13 photos14
0 Adult Cat Domestic Medium Hair (Black & White) 54687 County Road 19 Bristol info@elkharthumanesociety.org (574) 848-4225 IN 46507 Please visit our website at www.ElkhartHumaneS... ... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017... http://photos.petfinder.com/photos/pets/398017...

1 rows × 39 columns

The pets_get() method accepts a list or tuple and returns the records associated with each pet ID in the passed variable.

In [29]:
petids = random_pet_df['id'].tolist() # get the pet IDs from the previous call by turning the id column into a list
In [27]:
pf.pets_get(petids, return_df=True)
Out[27]:
age animal breed0 breed1 breeds.breed contact.address1 contact.city contact.email contact.phone contact.state ... photos9 sex shelterId shelterPetId size status status0 status1 status2 status3
0 Adult Dog Boxer Labrador Retriever NaN PO Box 60935 Fort Myers rescueanimalsinneed@gmail.com 407-414-2866 FL ... http://photos.petfinder.com/photos/pets/367743... F FL1027 NaN M A hasShots noKids altered housetrained
0 Young Dog Beagle NaN Beagle P.O. Box 402 Liberty Center heritagefarms08@gmail.com 419-591-6621 OH ... http://photos.petfinder.com/photos/pets/391432... M OH743 NaN S A hasShots altered NaN NaN
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair NaN Kansas City coquina2@aol.com NaN MO ... http://photos.petfinder.com/photos/pets/314172... M MO608 NaN M A hasShots noDogs altered housetrained
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair 185 N Industrial Drive Erwin unicoicountyanimalshelter@gmail.com 423-743-3071 TN ... http://photos.petfinder.com/photos/pets/394589... F TN489 12046973 M A altered housetrained NaN NaN
0 Young Dog Rottweiler NaN Rottweiler 3550 Aumsville Hwy SE Salem DOG@co.marion.or.us 503-588-5233 OR ... http://photos.petfinder.com/photos/pets/399528... F OR177 17-1349 L A hasShots altered NaN NaN

5 rows × 52 columns

The pets_get() method is essentially a convenience wrapper of pet_get(). The same results can be obtained by passing the variable to pet_get().

In [28]:
pf.pet_get(petids, return_df=True)
Out[28]:
age animal breed0 breed1 breeds.breed contact.address1 contact.city contact.email contact.phone contact.state ... photos9 sex shelterId shelterPetId size status status0 status1 status2 status3
0 Adult Dog Boxer Labrador Retriever NaN PO Box 60935 Fort Myers rescueanimalsinneed@gmail.com 407-414-2866 FL ... http://photos.petfinder.com/photos/pets/367743... F FL1027 NaN M A hasShots noKids altered housetrained
0 Young Dog Beagle NaN Beagle P.O. Box 402 Liberty Center heritagefarms08@gmail.com 419-591-6621 OH ... http://photos.petfinder.com/photos/pets/391432... M OH743 NaN S A hasShots altered NaN NaN
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair NaN Kansas City coquina2@aol.com NaN MO ... http://photos.petfinder.com/photos/pets/314172... M MO608 NaN M A hasShots noDogs altered housetrained
0 Adult Cat Domestic Short Hair NaN Domestic Short Hair 185 N Industrial Drive Erwin unicoicountyanimalshelter@gmail.com 423-743-3071 TN ... http://photos.petfinder.com/photos/pets/394589... F TN489 12046973 M A altered housetrained NaN NaN
0 Young Dog Rottweiler NaN Rottweiler 3550 Aumsville Hwy SE Salem DOG@co.marion.or.us 503-588-5233 OR ... http://photos.petfinder.com/photos/pets/399528... F OR177 17-1349 L A hasShots altered NaN NaN

5 rows × 52 columns

Finding pet records matching particular search criteria

The pet.find() method returns a collection of pet records that match the input search criteria. The available search criteria are listed in the petpy API documentation.

For example, let's say we are interested in finding female cats in Washington state and we want the results returned in a tidy pandas DataFrame.

In [7]:
cats = pf.pet_find(location='WA', animal='cat', sex='F', return_df=True)
In [9]:
cats.head()
Out[9]:
age animal contact.address1 contact.city contact.email contact.phone contact.state contact.zip description id ... photos15 photos16 photos17 photos18 photos19 photos20 photos21 photos22 photos23 photos24
0 Young Cat NaN Auburn pugetsoundrescue@hotmail.com NaN WA 98092 NaN 39898075 ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
0 Adult Cat 21615 64th Ave S Kent adoptapet@kingcounty.gov 206-296-7387 WA 98032 This is my friend Gertie. She is a 10-year-old... 37949653 ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
0 Senior Cat 21615 64th Ave S Kent adoptapet@kingcounty.gov 206-296-7387 WA 98032 Boo Kitty / Blue Kitty (is that a Russian Blue... 39921493 ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
0 Senior Cat 8103 161st Ave NE Redmond info@thewhole-cat.com 425-576-5548 WA 98052 Our adoptions program is a relay for 2-6 partn... 38792526 ... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925... http://photos.petfinder.com/photos/pets/387925...
0 Adult Cat 8103 161st Ave NE Redmond info@thewhole-cat.com 425-576-5548 WA 98052 Our adoptions program is a relay for 2-6 partn... 38843221 ... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432... http://photos.petfinder.com/photos/pets/388432...

5 rows × 55 columns

The default amount of records returned is 25, which can be changed by setting the count parameter. For large queries, it is recommended to set the pages parameter with a smaller count value. For example, if we wanted to return 1000 results, we could set the pages parameter to 10 and the count parameter to 100. Please note the Petfinder API places a hard cap of 2,000 results returned per query.

Shelter Methods

Shelter methods are quite similar to the pet methods explored previously but return information on the animal welfare organizations available in Petfinder's database.

Finding animal welfare organizations in a certain area

The shelter_find() method can be used to return shelter records matching the input search criteria. Let's say we want to find 10 shelters listed in the Petfinder database located in Washington State as a pandas DataFrame.

In [10]:
wa_shelters = pf.shelter_find(location='WA', count=10, return_df=True)
In [11]:
wa_shelters
Out[11]:
address1 address2 city country email id latitude longitude name phone state zip
0 NaN NaN Auburn US pugetsoundrescue@hotmail.com WA149 47.3191 -122.2682 Puget Sound Rescue NaN WA 98092
1 NaN NaN Auburn US foggycreekcavyrescue@yahoo.com WA254 47.3191 -122.2682 Foggy Creek Cavy Rescue NaN WA 98092
2 21615 64th Ave S NaN Kent US adoptapet@kingcounty.gov WA252 47.3747 -122.2775 Regional Animal Services of King County - Fost... 206-296-7387 WA 98032
3 21615 64th Ave S. NaN Kent US adoptapet@kingcounty.gov WA63 47.3747 -122.2775 Regional Animal Services of King County 206-296-3936 WA 98032
4 NaN NaN Redmond US pacosrescue@yahoo.com WA604 47.3311 -122.3592 Pacos Rescue Network NaN WA 98052
5 PO Box 13244 NaN Des Moines US anotherchancecats2007@gmail.com WA401 47.4043 -122.3105 Another Chance Cat Adoption (253) 856-1771 WA 98198
6 20613 SE 291ST PL NaN Kent US PSWC_Adoption@hotmail.com WA416 47.3718 -122.1474 Puget Sound Working Cats (206) 819-4261 WA 98042
7 16915 SE 272nd St. #100-210 Covington US smidgetrescue@hotmail.com WA544 47.3718 -122.1474 Smidget Rescue 206.817.3731 WA 98042
8 NaN NaN Covington US adoptions.leftbehindk9@gmail.com WA555 47.3718 -122.1474 Left Behind K-9 Rescue NaN WA 98042
9 1102 E. Main Ave NaN Puyallup US info@sunnyskysshelter.org WA470 47.2032 -122.2738 Sunny Sky's Animal Rescue NaN WA 98372

Returning specific shelter information

The shelter_get() method returns the available information in the Petfinder database matching the given shelter ID. Shelter IDs can be found using the shelter_find() method used earlier. For example, let's use the method to return the record matching the first shelter ID in the result set obtained in the previous example.

In [13]:
shelter_list = wa_shelters['id'].tolist()
In [14]:
pf.shelter_get(shelter_list[0])
Out[14]:
{'@encoding': 'iso-8859-1',
 '@version': '1.0',
 'petfinder': {'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
  '@xsi:noNamespaceSchemaLocation': 'http://api.petfinder.com/schemas/0.9/petfinder.xsd',
  'header': {'status': {'code': {'$t': '100'}, 'message': {}},
   'timestamp': {'$t': '2017-11-22T16:00:53Z'},
   'version': {'$t': '0.1'}},
  'shelter': {'address1': {},
   'address2': {},
   'city': {'$t': 'Auburn'},
   'country': {'$t': 'US'},
   'email': {'$t': 'pugetsoundrescue@hotmail.com'},
   'fax': {},
   'id': {'$t': 'WA149'},
   'latitude': {'$t': '47.3191'},
   'longitude': {'$t': '-122.2682'},
   'name': {'$t': 'Puget Sound Rescue'},
   'phone': {},
   'state': {'$t': 'WA'},
   'zip': {'$t': '98092'}}}}

The shelter_get() method can also accept a list or tuple of shelter IDs. Internally, this calls a convenience wrapper method shelters_get().

In [16]:
pf.shelters_get(shelter_list, return_df=True)
Out[16]:
address1 address2 city country email id latitude longitude name phone state zip
0 NaN NaN Auburn US pugetsoundrescue@hotmail.com WA149 47.3191 -122.2682 Puget Sound Rescue NaN WA 98092
0 NaN NaN Auburn US foggycreekcavyrescue@yahoo.com WA254 47.3191 -122.2682 Foggy Creek Cavy Rescue NaN WA 98092
0 21615 64th Ave S NaN Kent US adoptapet@kingcounty.gov WA252 47.3747 -122.2775 Regional Animal Services of King County - Fost... 206-296-7387 WA 98032
0 21615 64th Ave S. NaN Kent US adoptapet@kingcounty.gov WA63 47.3747 -122.2775 Regional Animal Services of King County 206-296-3936 WA 98032
0 NaN NaN Redmond US pacosrescue@yahoo.com WA604 47.3311 -122.3592 Pacos Rescue Network NaN WA 98052
0 PO Box 13244 NaN Des Moines US anotherchancecats2007@gmail.com WA401 47.4043 -122.3105 Another Chance Cat Adoption (253) 856-1771 WA 98198
0 20613 SE 291ST PL NaN Kent US PSWC_Adoption@hotmail.com WA416 47.3718 -122.1474 Puget Sound Working Cats (206) 819-4261 WA 98042
0 16915 SE 272nd St. #100-210 Covington US smidgetrescue@hotmail.com WA544 47.3718 -122.1474 Smidget Rescue 206.817.3731 WA 98042
0 NaN NaN Covington US adoptions.leftbehindk9@gmail.com WA555 47.3718 -122.1474 Left Behind K-9 Rescue NaN WA 98042
0 1102 E. Main Ave NaN Puyallup US info@sunnyskysshelter.org WA470 47.2032 -122.2738 Sunny Sky's Animal Rescue NaN WA 98372

The result obtained would be the same if one were to use the shelter_get() method and passed the same variable.

Extracting pet records from a particular shelter

The shelter.getPets() method returns the pet records that belong to a particular shelter ID. For example, let's say we want to return the pet records from the first shelter in our list as a DataFrame.

In [17]:
pf.shelter_getPets(shelter_list[0], return_df=True)
Out[17]:
age animal breeds.breed breeds.breed contact.city contact.email contact.state contact.zip description id lastUpdate media.photos.photo mix name options.option options.option sex shelterId size status
0 Adult Dog [{'$t': 'Shepherd'}, {'$t': 'Labrador Retrieve... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 Morena is a shepherd/lab mix we are guessing, ... 32080691 2017-09-01T23:26:37Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Morena [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 M A
1 Adult Dog [{'$t': 'Pit Bull Terrier'}, {'$t': 'Beagle'}] NaN Auburn pugetsoundrescue@hotmail.com WA 98092 Monty is a loving gentleman that likes long wa... 34906970 2017-09-01T23:26:59Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Monty [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN M WA149 M A
2 Adult Dog NaN Australian Cattle Dog / Blue Heeler Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 37760609 2017-11-01T05:01:56Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Hobart [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN M WA149 M A
3 Young Dog [{'$t': 'Pit Bull Terrier'}, {'$t': 'Labrador ... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38602092 2017-09-01T21:00:13Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Daughtry NaN hasShots M WA149 M A
4 Adult Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38627371 2017-11-20T13:54:50Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Poncho NaN NaN M WA149 L A
5 Adult Dog [{'$t': 'Husky'}, {'$t': 'Akita'}] NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38899802 2017-09-01T20:55:28Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Cinder NaN NaN F WA149 L A
6 Adult Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38900079 2017-11-09T20:11:02Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Hercules [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
7 Adult Dog [{'$t': 'American Staffordshire Terrier'}, {'$... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38900083 2017-09-01T20:51:06Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Emily [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN F WA149 M A
8 Senior Dog NaN Cattle Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 38936726 2017-09-01T23:30:27Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Rex NaN NaN M WA149 M A
9 Senior Dog NaN Shepherd Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39229879 2017-09-20T18:44:40Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Fletch [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 M A
10 Young Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39229884 2017-09-02T15:41:19Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Bear [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
11 Adult Dog [{'$t': 'Shar Pei'}, {'$t': 'Labrador Retrieve... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39229885 2017-11-09T20:10:05Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Beverly NaN hasShots F WA149 M A
12 Senior Dog [{'$t': 'American Staffordshire Terrier'}, {'$... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39229895 2017-09-02T15:25:55Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Tripp [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN M WA149 M A
13 Adult Dog [{'$t': 'Siberian Husky'}, {'$t': 'Shetland Sh... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39414053 2017-09-24T14:45:48Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Penny [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 M A
14 Young Dog [{'$t': 'Boxer'}, {'$t': 'American Staffordshi... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39414114 2017-09-24T14:44:59Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Hope [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 M A
15 Adult Dog [{'$t': 'American Staffordshire Terrier'}, {'$... NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39414121 2017-09-23T23:20:28Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Chata [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 L A
16 Senior Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 We just took in Grady a few days ago. Grady i... 39793927 2017-11-02T19:42:42Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Grady [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
17 Senior Dog [{'$t': 'German Shepherd Dog'}, {'$t': 'Husky'}] NaN Auburn pugetsoundrescue@hotmail.com WA 98092 Bella is approximately 8 years old we are gues... 39798015 2017-11-02T19:43:24Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Bella [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 L A
18 Adult Dog NaN Doberman Pinscher Auburn pugetsoundrescue@hotmail.com WA 98092 Lancelot is a 2 year old purebred neutered mal... 39798114 2017-11-18T21:34:21Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Lancelot--ADOPTED!! [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
19 Young Cat NaN Domestic Short Hair (Gray & White) Auburn pugetsoundrescue@hotmail.com WA 98092 NaN 39898075 2017-11-13T16:50:44Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Momma kitty [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN F WA149 M A
20 Baby Cat NaN Domestic Medium Hair (Gray & White) Auburn pugetsoundrescue@hotmail.com WA 98092 NaN 39898092 2017-11-13T16:51:53Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Baby kittens! [{'$t': 'hasShots'}, {'$t': 'housetrained'}] NaN M WA149 M A
21 Young Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39898105 2017-11-16T14:03:18Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Duke [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
22 Young Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39898144 2017-11-16T14:02:30Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Wrigley [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A
23 Adult Dog [{'$t': 'Beagle'}, {'$t': 'Basset Hound'}] NaN Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39899592 2017-11-16T14:02:12Z [{'@size': 'pnt', '$t': 'http://photos.petfind... yes Beau [{'$t': 'hasShots'}, {'$t': 'altered'}, {'$t':... NaN M WA149 M A
24 Young Dog NaN German Shepherd Dog Auburn pugetsoundrescue@hotmail.com WA 98092 ADOPTION DONATION: $350\n\nCONTACT US TODAY: P... 39899643 2017-11-16T14:01:56Z [{'@size': 'pnt', '$t': 'http://photos.petfind... no Brody [{'$t': 'hasShots'}, {'$t': 'altered'}] NaN M WA149 L A

Finding shelters that have records matching a particular animal breed

The shelter_listByBreeds() method allows the user to find shelters that match pet records of the input animal breed. This method is best used in conjunction with the breed_list() method to find the available animal breeds in the Petfinder database.

We already extracted the available cat breeds earlier in the introduction, which we can use to select a cat breed listed in the Petfinder database.

In [23]:
cats_df.head()
Out[23]:
cat breeds
0 Abyssinian
1 American Curl
2 American Shorthair
3 American Wirehair
4 Applehead Siamese

The Abyssinian is a beautiful breed of cat, let's find some shelters that have pet records matching an Abyssinian breed and return it as a DataFrame.

In [27]:
aby = cats_df['cat breeds'].tolist()[0]
In [37]:
pf.shelter_listByBreed('cat', aby, return_df=True)
Out[37]:
address1 address2 city country email id latitude longitude name phone state zip
0 5473 Overpass Road NaN Santa Barbara US SBAdoption@sbcphd.org CA63 34.4427 -119.8024 Santa Barbara County Animal Services--Santa Ba... 805-681-5285 CA 93111
1 P. O. Box 6356 NaN Brandon US CatcallFL@gmail.com FL472 27.909 -82.2845 Cat Call Inc. (813) 324-9320 FL 33511
2 1447 Folly Road NaN Charleston US adoption@pethelpers.org SC120 32.7357 -79.9553 Pet Helpers Inc. 843.795.1110 SC 29412
3 6111 Highland Drive NaN Jonesboro US margaret@neahs.org AR128 35.8213 -90.6996 NEA Humane Society (870) 932/5185 AR 72401
4 P.O. Box 1521 NaN Malvern US mataft@netscape.com AR238 34.1569 -92.9206 Stop Animal Cruelty in Hot Spring County (501) 276-2385 AR 72104
5 2656 Hwy. 201 N NaN Mountain Home US hsnca@mtnhome.com AR95 36.3383 -92.3742 Humane Society of North Central Arkansas (870) 425-9221 AR 72653
6 NaN NaN Phoenix US badkittyts@aol.com AZ01 33.9158 -112.1353 Citizens For North Phoenix Strays (602) 332-6615 AZ 85027
7 835 West Warner Road NaN Gilbert US azcatsmeow@gmail.com AZ13 33.3557 -111.7917 We're The Cat's Meow Pet Rescue 480-278-9744 AZ 85233
8 P.O Box 50673 NaN Phoenix US petfinder-inquiry@cactuscatsrescue.net AZ258 33.3357 -111.9924 Cactus Cats Rescue, Inc. (480) 814-8801 AZ 85044
9 P.O. Box 50594 NaN Mesa US hadleyd@cox.net AZ301 33.4007 -111.6539 Desert Paws Rescue 480-380-5214 AZ 85208
10 NaN NaN Phoenix US vlintz@davisp.com AZ324 33.4483 -112.0733 The Litter League (Rescue League) NaN AZ 85064
11 5278 East 21st Street NaN Tucson US adoptions@hermitagecatshelter.org AZ70 32.2152 -110.8853 The Hermitage Cat Shelter 520-571-7839 AZ 85711
12 NaN NaN Ahwatukee US ajbfcats@gmail.com AZ88 33.3557 -111.7917 AJs Best Friends Persian & Himalayan Rescue NaN AZ 85233
13 P.O. Box 494274 Redding, CA 96049-4274 Palo Cedro US acawl.inc@gmail.com CA1004 40.5713 -122.2371 Another Chance Animal Welfare League Inc. 530-547-7387 CA 96073
14 NaN NaN Santa Rosa US Asmcmvw@aol.com CA1043 38.4434 -122.7511 Purrfect Pals NaN CA 95401
15 NaN NaN Napa US wtfnapa@gmail.com CA1328 38.3265 -122.3044 Whiskers, Tails and Ferals (707) 258-2287 CA 94558
16 361 S. Raymond Avenue NaN Pasadena US NaN CA15 34.1363 -118.1653 Pasadena Humane Society & SPCA 626-792-7151 CA 91105
17 359 Nevada Street, Suite 101 NaN Auburn US sahartford530@gmail.com CA1505 38.8967 -121.0758 Friends Forever, A Cat Sanctuary 530-885-4228 CA 95604
18 P.O. Box 510 NaN Davis US adopt@yolospca.org CA161 38.545 -121.7394 Yolo County SPCA NaN CA 95617
19 NaN NaN Buena Park US CaringFriendsCatRescueTustin@gmail.Com CA1721 33.8763 -117.9903 Caring Friends Cat Rescue NaN CA 90621
20 420 McKinley St, Ste 111-147 NaN Corona US purrfectfit2000-rescue@yahoo.com CA1723 33.8781 -117.5814 Purrfect Fit Cat Rescue 951-817-9545 CA 92879
21 NaN NaN Panorama City US gduncan13@gmail.com CA1752 34.2242 -118.4433 HA! Inc. NaN CA 91402
22 5473 Overpass Rd NaN Santa Barbara US info@asapcats.org CA267 34.4427 -119.8024 Animal Shelter Assistance Program (ASAP) (805) 683-3368 CA 93111
23 P.O. Box 2011 NaN Antioch US starshalodogs@yahoo.com CA338 38.005 -121.8047 Homeless Animals' Lifeline Organization (H.A.L... (925) 473-4642 CA 94531
24 3839 Bradshaw Road NaN Sacramento US CountyAnimalCare@saccounty.net CA348 38.5655 -121.3283 Sacramento County Animal Care and Regulation CountyAnimalCare@saccounty.net CA 95827