# Store and agent directories

The public directories list stores with a verified origin and recent Provenance use, and verified agents, so agents and people can find them. Each can opt out.

The store directory lists the stores that accept Provenance, and the agent directory lists verified agents. Agents read them from the API to find stores that accept network grants; people browse them at [/stores](https://provenanceauth.com/stores) and [/agents](https://provenanceauth.com/agents).

## When to use it

- An agent looks for stores in a category that accept network grants.
- A store shows the **Accepts Provenance** mark at checkout.
- An agent maker shows its agent's record next to its listing.

## How it works

A store origin is listed while all of these hold:

1. **The origin is proven.** The store publishes its store id at `/.well-known/provenance-store.json` or in a DNS TXT record, and the daily check finds it. An unreachable proof pauses the listing.
2. **The store uses Provenance there.** In the last 30 days it accepted a network order, created a checkout approval, or ran Identify traffic on that origin.
3. **The store didn't opt out.** "Don't list my store" in **Settings → Store → Network** takes it out within an hour.

The first listing emails the account owner with the opt-out link. A listing shows the name and logo from your branding (or the origin), the origin, the categories you chose and what you accept. It never shows volumes.

Agents are listed when they have an active signing key and aren't suspended. The record appears only when the maker turns on **Show our record**, with the same [minimums](https://provenanceauth.com/docs/authorize/concepts/network-signals.md#minimums) stores get.

## Reading the directories

[`GET /v1/public/stores`](https://provenanceauth.com/docs/api/network.md#get-v1-public-stores) and [`GET /v1/public/agents`](https://provenanceauth.com/docs/api/network.md#get-v1-public-agents) are keyless, paginated and cached for 5 minutes. Filter stores with `?category=`; network grants' `allowed_categories` use the same list.

| Category | Meaning |
| --- | --- |
| `books_media` | Books and media |
| `electronics` | Electronics |
| `fashion` | Fashion |
| `food_grocery` | Food and grocery |
| `health_beauty` | Health and beauty |
| `home_garden` | Home and garden |
| `office_supplies` | Office supplies |
| `pets` | Pets |
| `sports_outdoors` | Sports and outdoors |
| `toys_games` | Toys and games |
| `travel` | Travel |
| `digital_goods` | Digital goods |
| `services` | Services |
| `other` | Other |

## The marks

**Powered by Provenance** ends the hosted approval page and the approval components, and push notifications carry the Provenance mark. Listed stores can show **Accepts Provenance** with `<provenance-badge kind="store">`; it checks the page's own origin against the directory, so it renders nothing on an unlisted site.

**Pricing:** listings, verification and the directories are free.

## Example

Both directories are public and need no key. Read the stores in one category with [`GET /v1/public/stores`](https://provenanceauth.com/docs/api/network.md#get-v1-public-stores), and the agents with [`GET /v1/public/agents`](https://provenanceauth.com/docs/api/network.md#get-v1-public-agents):

**curl**

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
curl -s "$PROVENANCE_API/v1/public/stores?category=office_supplies&limit=10"
```

**Node**

```ts
const stores = await (await fetch(`${process.env.PROVENANCE_API}/v1/public/stores?category=office_supplies&limit=10`)).json();
```

**Python**

```python
import os, httpx

stores = httpx.get(f"{os.environ['PROVENANCE_API']}/v1/public/stores", params={"category": "office_supplies", "limit": 10}).json()
```

```json
{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null
}
```

The sandbox lists no stores until one lists itself; see [list or unlist your store](https://provenanceauth.com/docs/authorize/guides/list-your-store.md). The agent directory lists every agent with an active signing key:

**curl**

```bash
curl -s "$PROVENANCE_API/v1/public/agents?limit=2"
```

**Node**

```ts
const agents = await (await fetch(`${process.env.PROVENANCE_API}/v1/public/agents?limit=2`)).json();
```

**Python**

```python
agents = httpx.get(f"{os.environ['PROVENANCE_API']}/v1/public/agents", params={"limit": 2}).json()
```

```json
{
  "object": "list",
  "data": [
    { "object": "directory_agent", "id": "agt_01JDSAMPLE0TIDEPOOL0SALES00", "name": "Tidepool Sales", "category": null, "maker": "Saltmarsh Data", "signing_key": "active" }
  ]
}
```

## Related

- [List or unlist your store](https://provenanceauth.com/docs/authorize/guides/list-your-store.md)
- [Network grants](https://provenanceauth.com/docs/mandate/concepts/network-grants.md)
- [Network signals](https://provenanceauth.com/docs/authorize/concepts/network-signals.md)
