# Dota2protracker — 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 high-level Dota 2 gameplay by accessing real-time hero winrates, professional player match history, and facet performance data. Search the hero database and analyze current meta trends to inform your draft strategy and competitive play.

**Category:** Sports | **Website:** [dota2protracker.com/](https://dota2protracker.com/) | **Docs:** [parse.bot/marketplace/88cc8d49-9a24-4a20-b021-0bef5a8b1815/dota2protracker-com-api](https://parse.bot/marketplace/88cc8d49-9a24-4a20-b021-0bef5a8b1815/dota2protracker-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-dota2protracker-com-api-88cc8d49/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_heroes

Retrieves the full roster of Dota 2 heroes with ELO ratings, winrates, and match counts broken down by position (1-5) and aggregate. Returns all heroes in a single response with no filtering — client-side filtering is required for position or attribute analysis. Each hero includes per-position statistics so callers can identify position-specific meta trends.

**Estimated cost:** Metered

_No parameters required._

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

### get_matches

Fetches recent high MMR matches sorted by activation time descending. Each match includes team scores, MMR bracket, duration, banned heroes, and a full player roster with per-player stats (kills, deaths, assists, net worth, hero damage, tower damage, facet info, neutral items, and periodic networth snapshots). Supports offset-based manual pagination via limit and offset parameters. Optionally filter to a specific date range using start_date and end_date (client-side filtering on activate_time).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `days` | integer | No | Number of days to look back for matches. Must be between 1 and 30. |
| `end_date` | string | No | End of date range filter (inclusive), ISO format YYYY-MM-DD. Matches with activate_time after this date are excluded. Used as an alternative to or alongside the days parameter. |
| `limit` | integer | No | Number of matches to return per request. Must be between 1 and 200. |
| `offset` | integer | No | Offset for pagination. Use with limit to page through results. |
| `start_date` | string | No | Start of date range filter (inclusive), ISO format YYYY-MM-DD. Matches with activate_time before this date are excluded. Used as an alternative to or alongside the days parameter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dota2protracker-com-api-88cc8d49/get_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":"<integer>","end_date":"<string>","limit":"<integer>","offset":"<integer>","start_date":"<string>"}'
```

### search

Searches the Dota2ProTracker database for heroes and players. The heroes array always contains the full roster regardless of query; the players array is filtered by the query string matching player names. Omitting the query returns a default player list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Hero or player name keyword to search for. Filters the players list by name match. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dota2protracker-com-api-88cc8d49/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
