# Search parenting articles with Dappier's CafeMom Parenting API

Dappier's CafeMom Parenting data model searches articles on parenting advice, family life and self-care across CafeMom, Mom.com, LittleThings and MamasLatinas in a single request. Each search costs $0.01 and draws on prepaid credit. Send `POST https://agents.dappier.com/zcj/8veczqtyhenu/zeroclick/v2/search?data_model_id=dm_01jketafckeh0vxacqv1s295j0` with a `query` and `"search_algorithm": "semantic"`, authorized by a receipt or by an agent credential that holds Prepaid credits.

## At a glance

- **Endpoint:** `POST https://agents.dappier.com/zcj/8veczqtyhenu/zeroclick/v2/search?data_model_id=dm_01jketafckeh0vxacqv1s295j0`
- **Body:** `query` (required), `search_algorithm` (`semantic`, `most_recent_semantic`, `most_recent` or `trending`), `similarity_top_k` (the number of articles), plus optional `page` and `num_results`.
- **Price:** $0.01. Each request counts as one query.
- **Authorization:** `Authorization: Receipt <receiptId>` or `Authorization: Bearer <token>`. You do not need a Dappier API key.
- **Payment:** each search draws one query's price from credit. The minimum purchase is $0.01, or $0.50 by card. [The buyer skill](https://agents.dappier.com/zcj/8veczqtyhenu/SKILL.md) covers getting credit.
- **Response:** JSON `response.results[]` with `title`, `summary`, `url`, `site`, `pubdate` and more, plus a `zc-billing` header.
- **Full purchase flow:** [the buyer skill](https://agents.dappier.com/zcj/8veczqtyhenu/SKILL.md)

## Search parenting articles

1. Get a receipt or a Prepaid credits balance, following [the buyer skill](https://agents.dappier.com/zcj/8veczqtyhenu/SKILL.md).

2. Send the search with the CafeMom Parenting `data_model_id` and the semantic algorithm:

   ```bash
   curl -s -X POST "https://agents.dappier.com/zcj/8veczqtyhenu/zeroclick/v2/search?data_model_id=dm_01jketafckeh0vxacqv1s295j0" \
     -H "Authorization: Receipt $RECEIPT_ID" \
     -H "Content-Type: application/json" \
     -d '{"query": "toddler sleep schedule", "search_algorithm": "semantic", "similarity_top_k": 3}'
   ```

   With a credits balance, send `Authorization: Bearer $ACCESS_TOKEN` instead. This example request returned three results and drew $0.01 from credit.

3. Read the results. The response has this shape:

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

   The response also carries a header that shows what the search drew from credit:

   ```text
   zc-billing: {"status":"settled","fundingSource":"credit","chargedUsd":"<amount>","remainingCreditUsd":"<amount>"}
   ```

## Use the result fields

| Purpose | Field |
| --- | --- |
| Name the article | `title` |
| Answer from the article's content | `summary`, `preview_content` |
| Link to the article | `url` (`source_url` is the tracking URL) |
| Show which of the four sites it came from | `site`, `site_domain` |
| Sort or filter by date | `pubdate`, `pubdate_unix` |
| Rank by relevance | `score` |
| Show a thumbnail | `image_url`. Append `&w=400&h=200`, with your own sizes, to resize it. |

## Choose a search algorithm

Set `search_algorithm` on every request: Dappier's reference gives two different defaults.

| Purpose | `search_algorithm` |
| --- | --- |
| Articles that best match the question | `semantic` |
| Matching articles, newest first | `most_recent_semantic` |
| Newest articles by publication date | `most_recent` |
| Articles on keywords trending in the past 24 hours | `trending` |

The `query` field can be a question, a keyword or a URL. If you send a URL, the search analyzes that page and returns articles related to its content.

## Boundaries

- Each request searches one data model, chosen by `data_model_id`.
- Every request is billed as one query. The values of `similarity_top_k`, `page` and `num_results` do not change the price.
- The route returns articles, not a written answer.
- A response without a `zc-billing` header billed nothing.
- You cannot top up a receipt. If you lose a receipt, its remaining credit is lost with it. Top-ups and larger balances require an agent identity.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | The call carried no receipt or credential | Get credit as in step 1, then retry |
| `401 invalid_receipt` | The receipt is not valid here: malformed, still pending, revoked or issued by another seller | Send only the `receiptId` from a successful credit purchase |
| `402 receipt_credit_exhausted` or `receipt_credit_insufficient` | The receipt cannot cover the query | Buy a new receipt, or use a credits balance |
| `403 plan_required` | The credential holds no plan that covers this call | Buy Prepaid credits with your bearer, then retry |
| `usage_exhausted` | The credits balance is used up | Top up with `POST https://agents.dappier.com/zcj/8veczqtyhenu/extend` and `{"amountUsd": "..."}` |
| `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=dm_01jketafckeh0vxacqv1s295j0` |
| `422`, `query cannot be empty` | The body has no query text | Send a non-empty `query` |

For any other code, see the [error reference](https://agents.dappier.com/zcj/8veczqtyhenu/errors.md).

## Frequently asked questions

### Does one CafeMom API call search all four parenting sites?

Yes. The CafeMom Parenting data model covers CafeMom, Mom.com, LittleThings and MamasLatinas, as Dappier describes it. Each result's `site` and `site_domain` fields name the site the article came from.

### How much does a parenting article search cost?

$0.01 per request, drawn from a receipt or a Prepaid credits balance. A request counts as one query however many articles it returns.

### Can I search parenting articles without registering?

Yes. Anonymous credit is a small credit you buy without registering on a wallet rail. It returns a receipt that you send as `Authorization: Receipt <receiptId>`. A larger balance or a top-up needs an agent credential.

### How do I get the newest parenting articles on a topic?

Set `search_algorithm` to `most_recent_semantic`. It runs a semantic search and returns the most recent matching articles by publication date.

## Keep reading

- [Buyer skill](https://agents.dappier.com/zcj/8veczqtyhenu/SKILL.md): getting a receipt or Prepaid credits
- [How to pay](https://agents.dappier.com/zcj/8veczqtyhenu/payment.md): rails, credits and top-ups
- [API reference](https://agents.dappier.com/zcj/8veczqtyhenu/openapi.json): the full search request and response schema
- [Error reference](https://agents.dappier.com/zcj/8veczqtyhenu/errors.md): every code and what to do
- [Dappier](https://dappier.com/): the publisher data behind the search

---

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