# Spain & EU Public Data API – Tenders, Grants, Companies (`ivosandoval/datamon-premium`) Actor

Query public procurement (PLACE), grants (BDNS), corporate filings (BORME), trademarks (OEPM), official gazette (BOE) and EU tenders (TED) from a single database. Structured, deduplicated, updated daily.

- **URL**: https://apify.com/ivosandoval/datamon-premium.md
- **Developed by:** [Ivo Sandoval](https://apify.com/ivosandoval) (community)
- **Categories:** Automation, Other, Lead generation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Datamon Premium - Spain & EU Public Data API

Access structured public data from 6 official Spanish and European sources in one API call. Procurement, grants, corporate filings, trademarks, official gazette, and EU tenders - all normalized, deduplicated, and updated daily.

### Data Sources

| Source | Code | Coverage | Data Type |
|--------|------|----------|-----------|
| PLACE | `PLACE` | Spain | Public procurement (government tenders and contract awards) |
| BDNS | `BDNS` | Spain | Grants and subsidies (national, regional, local) |
| BORME | `BORME` | Spain | Corporate filings (incorporations, dissolutions, mergers, insolvency) |
| OEPM | `OEPM` | Spain | Trademarks, patents, and utility models (BOPI) |
| BOE | `BOE` | Spain | Official gazette (legal notices, regulations, appointments) |
| TED | `TED` | EU-wide | EU public procurement (tenders above EU thresholds) |

### How it works

Datamon Premium does not scrape websites. It reads from a PostgreSQL database (`datamon_db`) that is continuously populated by specialized scrapers. Each source has its own scraping pipeline that collects, normalizes, and deduplicates records into a unified `items` table.

You provide the database connection URL. The actor queries the `items` table with your filters and returns structured results ordered by publication date.

### Input parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `database_url` | string | Yes | PostgreSQL connection string (`postgresql+asyncpg://user:pass@host:5432/datamon_db`) |
| `search_query` | string | No | Search by title or description (case-insensitive) |
| `sources` | array | No | Filter by source code: PLACE, BDNS, BORME, OEPM, BOE, TED. Default: all |
| `dataset` | string | No | Filter by dataset name (e.g. `licitaciones`, `subvenciones`, `marcas`) |
| `date_from` | string | No | Start date (YYYY-MM-DD) |
| `date_to` | string | No | End date (YYYY-MM-DD) |
| `max_results` | integer | No | Maximum results to return (default: 100, max: 10,000) |

### Output example

```json
{
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "dataset": "licitaciones",
    "external_id": "https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=abc123",
    "title": "Suministro de equipamiento informatico para oficinas centrales",
    "description": "Adquisicion de 200 equipos portatiles y monitores...",
    "url": "https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=abc123",
    "source": "PLACE",
    "published_at": "2026-08-14T10:30:00",
    "metadata": {
        "cpv_codes": ["30213100"],
        "amount": 450000.00,
        "organization": "Ministerio de Hacienda",
        "region": "Madrid"
    },
    "created_at": "2026-08-14T12:00:00"
}
```

### Use cases

- **Public procurement monitoring** - Track new tenders and contract awards from PLACE and TED with CPV code filtering
- **Grant tracking** - Monitor new subsidies and grants from BDNS by sector and region
- **Corporate intelligence** - Follow new company incorporations, mergers, and insolvency proceedings from BORME
- **IP monitoring** - Track new trademark and patent filings from OEPM
- **Regulatory monitoring** - Follow legal notices and appointments from BOE
- **Cross-source search** - Search a company or topic across all 6 sources simultaneously

### Integrations

Results are stored in Apify Dataset and can be exported as JSON, CSV, Excel, or connected to any workflow via Apify integrations (Zapier, Make, Google Sheets, webhooks, API).

### Pricing

- **Model**: Pay per result (PPE)
- **Price**: $5.00 / 1,000 results

### Running locally

```bash
cd actors/datamon-premium
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt

## Search all sources
DATABASE_URL="postgresql+asyncpg://user:pass@host:5432/datamon_db" \
    .venv/bin/python runner.py --query "infraestructura"

## Filter by source
DATABASE_URL="..." .venv/bin/python runner.py --query "renovable" \
    --sources PLACE,TED

## Filter by dataset and date range
DATABASE_URL="..." .venv/bin/python runner.py --dataset licitaciones \
    --date-from 2026-08-01 --date-to 2026-08-15
```

# Actor input Schema

## `search_query` (type: `string`):

Search by title or description (case-insensitive)

## `sources` (type: `array`):

Filter by source. Options: PLACE, BDNS, BORME, OEPM, BOE, TED. Leave empty to query all.

## `dataset` (type: `string`):

Filter by dataset name (e.g. licitaciones, subvenciones, marcas, concursos)

## `date_from` (type: `string`):

Start date filter (YYYY-MM-DD)

## `date_to` (type: `string`):

End date filter (YYYY-MM-DD)

## `max_results` (type: `integer`):

Maximum number of results to return

## `database_url` (type: `string`):

PostgreSQL connection string. Format: postgresql+asyncpg://user:pass@host:5432/datamon\_db

## Actor input object example

```json
{
  "sources": [],
  "max_results": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ivosandoval/datamon-premium").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ivosandoval/datamon-premium").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ivosandoval/datamon-premium --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ivosandoval/datamon-premium"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iXDfcdqrd54AUQqn5/builds/3fW2KCUprnKWMIlrR/openapi.json
