# Search iHeartDogs and iHeartCats articles with Dappier's pet care API

Dappier's publisher search takes a pet owner's question in plain language and returns matching articles from iHeartDogs or iHeartCats. An iHeartDogs query costs $0.01 and an iHeartCats query $0.01, both drawn from prepaid credit. Send `POST https://agents.dappier.com/zcj/jrc6bw4oft96/zeroclick/v2/search` with the publisher's `data_model_id`, the question as `query` and `search_algorithm` set to `semantic`.

## At a glance

- **Endpoint:** `POST https://agents.dappier.com/zcj/jrc6bw4oft96/zeroclick/v2/search?data_model_id=<id>`
- **Data models:** iHeartDogs `dm_01j1sz8t3qe6v9g8ad102kvmqn`, iHeartCats `dm_01j1sza0h7ekhaecys2p3y0vmj`
- **Body:** `query` (required), `search_algorithm` (`semantic`), `similarity_top_k` (number of articles)
- **Price:** iHeartDogs $0.01, iHeartCats $0.01
- **Access:** `Authorization: Bearer <token>` for a credential that holds Prepaid credits, or `Authorization: Receipt <receiptId>` from anonymous credit. Calls are sold on plans: a call with no credential answers `401 bearer_required`.
- **Response:** JSON with `response.results`, one object per article: `title`, `summary`, `url` and more. The `zc-billing` header shows what the call drew.
- **Full purchase flow:** [the buyer skill](https://agents.dappier.com/zcj/jrc6bw4oft96/SKILL.md)

## Choose the data model

Each request searches one publisher, set by the `data_model_id` query parameter.

| The owner asks about | `data_model_id` | Price |
| --- | --- | --- |
| A dog: health, behavior, grooming, ownership | `dm_01j1sz8t3qe6v9g8ad102kvmqn` | $0.01 |
| A cat: health, behavior, lifestyle | `dm_01j1sza0h7ekhaecys2p3y0vmj` | $0.01 |

Set `search_algorithm` to match how the question should be answered:

| Goal | `search_algorithm` |
| --- | --- |
| Articles that match the owner's question | `semantic` |
| Semantic search that retrieves the most recent articles by publication date | `most_recent_semantic` |

## Search for articles that answer the question

1. Get credit to spend. You can use a Prepaid credits balance held by a bearer credential, which is the agent identity the storefront issues. You can also buy anonymous credit, a small credit bought on a wallet rail without registering, which returns a receipt. Credits start at $0.01, or $0.50 by card, and [the buyer skill](https://agents.dappier.com/zcj/jrc6bw4oft96/SKILL.md) covers both routes.

2. Send the owner's question to the right data model:

   ```bash
   curl -s -D - -X POST "https://agents.dappier.com/zcj/jrc6bw4oft96/zeroclick/v2/search?data_model_id=dm_01j1sz8t3qe6v9g8ad102kvmqn" \
     -H "Authorization: Receipt $RECEIPT_ID" \
     -H "Content-Type: application/json" \
     -d '{"query": "how often should a puppy eat", "search_algorithm": "semantic", "similarity_top_k": 3}'
   ```

   For a cat question, change the id and the question:

   ```bash
   curl -s -D - -X POST "https://agents.dappier.com/zcj/jrc6bw4oft96/zeroclick/v2/search?data_model_id=dm_01j1sza0h7ekhaecys2p3y0vmj" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"query": "why does my cat scratch furniture", "search_algorithm": "semantic", "similarity_top_k": 3}'
   ```

3. Read the response. A `200` has this shape, with one result per article:

   ```json
   {
     "status": "<string>",
     "response": {
       "query": "<string>",
       "message": "<string>",
       "results": [
         {"title": "<string>", "summary": "<string>", "preview_content": "<string>", "url": "<string>", "source_url": "<string>", "author": "<string>", "pubdate": "<string>", "pubdate_unix": 0, "score": 0, "site": "<string>", "site_domain": "<string>", "image_url": "<string>"}
       ]
     }
   }
   ```

   The puppy example returns three results in this shape and draws $0.01 from credit. The cat example returns three results in the same shape and draws $0.01 from credit.

4. Check the `zc-billing` response header. On a call funded by credit, it reads `{"status": "...", "fundingSource": "credit", "chargedUsd": "...", "remainingCreditUsd": "..."}`. `remainingCreditUsd` is the balance left for the next query.

## Use the result fields

| Field | Use |
| --- | --- |
| `title`, `summary` | The article title and a summary of its content |
| `preview_content` | A short preview of the article |
| `url` | The article link to give the owner |
| `source_url` | The tracking URL for the article |
| `score` | Relevance, for ordering or cutting results |
| `pubdate`, `pubdate_unix` | Publication date, as text and as a UNIX timestamp |
| `site`, `site_domain`, `author` | Attribution |
| `image_url` | Article image. Append `&w=400&h=200` with your sizes to resize it. |

## Limits

- One data model per request. A question that covers both dogs and cats takes two queries, and each one is billed.
- `query` can also be a URL. The search then reads that page and returns articles related to its content.
- Results carry the fields listed above, including a summary and a short preview.
- A call without a covering credential is refused with `401` or `403`. The purchase 402 is what you pay, and each successful query then draws its price from your balance.
- A receipt spends only its own credit and cannot be topped up. If you lose the receipt, you lose its remaining credit.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | No credential or receipt was sent | Get credit through [the buyer skill](https://agents.dappier.com/zcj/jrc6bw4oft96/SKILL.md), then retry |
| `401 invalid_receipt` | The receipt is malformed, pending or not for this seller | Send the `receiptId` from a successful anonymous credit purchase |
| `402 receipt_credit_exhausted` / `receipt_credit_insufficient` | The receipt cannot cover the query | Buy new anonymous credit, or a larger balance with a bearer |
| `403 plan_required` | The bearer holds no plan that covers the search | Buy Prepaid credits with your bearer, then retry |
| `usage_exhausted` | The Prepaid credits balance ran out | Top up with `POST https://agents.dappier.com/zcj/jrc6bw4oft96/extend` |
| `400 conflicting_payment_credentials` | A receipt and a payment proof were sent together | Send the receipt on its own |
| `400` `data_model_id is required` | The query parameter is missing | Add `data_model_id` to the URL |
| `422` | `query` was empty, or the model id has the wrong format | Send a non-empty question and one of the two ids |
| `404` | The data model could not be resolved | Use one of the two ids above |

## Frequently asked questions

### Is there an iHeartDogs API for AI agents?

Yes. Dappier's storefront serves iHeartDogs articles through `POST https://agents.dappier.com/zcj/jrc6bw4oft96/zeroclick/v2/search` with `data_model_id` set to `dm_01j1sz8t3qe6v9g8ad102kvmqn`. Each query costs $0.01 and is paid from prepaid credit or a receipt.

### Can one search return both dog and cat articles?

No. Each request searches one data model. Send the dog question to iHeartDogs and the cat question to iHeartCats as separate queries.

### How much do pet care article searches cost?

Each iHeartDogs query costs $0.01, and each iHeartCats query costs $0.01. Ten iHeartDogs queries cost $0.10. The `zc-billing` header on each response shows what that call drew.

### Do I need a Dappier API key?

No. A call needs a storefront credential instead: a bearer that holds Prepaid credits, or a receipt from anonymous credit bought without registering. [The buyer skill](https://agents.dappier.com/zcj/jrc6bw4oft96/SKILL.md) explains how to get either one.

## Keep reading

- [Buyer skill](https://agents.dappier.com/zcj/jrc6bw4oft96/SKILL.md): the full purchase flow
- [How to pay](https://agents.dappier.com/zcj/jrc6bw4oft96/payment.md): credits, receipts and top-ups
- [Error reference](https://agents.dappier.com/zcj/jrc6bw4oft96/errors.md): every error code
- [API reference](https://agents.dappier.com/zcj/jrc6bw4oft96/openapi.json): the search operation's full schema
- [iHeartDogs AI](https://agents.dappier.com/zcj/jrc6bw4oft96/services/iheartdogs-ai): service and price
- [iHeartCats AI](https://agents.dappier.com/zcj/jrc6bw4oft96/services/iheartcats-ai): service and price

---

Updated 2026-10-16. All Dappier guides: https://agents.dappier.com/guides.md. Storefront: https://agents.dappier.com/zcj/jrc6bw4oft96/llms.txt.
