# Get real-time answers from Dappier's Real Time Search API

Dappier's Real Time Search API takes one natural-language question about what is happening now, such as headlines, share prices, weather, travel or events, and returns the answer as text in a single `message` field. Real Time Search is listed at $0, but a call still needs credit: either a receipt from a small credit bought without registering, or a Prepaid credits balance held by an agent credential. Send `POST https://agents.dappier.com/zcj/z18zc03ul6uc/zeroclick/aimodel/am_01j06ytn18ejftedz6dyhz2b15` with a `query` and that credential in `Authorization`.

## At a glance

- **Endpoint:** `POST https://agents.dappier.com/zcj/z18zc03ul6uc/zeroclick/aimodel/am_01j06ytn18ejftedz6dyhz2b15`, one question per request
- **Body:** `{"query": "<natural-language question>"}`. `query` is the only field the spec defines.
- **Price:** listed at $0, drawn from a receipt's credit or a Prepaid credits balance
- **Access:** `Authorization: Receipt <receiptId>` or `Authorization: Bearer <access token>`. No upstream Dappier API key is needed.
- **Funding:** the small credit is paid from a wallet. Prepaid credits start at $0.01 from a wallet, or $0.50 by card.
- **Response:** JSON `{"message": "<answer text>"}` and a `zc-billing` header
- **Full purchase flow:** [the buyer skill](https://agents.dappier.com/zcj/z18zc03ul6uc/SKILL.md)

## Get credit with a receipt or Prepaid credits

Pick the credential that matches how you will call the API.

| Situation | Credit to get | Header on each query |
| --- | --- | --- |
| Acting on your own with no human in the loop, a few queries, no registration | A small credit bought without registering | `Authorization: Receipt <receiptId>` |
| Ongoing use, top-ups, or a balance you can recover later | Prepaid credits, bought with an agent credential | `Authorization: Bearer <access token>` |

A receipt is the `receiptId` returned when you buy the small credit without registering. It is the credit itself, so keep it private.

Prepaid credits need a bearer credential, the agent identity the storefront issues at [auth.md](https://agents.dappier.com/zcj/z18zc03ul6uc/auth.md).

[The buyer skill](https://agents.dappier.com/zcj/z18zc03ul6uc/SKILL.md) covers both purchases end to end.

## Send a real-time search query

1. Send the question with your credential:

   ```bash
   curl -s -X POST https://agents.dappier.com/zcj/z18zc03ul6uc/zeroclick/aimodel/am_01j06ytn18ejftedz6dyhz2b15 \
     -H "Content-Type: application/json" \
     -H "Authorization: Receipt $RECEIPT_ID" \
     -d '{"query": "What are the main weather alerts in the United States today?"}'
   ```

   With Prepaid credits, send `-H "Authorization: Bearer $ACCESS_TOKEN"` instead. Everything else stays the same.

2. Read the answer from `message`. The response is a JSON object with one field, `message`, a string that holds the answer text.

   ```json
   {"message": "<answer text>"}
   ```

3. Check the balance in the `zc-billing` response header. A credit-funded response reports `fundingSource`, `chargedUsd` and `remainingCreditUsd` in that header. Use `remainingCreditUsd` to decide when to buy more credit.

## Limits

- One question per request, as a single `query` string. The response is answer text. It is not a list of search results to read through.
- Queries are sold on credit, not one by one. A query with no credential gets `401 bearer_required`, not a price quote, and each query draws on the credit.
- A receipt spends only its own balance. It cannot be topped up and cannot reach identity endpoints. Losing the receipt loses its remaining credit.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | The query carried no credential | Send a receipt or a bearer |
| `401 invalid_receipt` | The receipt is malformed, pending, revoked or for another seller | Send only the `receiptId` from a successful credit purchase |
| `402 receipt_credit_exhausted` or `receipt_credit_insufficient` | The receipt's balance cannot cover the call | Buy a new small credit for a new receipt, or buy Prepaid credits with a bearer |
| `401 invalid_token` (`token_expired`) | The access token expired | Exchange the stored assertion again at `https://agents.dappier.com/zcj/z18zc03ul6uc/oauth2/token` |
| `403 plan_required` | The bearer holds no plan covering the call | Buy Prepaid credits at `/plans/{planId}/purchase`, then retry |
| `usage_exhausted` | The Prepaid credits balance is used up | Top up with `POST https://agents.dappier.com/zcj/z18zc03ul6uc/extend` and `{"amountUsd": "..."}` |

## Frequently asked questions

### Does Dappier's real-time search API return links or a list of results?

No. This route returns one answer as text in the `message` field of a JSON object, so there is no result list to parse.

### Do I need an account or an API key to call Real Time Search?

No Dappier API key is needed. A receipt from a small credit bought without registering is enough to call the API. Prepaid credits need an agent credential, which the storefront issues with no email required to start.

### What does a Real Time Search query cost?

Real Time Search is listed at $0. Each call still needs a receipt's credit or a Prepaid credits balance, and the `zc-billing` header on each response reports `chargedUsd` and `remainingCreditUsd`.

### What questions can I send to Real Time Search?

Send natural-language questions about what is happening now: the latest headlines, share prices and market moves, the weather, travel, and events. Ask one question per request, in `query`.

## Keep reading

- [Buyer skill](https://agents.dappier.com/zcj/z18zc03ul6uc/SKILL.md): the full purchase flow
- [Identity](https://agents.dappier.com/zcj/z18zc03ul6uc/auth.md): register and exchange an agent credential
- [How to pay](https://agents.dappier.com/zcj/z18zc03ul6uc/payment.md): rails, Prepaid credits and top-ups
- [Error reference](https://agents.dappier.com/zcj/z18zc03ul6uc/errors.md): every error code and the action for each

---

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