# Knowledge & Enrich

> Look up entities in the knowledge index, or build a structured record for one.

Source: http://localhost:3000/docs/endpoints/knowledge

## Knowledge Lookup: `GET /v1/knowledge`

Look up an entity in the knowledge index by name. Cost: 1 credit.

```bash
curl 'https://api.hushsearch.io/v1/knowledge?q=Anthropic' \
  -H "X-API-Key: hs_live_YOUR_KEY"
```

## Enrich: `POST /v1/enrich`

Build a structured entity record from a name, URL or text. Cost: 4 credits.

```bash
curl -X POST https://api.hushsearch.io/v1/enrich \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Docling",
  "url": "https://github.com/docling-project/docling"
}'
```

## Lookup

**GET** `/v1/knowledge?q=Anthropic` searches entities already in the knowledge index. 1 credit.

```json
{
  "query": "Anthropic",
  "results": [{ "name": "Anthropic", "…": "…" }],
  "credits_used": 1,
  "credits_remaining": 499
}
```

## Enrich

**POST** `/v1/enrich` builds (or refreshes) a structured record from a name, a URL or text you provide. 4 credits.

| Field | Type | Default | Notes |
|---|---|---|---|
| `name` | string | — | **Required.** 1–300 characters. |
| `url` | string | `""` | Page to read about the entity. |
| `content` | string | `""` | Text to extract from instead of fetching. |
| `entity_type` | string | `"article"` | e.g. `organization`, `person`, `product`, `article`. |

```json
{
  "entity_key": "…",
  "name": "Docling",
  "entity_type": "article",
  "url": "https://github.com/docling-project/docling",
  "attributes": { "description": "…" },
  "credits_used": 4,
  "credits_remaining": 495
}
```
