Simplifying Dog Adoption Through AI
Intro
Finding a furry companion isn’t always easy. Adoption sites can be overwhelming, and filtering through listings to find the perfect match can take hours. That’s where Rover comes in—a simple, free app that uses ChatGPT to interpret natural language queries and deliver tailored results from the PetFinder API.
Let’s be clear: we’re not doing anything revolutionary here. But if we can make the adoption search easier, and even help a single dog find a forever home, we’ve done our job. In this article, we’ll explore how Rover works, the tools that power it, and how you can replicate or build upon this idea for your own projects.

How Rover Works
At its core, Rover is a Flask-based web app that combines the conversational power of ChatGPT with the extensive database of adoptable pets from the PetFinder API. Here’s the high-level flow:
- Natural Language Query: Users type what they’re looking for—e.g., “I want a small dog that’s good with kids in Austin, TX.”
- ChatGPT Transformation: The app sends the query to ChatGPT, which parses it into structured parameters like size, age, and location.
- PetFinder API Search: These parameters are passed to the PetFinder API, which returns matching dogs.
- Results Display: The app uses JavaScript to display the results dynamically, giving users a clean and responsive experience.
Live Demo: You can try the app yourself at lambdasandlapdogs.com/rover.
Open Source: A standalone proof-of-concept is available on GitHub: Rover Repository. Feel free to fork it, use it, or improve it.
The Technology Behind Rover
Rover leverages several technologies to transform queries into adoptable matches:
Flask
The app is built on Flask, a lightweight Python web framework, which handles routing, user input, and interactions with ChatGPT and the PetFinder API. For example, here’s a snippet of the business logic in app.py:
@app.route('/', methods=['GET', 'POST'])
def render_dog_finder():
if request.method == 'POST':
# Initialize Petfinder client
petfinder_api = PetfinderClient(petfinder_key, petfinder_sec)
petfinder_api.auth()
# Get the user description from the form
user_description = request.json.get('description', '')
# Step 1: Use GPT-4o-mini to process the description
try:
gpt_response = openai.chat.completions.create(
...)
ChatGPT
ChatGPT interprets user queries, transforming human language into structured API parameters. For example:
- User Query: “I’m looking for a playful puppy near Dallas.”
- Structured Output:
json
{
"type": "dog",
"age": "baby",
"location": "Dallas, TX"
}
Here's the prompt that makes this possible:
``` You are an assistant helping users find adoptable dogs using the Petfinder API. Always include the following parameters in the JSON output: - status (always set to 'adoptable')
Include the following parameters only if relevant: - breed (if mentioned in the description) - size (one of 'small', 'medium', 'large', 'extra-large') - gender (one of 'male', 'female') - age (one of 'baby', 'young', 'adult', 'senior') - color (if mentioned in the description) - coat (one of 'short', 'medium', 'long', 'wire', 'hairless', 'curly') - location (if mentioned in the description) - good_with_children (1 or 0) - good_with_dogs (1 or 0) - good_with_cats (1 or 0)
Output valid JSON only, with no extra text or commentary. ```
PetFinder API
The app uses these parameters to query the PetFinder API, which returns detailed listings of adoptable pets. Thanks to its robust filtering capabilities, we can ensure that users only see the results that matter most.
If you'd like to dive into the module we developed to facilitate and streamline interaction with the PetFinder API, be sure to check out that set of code here.
JavaScript
Results are dynamically displayed on the page using JavaScript for a seamless user experience. The template (index.html) provides the foundational structure of the page, while JavaScript handles rendering the results in real time.
You can view the app’s core logic here:
Free and Accessible for Everyone
Rover is completely free to use—no ads, no hidden fees, just a love for connecting people with adoptable dogs. We don't even care about your data. We’re using OpenAI’s GPT-4o-mini model to process queries, which makes natural language search both powerful and cost-effective.
At $0.00025 per input token and $0.001 per output token, a typical query and response use about 250 tokens total. This breaks down to roughly $0.0002125 per query, meaning a $10 budget allows for approximately 50,000 searches.
By leveraging affordable AI pricing, we’re able to keep Rover accessible to everyone, simplifying the adoption search while bridging the gap between dogs in need and their potential owners.
50,000 chances to find a new best friend? Those odds are pretty decent.
Why This Matters
While this work isn’t revolutionary, its purpose is simple: to make adopting a dog easier and more approachable. For anyone who’s ever felt overwhelmed navigating adoption sites, this app aims to reduce friction and save time.
We know this project won’t change the world, but it might change a dog’s life—and that’s enough for us.
Try It Yourself
We’d love for you to give Rover a try or even create your own version. Here’s how you can get started:
- Explore the Live App: Visit lambdasandlapdogs.com/rover and search for your perfect companion.
- Check Out the Code: Clone or fork the proof-of-concept repository on GitHub: Rover Repository.
- Build Your Own: Use the provided examples and documentation to adapt the app for other pet types—or even other use cases entirely!
Wrapping Up
Rover is a small project with a big heart. It’s powered by accessible technology like ChatGPT, the PetFinder API, and Flask to help make dog adoption a little easier. We hope it inspires others to explore how AI and open data can create meaningful, simple solutions to real-world problems.
If Rover helps one dog find a loving home, we’ve done our job. But if it helps more, all the better.