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

> Discover and browse EU funding programs available in Greece, view detailed information about each initiative, and stay updated with the latest news from the ESPA portal. Search across the database and explore program planning details to find opportunities relevant to your interests.

**Category:** Government & Public Data | **Website:** [espa.gr/](https://espa.gr/) | **Docs:** [parse.bot/marketplace/04456803-6574-4495-b4a6-28f57c89a6b1/espa-gr-api](https://parse.bot/marketplace/04456803-6574-4495-b4a6-28f57c89a6b1/espa-gr-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-espa-gr-api-04456803/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_news_detail

Retrieve full content of a news article by item ID. Returns the article title, full text content, and URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | The news ID from list_news results (e.g. '2037'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espa-gr-api-04456803/get_news_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### get_program_detail

Retrieve full details of a specific ESPA program by item ID. Returns the program title, URL, a details object with target audience, submission period, region, budget, funded activities, terms and conditions, and other program-specific metadata, plus an array of attached files with their titles and download URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | The program ID from list_programs results (e.g. '7262'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espa-gr-api-04456803/get_program_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### list_news

List ESPA news articles with pagination. Returns 10 articles per page ordered by recency. Each article includes its ID, title, date, and URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espa-gr-api-04456803/list_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### list_program_planning

Retrieve links to upcoming program planning pages organized by region and operational program. Returns an array of planning resource links with their titles and URLs pointing to regional or sectoral planning pages.

**Estimated cost:** Metered

_No parameters required._

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

### list_programs

List ESPA funding programs/calls with pagination. Returns active and pending programs by default, 10 per page. Each program includes its ID, title, status, operational program, region, submission period, and direct URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-espa-gr-api-04456803/list_programs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### site_search

Search ESPA funding programs by keyword. Filters the programs list by the provided query term, returning active and pending programs matching the keyword. Returns the same program structure as list_programs but filtered by relevance.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to find matching programs on the ESPA portal (Greek text supported). |

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