# Flashscore (Spain) — 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.

> Track and compare pre-match betting odds across all sports leagues with daily match overviews showing 1X2 odds, or dive deeper into individual matches to see detailed odds from every bookmaker including opening lines and how odds have shifted. Stay ahead of betting movements with real-time data on odds changes and bookmaker-specific pricing.

**Category:** Sports | **Website:** [www.flashscore.es/](https://www.flashscore.es/) | **Docs:** [parse.bot/marketplace/9272ebd0-2151-4202-b528-c1a62c5269b0/flashscore-es-api](https://parse.bot/marketplace/9272ebd0-2151-4202-b528-c1a62c5269b0/flashscore-es-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/flashscore-spain/`
**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 daily odds

Returns all scheduled matches for a given sport and day with their primary 1X2 (home/draw/away) odds from the featured bookmaker. Each match includes league, country, team names, start timestamp, and current/previous odds. Makes two internal requests (matches feed + odds feed) per call. Results are not paginated; one call returns all matches for the day (typically 200-900+ for football).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day_offset` | integer | No | Day offset from today. 0 = today, 1 = tomorrow, -1 = yesterday, etc. |
| `sport` | string | No | Sport to retrieve odds for. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/flashscore-spain/get-daily-odds \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"day_offset":"<integer>","sport":"<string>"}'
```

### Get match odds

Returns detailed pre-match odds for a specific match event from a specific bookmaker. Includes current value, opening value, active status, and movement direction (UP/DOWN/NONE) for each outcome. Supports multiple bet types (1X2, over/under, both teams to score, asian handicap, double chance) and time scopes (full time, first half, second half). Returns odds=null when the bookmaker does not offer the requested market for the event.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bet_scope` | string | No | Time scope for the bet. |
| `bet_type` | string | No | Type of betting market. |
| `bookmaker_id` | string | No | Numeric bookmaker identifier. Common IDs: 1133 (FanDuel), 549 (bet365), 851 (BetMGM), 1205 (DraftKings). Defaults to 1133 (FanDuel). |
| `event_id` | string | Yes | Flashscore event identifier (8-character alphanumeric). Obtainable from get_daily_odds results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/flashscore-spain/get-match-odds \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"bet_scope":"<string>","bet_type":"<string>","bookmaker_id":"<string>","event_id":"<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.