# Chosic — 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 for songs on Chosic and discover similar tracks filtered by audio attributes like energy, happiness, danceability, and more. Returns song titles, artists, Spotify IDs, and thumbnail images.

**Category:** Music | **Website:** [chosic.com/](https://chosic.com/) | **Docs:** [parse.bot/marketplace/806b324e-026c-458f-a914-ea4f16830a62/chosic-com-api](https://parse.bot/marketplace/806b324e-026c-458f-a914-ea4f16830a62/chosic-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-chosic-com-api-806b324e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_similar_songs

Find similar songs for a given seed track. Provide either a Spotify track ID directly via `track_id`, or a `song_title` (optionally with `artist_name`) to resolve the seed track via search first. Supports mood-based filtering through optional audio feature parameters (energy, happiness, danceability, acousticness, instrumentalness, popularity) each on a 0-100 scale. Returns up to `limit` recommendations. Each result includes Spotify track ID, title, artist, album name, and image URL (image may be null).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `acousticness` | integer | No | Target acousticness (0-100) |
| `artist_name` | string | No | Artist name combined with song_title to improve seed track search accuracy |
| `danceability` | integer | No | Target danceability (0-100) |
| `energy` | integer | No | Target energy level (0-100) |
| `happiness` | integer | No | Target happiness/valence (0-100) |
| `instrumentalness` | integer | No | Target instrumentalness (0-100) |
| `limit` | integer | No | Maximum number of similar songs to return |
| `popularity` | integer | No | Target popularity (0-100) |
| `song_title` | string | No | Song title used to search for the seed track when track_id is not provided |
| `track_id` | string | No | Spotify Track ID to find similar songs for. If not provided, song_title is used to search for the seed track. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-chosic-com-api-806b324e/get_similar_songs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"acousticness":"<integer>","artist_name":"<string>","danceability":"<integer>","energy":"<integer>","happiness":"<integer>","instrumentalness":"<integer>","limit":"<integer>","popularity":"<integer>","song_title":"<string>","track_id":"<string>"}'
```

### search_songs

Full-text search for songs on Chosic. Matches against song titles and artist names. Returns up to `limit` results, each with a Spotify track ID, title, primary artist name, and thumbnail image URL. No pagination beyond the limit parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return |
| `query` | string | Yes | Search keyword (song title, artist name, or both) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-chosic-com-api-806b324e/search_songs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>"}'
```
