# Datagolf — 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.

> Track professional golfers' strokes gained performance metrics across tournaments and rounds by accessing top player rankings and detailed historical SG data. Analyze how elite golfers perform in specific competitions to compare their scoring efficiency over time.

**Category:** Sports | **Website:** [datagolf.com/](https://datagolf.com/) | **Docs:** [parse.bot/marketplace/16236828-f92a-42c3-8f23-430c74a09822/datagolf-com-api](https://parse.bot/marketplace/16236828-f92a-42c3-8f23-430c74a09822/datagolf-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-datagolf-com-api-16236828/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_player_sg_data

Retrieve detailed round-level strokes gained (SG) data for a specific player, organized by tournament and round. Includes category-level SG metrics: OTT, APP, ARG, PUTT, and total. Tournaments are returned newest first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dg_id` | string | Yes | The Data Golf player ID, obtainable from the get_top_players endpoint. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-datagolf-com-api-16236828/get_player_sg_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dg_id":"<string>"}'
```

### get_top_players

Fetch the current top-ranked players from Data Golf, including their unique dg_id, rank, and country. Returns all players listed on the rankings page.

**Estimated cost:** Metered

_No parameters required._

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