PetRx APIpetrx.com ↗
Search PetRx products, browse collections, list collection items, and fetch full product detail with variants, AutoShip pricing, and availability via API.
What is the PetRx API?
The PetRx API provides 4 endpoints for querying the petrx.com pet pharmacy and supplies catalog. Use search_products to run keyword searches returning up to 24 product cards per page with USD price ranges and brand data, list_collections to enumerate brand and category collections, list_collection_products to page through items in a collection with full variant detail, and get_product to retrieve a single product's complete data including AutoShip subscription pricing.
curl -X GET 'https://api.parse.bot/scraper/242cd00d-ad19-4486-81dd-cc17fefe0b73/search_products?query=flea' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace petrx-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: PetRx SDK — browse collections, search products, drill into detail."""
from parse_apis.petrx_com_api import PetRx, ProductNotFound
client = PetRx()
# Browse the first few collections (brands / categories).
for collection in client.collections.list(limit=5):
print(collection.title, f"({collection.products_count} products)")
# Pick the first collection and list its products.
collection = client.collections.list(limit=1).first()
if collection is not None:
for product in client.collection_products.list(
collection_handle=collection.handle, limit=3
):
variant = product.variants[0] if product.variants else None
print(product.title, variant.price if variant else "no variants")
# Search for a product by keyword, then drill into full detail.
hit = client.product_summaries.search(query="flea", limit=1).first()
if hit is not None:
print(hit.title, f"${hit.price_min:.2f}–${hit.price_max:.2f}")
# Navigate from summary to full product detail.
detail = hit.details()
print(detail.title, "available:", detail.available, "autoship:", detail.has_autoship)
for v in detail.variants or []:
print(f" {v.title} ${v.price:.2f} autoship=${v.autoship_price}")
# Point lookup by handle, with typed error handling.
try:
product = client.products.get(handle="nexgard-plus")
print(product.title, product.vendor, product.tags)
except ProductNotFound:
print("product not found")
print("exercised: collections.list / collection_products.list / product_summaries.search / products.get / details()")
Keyword search over the PetRx product catalog, one page of 24 product cards per call in the site's relevance order. Each card carries the product id, handle (pass unchanged to get_product), title, brand, current and original price range in USD, a short description snippet, page URL and primary image. total_results is the site's reported match count and has_more tells whether a later page exists; page defaults to 1 when omitted. A query with no matches returns total_results 0 and an empty products array.
| Param | Type | Description |
|---|---|---|
| page | integer | 1-based results page number (24 products per page). |
| queryrequired | string | Free-text search term, e.g. a product name, brand, or condition. |
{
"type": "object",
"fields": {
"page": "integer page returned",
"query": "echo of the search term",
"has_more": "boolean, true when a later page exists",
"products": "array of product cards: id, handle, title, vendor, price_min, price_max, compare_at_price_min, compare_at_price_max (USD numbers), description_snippet, url, image_url",
"page_size": "integer, fixed 24 products per page",
"total_results": "integer total matching products reported by the site"
},
"sample": {
"data": {
"page": 1,
"query": "flea",
"has_more": true,
"products": [
{
"id": 8482308358375,
"url": "https://petrx.com/products/nexgard-plus",
"title": "Nexgard Plus",
"handle": "nexgard-plus",
"vendor": "Boehringer Ingelheim",
"image_url": "https://petrx.com/cdn/shop/files/nexgardplus1_512x442.jpg?v=1694468623",
"price_max": 228.99,
"price_min": 109.89,
"description_snippet": "Product Description Description NexGard PLUS chews are designed to be easy to give to dogs...",
"compare_at_price_max": 228.99,
"compare_at_price_min": 109.89
}
],
"page_size": 24,
"total_results": 187
},
"status": "success"
}
}About the PetRx API
Searching and Browsing the Catalog
The search_products endpoint accepts a free-text query string — a product name, brand, or condition — and returns a page of 24 product cards in relevance order. Each card includes id, handle, title, vendor, price_min, price_max, compare_at_price_min, and compare_at_price_max in USD, plus a total_results count so you can calculate page depth. The page parameter is 1-based and has_more tells you whether additional pages exist.
Collections and Inventory Browsing
list_collections pages through the store's public collections — both brand and category groupings — returning each collection's id, handle, title, description, products_count, updated_at ISO timestamp, and image_url. The limit parameter accepts 1–250 collections per page. Once you have a collection handle, pass it to list_collection_products to retrieve the products within that collection. Each product row includes id, handle, title, vendor, product_type, tags, published_at, updated_at, image_url, and a full variants array with per-variant price, compare_at_price, sku, and available fields.
Full Product Detail
get_product takes a product handle (sourced from either search_products or list_collection_products) and returns the complete product record. This includes title, vendor, tags, options (option name and allowed values), a variants array, and both description_html and plain-text descriptions. Each variant carries price, compare_at_price, available, and autoship_price — the lowest AutoShip subscription price in USD, or null if no subscription pricing exists for that variant. The images array lists all product image URLs.
The PetRx API is a managed, monitored endpoint for petrx.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when petrx.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official petrx.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a pet medication price tracker by comparing
price_minandcompare_at_price_minacross search results over time. - Aggregate AutoShip subscription prices from
variants[*].autoship_priceto surface recurring-cost estimates for prescription pet diets. - Enumerate all brand collections via
list_collectionsto build a brand directory with product counts and category metadata. - Sync a full collection's inventory by paging
list_collection_productsand monitoringvariants[*].availablestatus. - Power a pet pharmacy comparison tool by querying
search_productswith drug or supplement names and extracting USD price ranges. - Build a product feed for a pet-focused affiliate site using
get_productto pull complete descriptions, images, and variant options. - Detect sale items by comparing
priceagainstcompare_at_priceacross any collection or search result set.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does PetRx have an official developer API?+
What does `get_product` return that the search and collection endpoints don't?+
get_product returns the full description_html and plain-text description, all images, the options definitions (e.g. size or flavor names and their allowed values), and crucially autoship_price per variant — the lowest AutoShip subscription price in USD. Search and collection endpoints return price ranges and basic variant data but do not include AutoShip pricing or full HTML descriptions.How does pagination work across endpoints?+
search_products returns a fixed 24 products per page and uses has_more plus total_results to indicate depth. list_collections and list_collection_products accept a limit parameter (up to 250) and also use has_more to signal whether another page follows. All endpoints use a 1-based page parameter.Does the API return customer reviews or ratings for products?+
Can I filter search results by price range or availability?+
search_products endpoint does not accept price or availability filter parameters — it mirrors the site's relevance-ordered results for a given query. Price and availability fields are present in the response (price_min, price_max, compare_at_price_min, compare_at_price_max), so filtering can be applied client-side. You can fork this API on Parse and revise it to add server-side filter parameters if needed.