Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Included with your API key is the ability to download the complete animal and organization database via FTP.  This is the easiest way to do a bulk download of the adoptable pets and rescue/shelter (org) information.

Format

The data files are formatted in JSON format.  Currently the data files can either be compressed or not (zip format).

Setup

To enable your FTP account, use the link in the API Key Update email that you will receive on a monthly basis.  You can enable the FTP data download.  If you do not want the files to be compressed please let us know so we can make that change to your API export.

...

Info

The orgs_1.json file (the first file in the orgs data set) contains a time stamp as the first row.  The time stamp is the date/time that the export was started.

Data file format

The data files are formatted in JSON format, with the exception of the file petlist.csv (which is a CSV).  Currently the data files can either be compressed or not (zip format), and you can make that selection on your API Key setup page.

Each of the JSON files have a maximum of 1,000 records.  There is one record per row in the data files.

The petlist.csv file has 100 comma separated animalIDs per row.

Please refer to the sample data files that are attached to this article for specific examples.

Schedule

The data files are generated and placed in your dedicated FTP account by 1 AM eastern.  As our data set grows, however, the time that the data files will be available is expected to move later, so you may want to schedule your download and processing at a later time (like 2 3 or 3 4 AM eastern).

Your import process

...

  1. Import the organization and animal data (orgs_n.json and pets_n.json).  This will be a lengthy and resource intensive process.  The animal data is broken up into multiple files to make processing easier.
  2. Process all of the pictures from the animal data.  Store the lastUpdated time stamp in your local database the lastUpdated time stamp from each picture.
  3. On a nightly basis, download and process the newpets_n.json and updatedpets_n.json files.
  4. On a nightly basis, download and process the petlist.csv file. See Delete/remove unavailable pets below.
  5. Compare the mediaLastUpdated timestamp on each animal to determine if existing pets have had picture changes.  See Image/picture related topics below

...