# Mvnrepository — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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 Maven artifacts and retrieve detailed information about Java libraries, including artifact details, relocation notices, and popular package rankings. Find the exact dependencies you need and discover trending open-source projects in the Maven ecosystem.

**Category:** Developer Tools | **Website:** [mvnrepository.com/](https://mvnrepository.com/) | **Docs:** [parse.bot/marketplace/9c71766e-1fbd-4cb3-838f-5af3a5437438/mvnrepository-com-api](https://parse.bot/marketplace/9c71766e-1fbd-4cb3-838f-5af3a5437438/mvnrepository-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-mvnrepository-com-api-9c71766e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_artifact

Get details for a specific Maven artifact, including its relocation status, license, categories, and latest version information. Returns the full metadata for one artifact identified by its group and name coordinates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `group` | string | Yes | Maven group ID (e.g., 'org.junit.jupiter', 'org.mortbay.jetty'). |
| `name` | string | Yes | Maven artifact ID (e.g., 'junit-jupiter-api', 'jetty'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mvnrepository-com-api-9c71766e/get_artifact \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"group":"<string>","name":"<string>"}'
```

### get_popular

Get the most popular artifacts on Maven Repository, ranked by usage count. Returns approximately 100 artifacts ordered by their popularity rank.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mvnrepository-com-api-9c71766e/get_popular \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search

Search for Maven artifacts by keyword. Returns paginated results with up to 10 artifacts per page. Out-of-range page numbers return empty results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mvnrepository-com-api-9c71766e/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
