# Spain Salary Benchmark · Roles & Provinces (`bibian/spain-salary-benchmark`) Actor

Spain salary benchmark: median, quartiles and average yearly salary by job role and province, computed live from current Infoempleo job postings, with contract mix, experience mix, remote share and top hiring companies. Spanish salary data as JSON, no login.

- **URL**: https://apify.com/bibian/spain-salary-benchmark.md
- **Developed by:** [Vivien MORVAN](https://apify.com/bibian) (community)
- **Categories:** Jobs
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 report rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Spain Salary Benchmark · Roles & Provinces

Median salaries in Spain by job role and province, computed live from current [Infoempleo](https://www.infoempleo.com) job postings: no thousands of postings to download and crunch yourself, just the numbers (median, quartiles, average, contract and experience mix), recomputed on every run.

### What you can do with it

- **Check an offer or a raise**: compare a salary to the live median, 25th and 75th percentile for the same role.
- **Benchmark provinces**: Madrid vs. Barcelona vs. Sevilla for the same role, side by side.
- **Watch a market move**: schedule it weekly and track how a role's median salary shifts over time.
- **Spot who is hiring**: `topCompanies` names the firms and staffing agencies posting the most offers for a role, without opening a single job page.

### Input

| Field | What it does |
|---|---|
| Job roles | The job titles to benchmark, written the way Spanish employers write them: `programador`, `enfermera`, `data engineer`. Required. Only postings whose title matches the role are counted. |
| Provinces | One extra row per role × province, for example `Madrid`, `Barcelona` or `Sevilla` (accents and capitals do not matter). Leave empty to get only the whole-of-Spain row — that row is always included. |
| Published within (days) | Only analyze postings published in the last N days (default 30). |
| Max postings read per role | Cost and time guard (default 300). Province rows are computed from the same postings as the whole-of-Spain row, so a higher cap gives small provinces more data. |
| Include sample URLs | Add up to 5 source posting URLs to each row (postings with a salary come first), so you can check the numbers against real postings. |
| Maximum number of rows | The run stops once this many role × province rows are saved. |

Ready-to-copy inputs:

```json
{ "roles": ["programador", "enfermera"], "provinces": ["Madrid", "Barcelona", "Sevilla"] }
```

```json
{ "roles": ["comercial"], "publishedWithinDays": 90, "maxPostingsPerRole": 1000 }
```

### Output

One row per role × province (plus one whole-of-Spain row per role), computed from the postings found for that role:

| Field | What it is |
|---|---|
| `role`, `province`, `periodDays` | What this row covers: the searched role, the province (`"España"` for the whole country) and the lookback window in days. |
| `postingsAnalyzed`, `postingsWithSalary`, `postingsSalaryIgnored` | How many postings matched this role × province, how many of those publish a believable salary, and how many printed a salary that was discarded as implausible. |
| `salaryMin`, `salaryP25`, `salaryMedian`, `salaryP75`, `salaryMax`, `salaryAvg` | Yearly salary statistics in EUR, as Infoempleo prints them (in Spain, advertised salaries are normally gross), `null` when no posting in this row publishes one. A posting counts at the middle of its range. |
| `currency`, `salaryPeriod` | Always `EUR` and `year`. |
| `contractShares` | Share (0 to 1) of postings by contract type: `permanent`, `fixed-term`, `permanent-seasonal`, `internship`, `training`, `freelance`, `unspecified`. |
| `experienceShares` | Share of postings by experience asked: `none`, `1-2 years`, `3-4 years`, `5+ years`, `unspecified`. |
| `remoteShare` | Share (0 to 1) of postings that mention remote work, `null` for an empty row. |
| `topCompanies` | Up to 5 companies (including staffing agencies) with the most postings in this row — companies only, never an individual's name. |
| `sampleUrls` | Up to 5 Infoempleo posting URLs behind this row's numbers (only when "Include sample URLs" is on). |
| `computedAt` | When this row was computed, ISO 8601. |

Three real rows from the same run (17 November 2026):

| Role | Province | Postings with salary | Median | P25 | P75 |
|---|---|---|---|---|---|
| comercial | España | 22 of 150 | €27,750 | €25,125 | €31,875 |
| contable | Madrid | 16 of 24 | €25,500 | €20,750 | €29,625 |
| ingeniero | Barcelona | 3 of 12 | €28,000 | €27,750 | €31,500 |

Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Why this one

- **A ready answer, not a pile of postings.** Median and quartiles per role and province in a single row, instead of thousands of postings to aggregate yourself.
- **You see how solid each number is.** Every row says how many postings it is built on (`postingsAnalyzed`) and how many publish a salary (`postingsWithSalary`): a median over 3 postings looks like what it is.
- **Recomputed every run.** No stale snapshot: each run reads the postings currently live before aggregating.
- **Still want the raw postings?** [Infoempleo Jobs Scraper](https://apify.com/bibian/infoempleo-jobs-scraper) returns every individual posting this actor aggregates over.

### Good to know

- Only some postings publish a salary (roughly one in six to one in three in our tests). Always read `postingsWithSalary` before relying on a row, and expect thin data for small provinces.
- Only postings whose title contains every word of the role are counted (gender and plural endings are accepted, so `enfermera` finds "Enfermero/a" but `administrativo` does not find "Administrador"): Infoempleo's search also returns loosely related offers, which would distort the numbers.
- Reading a role stops when the site stops returning postings for it, so a high "Max postings read per role" is only reached for broad roles. When the cap is reached, the postings kept are the most relevant ones, not the most recent.
- Infoempleo prints an exact age only up to 100 days: a posting shown as "more than 100 days" old is never counted. A posting whose age cannot be read is kept.
- `experienceShares` buckets a posting by the minimum experience it asks for ("between 2 and 5 years" counts as `1-2 years`).
- If Infoempleo blocks the run or changes its page layout, the run fails (or ends as a partial result) instead of returning empty rows.
- Salaries are yearly figures as printed by Infoempleo (the site does not say gross or net; Spanish job ads normally quote gross). Obvious typos are ignored (below €6,000 a year, above €400,000, or a range wider than 4×) and counted in `postingsSalaryIgnored`.
- A posting open in several provinces counts in each of them; a posting with no province (for example "España") counts in the whole-of-Spain row only.
- A row is still returned for a role × province with no matching posting (`postingsAnalyzed: 0`, salary fields `null`): you see the combination has no current data instead of a missing row.
- No recruiter or candidate name is read or stored anywhere in this actor.
- Need another source, percentile or field? Open an issue in the Issues tab and say what you need: requests are read, and the most asked ones are built next.

### En español

Este actor calcula rangos salariales por puesto y provincia en España (mediana y cuartiles), a partir de las ofertas de Infoempleo publicadas en este momento: no hace falta descargar y procesar miles de ofertas, solo el dato, recalculado en cada ejecución. Útil para valorar una oferta, comparar Madrid con Barcelona o seguir la evolución del salario de un puesto. Cada fila indica sobre cuántas ofertas se calcula y cuántas publican salario. No contiene datos personales: solo aparecen empresas en `topCompanies`.

# Actor input Schema

## `roles` (type: `array`):

The job titles to benchmark, written the way Spanish employers write them, for example "programador", "enfermera" or "data engineer". One set of rows per role. Only postings whose title matches the role are counted.

## `provinces` (type: `array`):

One extra row per role × province, for example "Madrid", "Barcelona" or "Sevilla" (accents and capitals do not matter). Leave empty to get only the whole-of-Spain row (that row is always included).

## `publishedWithinDays` (type: `integer`):

Only postings published in the last N days are analyzed.

## `maxPostingsPerRole` (type: `integer`):

Cost and time guard: caps how many matching postings are read for each role. Province rows are computed from the same postings, so a higher cap gives them more data.

## `includeSamples` (type: `boolean`):

Add up to 5 source posting URLs to each row (postings with a salary come first).

## `maxItems` (type: `integer`):

The run stops once this many role × province rows are saved.

## Actor input object example

```json
{
  "roles": [
    "programador",
    "comercial",
    "administrativo",
    "ingeniero",
    "contable"
  ],
  "provinces": [
    "Madrid",
    "Barcelona"
  ],
  "publishedWithinDays": 30,
  "maxPostingsPerRole": 150,
  "includeSamples": true,
  "maxItems": 50
}
```

# Actor output Schema

## `salaries` (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 = {
    "roles": [
        "programador",
        "comercial",
        "administrativo",
        "ingeniero",
        "contable"
    ],
    "provinces": [
        "Madrid",
        "Barcelona"
    ],
    "publishedWithinDays": 30,
    "maxPostingsPerRole": 150,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("bibian/spain-salary-benchmark").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 = {
    "roles": [
        "programador",
        "comercial",
        "administrativo",
        "ingeniero",
        "contable",
    ],
    "provinces": [
        "Madrid",
        "Barcelona",
    ],
    "publishedWithinDays": 30,
    "maxPostingsPerRole": 150,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("bibian/spain-salary-benchmark").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 '{
  "roles": [
    "programador",
    "comercial",
    "administrativo",
    "ingeniero",
    "contable"
  ],
  "provinces": [
    "Madrid",
    "Barcelona"
  ],
  "publishedWithinDays": 30,
  "maxPostingsPerRole": 150,
  "maxItems": 50
}' |
apify call bibian/spain-salary-benchmark --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bibian/spain-salary-benchmark"
        }
    }
}
```

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/A4BFUQvNxf7lLZ8Ep/builds/8kXM16ozJquKhfEif/openapi.json
