# The form library

Search the forms Emboss already knows and create one from its slug instead of uploading a file.

## List or search the library

```
GET /library
```

With no query, lists every active form in the library. Authenticated with a q parameter, searches by slug, title and alias. No query means no auth is required; a search with q requires a Bearer key.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| q | query | string | no | Optional. Free text matched against each form's slug, title and aliases, case-insensitive, ignoring punctuation. Requires a Bearer key when given. |

```curl
curl "https://api.getemboss.ai/library?q=w-9" \
  -H "Authorization: Bearer sk_..."
```

```js
const res = await fetch("https://api.getemboss.ai/library?q=w-9", {
  headers: { Authorization: "Bearer sk_..." },
});
const { results } = await res.json();
```

```python
import requests

res = requests.get(
    "https://api.getemboss.ai/library",
    params={"q": "w-9"},
    headers={"Authorization": "Bearer sk_..."},
)
results = res.json()["results"]
```

### Response

```json
{
  "results": [
    { "slug": "irs-w-9", "title": "Form W-9, Request for Taxpayer Identification Number and Certification", "agency": "IRS", "revision": "Rev. March 2024", "page_count": 6 }
  ]
}
```

### Status codes

| Code | Meaning |
| --- | --- |
| 200 | The matching (or, with no query, every active) library form. An empty list is still 200. |
| 401 | q was given without a valid API key. |
| 429 | Rate limit exceeded. |

## See also

- [Quickstart](https://getemboss.ai/docs/quickstart)
- [Pre-fill forms from context documents](https://getemboss.ai/use-cases/prefill-from-context)
