# Onapi — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve detailed information about trademarks, patents, and institutional news from the Dominican Republic's National Industrial Property Office (ONAPI). Monitor trademark registrations, patent applications, expedient status updates, and browse available sign types and countries in their database.

**Category:** Government & Public Data | **Website:** [onapi.gov.do/](https://onapi.gov.do/) | **Docs:** [parse.bot/marketplace/29aebc2b-18a1-4524-b8ee-7e9901bbd989/onapi-gov-do-api](https://parse.bot/marketplace/29aebc2b-18a1-4524-b8ee-7e9901bbd989/onapi-gov-do-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get countries

Retrieve the list of countries available in the ONAPI system. Each entry has an id (country code) and nombre (country name in Spanish).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/get-countries \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get expedient status

Check the current status and event history of a trademark or patent application expedient. Returns the expedient details along with a chronological list of events (eventos) documenting the lifecycle of the application.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `numero` | string | Yes | Expedient number (e.g. '5808'). Obtainable from search_trademarks or search_patents results. |
| `serie` | string | Yes | Expedient series (e.g. '2003'). Obtainable from search_trademarks or search_patents results. |
| `tipo_exped` | string | No | Expedient type. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/get-expedient-status \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"numero":"<string>","serie":"<string>","tipo_exped":"<string>"}'
```

### Get news articles

Retrieve the latest news and institutional announcements from the ONAPI website. Returns article titles and links scraped from the news section. Articles are returned in reverse chronological order.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/get-news-articles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get sign types

Retrieve available sign types and their subtypes for use as filters in search_trademarks. Each type has an id code, human-readable nombre, and array of subTipos with their own ids.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/get-sign-types \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get trademark detail

Get full details of a specific trademark by its expedient series and number. Returns holder information, agent, images, Nice Classification classes, and registration dates. The serie and numero values are obtained from search_trademarks results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `numero` | string | Yes | Expedient number (numeroExpediente, e.g. '5808'). Obtainable from search_trademarks results. |
| `serie` | string | Yes | Expedient series (serieExpediente, e.g. '2003'). Obtainable from search_trademarks results. |
| `tipo_exped` | string | No | Expedient type. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/get-trademark-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"numero":"<string>","serie":"<string>","tipo_exped":"<string>"}'
```

### Search patents

Search for patents and inventions registered with ONAPI. Returns matching patent records with title, inventors, applicants, CIP classification, and status. All parameters are optional; at least one should be provided for meaningful results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `applicant` | string | No | Applicant name. |
| `cip` | string | No | CIP (International Patent Classification) code (e.g. 'H02S'). |
| `inventor` | string | No | Inventor name. |
| `reg_num` | string | No | Registration number. |
| `solicitud` | string | No | Application number. |
| `summary` | string | No | Abstract/Summary text search. |
| `title` | string | No | Patent title search text (e.g. 'solar'). |
| `type` | string | No | Patent type filter. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/search-patents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"applicant":"<string>","cip":"<string>","inventor":"<string>","reg_num":"<string>","solicitud":"<string>","summary":"<string>","title":"<string>","type":"<string>"}'
```

### Search trademarks

Search for trademarks (signos distintivos) by text query, type, and Nice Classification classes. Returns a list of matching trademark records with registration details including expedient series/number, certificate number, status, and expiration date. All parameters are optional; omitting all returns an unfiltered result set.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `classes` | string | No | Nice Classification class filters, comma-separated (e.g. '32' or '1,2,3'). |
| `query` | string | No | Search text (name of the trademark, e.g. 'COCA COLA'). |
| `subtype` | string | No | Subtype filter (e.g. 'PS' for Marca de Fabrica, 'CO' for Colectiva, 'CE' for Certificación). Values depend on selected type; retrieve via get_sign_types. |
| `type` | string | No | Sign type filter. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/onapi/search-trademarks \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"classes":"<string>","query":"<string>","subtype":"<string>","type":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.