Retrieve a data frame of information about pets that are listed on Petfinder.com. Filter searches based on characteristics such as animal type, breed, size, age, or location.

pf_find_pets(token = NULL, type = NULL, breed = NULL, size = NULL,
  gender = NULL, age = NULL, color = NULL, coat = NULL,
  status = NULL, name = NULL, organization = NULL, location = NULL,
  distance = NULL, sort = "recent", page = 1, limit = 20)

Arguments

token

An access token, provided bypf_accesstoken.

type

The type(s) of animals to be found. A full list of animal types, along with their respective coat and color options, can be found by running pf_list_types(token).

breed

The breed(s) of animals to be found. A full list of breeds for a given animal type can be found by running pf_breeds(token, type).

size

The size(s) of animals to be found. Possible values are "small", "medium", "large", and "xlarge".

gender

The gender(s) of animals to be found. Possible values are "male", "female", and "unknown".

age

The age(s) of animals to be found. Possible values are "baby", "young", "adult", and "senior".

color

The color(s) of animals to be found. A full list of animal types, along with their respective coat and color options, can be found by running pf_list_types(token).

coat

The coat(s) of animals to be found. A full list of animal types, along with their respective coat and color options, can be found by running pf_list_types(token).

status

The status of animals to be found. Possible values are "adoptable", "adopted", or "found".

name

The name of animals to be found (includes partial matches; e.g. "Fred" will return "Alfredo" and "Frederick").

organization

The organization(s) associated with animals to be found. Values should be provided as identification numbers.

location

The location of animals to be found. Values can be specified as "City, State", "latitude, longitude", or "zipcode".

distance

The distance, in miles, from the provided location to find animals. Note that location is required to use distance.

sort

The attribute on which to sort results. Possible attributes are "recent", "-recent", "distance", or "-distance".

page

The page(s) of results to return (default = 1).

limit

The maximum number of results to return per page (maximum = 100).

Value

A data frame of results matching the search parameters

Examples

# NOT RUN {
puppies <- pf_find_pets(token, type = "dog", age = "baby", page = 1:5)

pf_find_pets(token, type = "dog", age = "baby", location = "Ames, IA")
# }