# InfoJobs Spain Jobs Scraper (`crawlerbros/infojobs-scraper`) Actor

Scrape job listings from InfoJobs.net (Spain) with titles, companies, descriptions, contract types, salaries, locations, and more. HTTP-only via embedded search JSON.

- **URL**: https://apify.com/crawlerbros/infojobs-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Jobs, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 6 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 results

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

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## InfoJobs Spain Jobs Scraper

Scrape job listings from [InfoJobs.net](https://www.infojobs.net) — Spain's largest job board — including titles, companies, descriptions, contract types, salaries, locations, and more.

### Output (per job)

- `type` = `job_infojobs`
- `id` (`of-xxx`), `jobId` (bare code without prefix), `url`
- `title`
- `descriptionHtml`, `descriptionText`
- `companyName`, `companyLogo`, `companyUrl`
- `companySector`, `companySize` (when present on the detail page)
- `city`, `province`, `country`
- `contractType`, `workday`, `teleworking`, `remoteType` (canonical: `presencial` / `hibrido` / `teletrabajo`)
- `experienceMin`, `studyLevel`, `yearsOfContractExperience`
- `category`, `subcategory`
- `salary`, `salaryMin`, `salaryMax`, `salaryPeriod`, `salaryType`, `salaryCurrency`
- `skills`, `languages`, `benefits`, `processPhase` (lists, when the detail page advertises them)
- `vacancies`, `applicationsCount` / `applicantCount`
- `postedAt`, `closingDate` / `expiresAt`
- `externalId` (source reference / offer code used by the employer)
- `isPromoted`, `isExecutive`, `isVisibleToCompany`, `promotions`, `states`
- `scrapedAt`

Fields are only included when a non-empty value is available — so datasets never contain nulls. If a run extracts zero jobs (for example, a bad URL or an aggressive anti-bot block), a single `job_infojobs_blocked` sentinel record is emitted so the dataset is never empty.

### Input

| Field | Type | Description |
|---|---|---|
| `searchUrls` | string[] | InfoJobs search URLs, or direct job detail URLs (`…/of-<id>`). Default: `https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python`. |
| `keyword` | string | Fallback keyword used to build a search URL when `searchUrls` is empty. |
| `province` | string | Client-side filter on the parsed city / province field (e.g. `Madrid`, `Barcelona`). |
| `category` | string | Extra keyword appended as `&category=` when a search URL is synthesised. |
| `contractType` | enum | `any` / `indefinido` / `temporal` / `practicas` / `autonomo` / `otros`. |
| `workday` | enum | `any` / `completa` / `parcial` / `indiferente`. |
| `teleworking` | enum | `any` / `presencial` / `hibrido` / `teletrabajo`. |
| `maxItems` | integer | Maximum jobs per run. Default 3. |
| `proxyConfiguration` | object | Apify proxy. Datacenter recommended; residential helps when Distil blocks the IP. |

### How it works

1. The actor fetches the listing URL with `curl_cffi` (chrome131 TLS impersonation) and parses the embedded `window.__INITIAL_PROPS__` JSON blob.
2. Each offer record already exposes title, description, city, company, contract type, workday, teleworking, salary, and posting date.
3. Each job's detail page is then fetched best-effort to pick up `experienceMin`, `studyLevel`, `category`, `subcategory`, `province`, and `applicationsCount` — listings stay in the dataset even when the detail fetch is blocked.
4. Client-side filters (`contractType` / `workday` / `teleworking` / `province`) run on the parsed Spanish labels.

### FAQ

**Do I need a proxy?** Not strictly — InfoJobs often serves a 200 on the search page from datacenter IPs. When you see a captcha interstitial, switch the proxy group to residential.

**Does it scrape beyond Spain?** InfoJobs is a Spain-only platform — every posting is tagged `country = "Spain"`.

**Why do some fields disappear?** Fields are omitted when empty rather than returned as `null`, so your dataset is always clean. Detail-page-only fields (`experienceMin`, `studyLevel`, `category`, `subcategory`, `skills`, `languages`, `benefits`, `vacancies`, `processPhase`, `closingDate`, `externalId`, `companySector`, `companySize`, `applicationsCount`) depend on the detail page being reachable; listing-level fields (title, company, salary, contract, city, `remoteType`, `isPromoted`, etc.) are always present when a job is returned.

**What's the `job_infojobs_blocked` sentinel?** A single row emitted when zero jobs were extracted — useful to tell the difference between "no results" and "scraper failed silently".

# Actor input Schema

## `searchUrls` (type: `array`):

InfoJobs search or detail URLs. Search example: https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python . You can also paste a job detail URL like https://www.infojobs.net/<slug>/of-<id>.
## `keyword` (type: `string`):

Optional keyword used to build a search URL when no searchUrls are provided.
## `province` (type: `string`):

Optional Spanish province filter applied to listings (e.g. 'Madrid', 'Barcelona'). Matched against the province/city field on each job.
## `category` (type: `string`):

Optional keyword used to build a search URL (passed as &category=). Works alongside keyword.
## `contractType` (type: `string`):

Client-side filter on the parsed contractType. 'any' keeps all.
## `workday` (type: `string`):

Client-side filter on workday. 'any' keeps all.
## `teleworking` (type: `string`):

Client-side filter on teleworking mode. 'any' keeps all.
## `maxItems` (type: `integer`):

Maximum job listings to return.
## `proxyConfiguration` (type: `object`):

Apify proxy. Datacenter IPs are usually fine for InfoJobs search pages; residential is a safer choice when a specific IP is flagged by Distil.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python"
  ],
  "contractType": "any",
  "workday": "any",
  "teleworking": "any",
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

# 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 = {
    "searchUrls": [
        "https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python"
    ],
    "maxItems": 3,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/infojobs-scraper").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 = {
    "searchUrls": ["https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python"],
    "maxItems": 3,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/infojobs-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchUrls": [
    "https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python"
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call crawlerbros/infojobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/infojobs-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "InfoJobs Spain Jobs Scraper",
        "description": "Scrape job listings from InfoJobs.net (Spain) with titles, companies, descriptions, contract types, salaries, locations, and more. HTTP-only via embedded search JSON.",
        "version": "1.0",
        "x-build-id": "XxhReyVUKLvrmh2ET"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~infojobs-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-infojobs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/crawlerbros~infojobs-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-infojobs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/crawlerbros~infojobs-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-infojobs-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchUrls"
                ],
                "properties": {
                    "searchUrls": {
                        "title": "Search URLs",
                        "type": "array",
                        "description": "InfoJobs search or detail URLs. Search example: https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python . You can also paste a job detail URL like https://www.infojobs.net/<slug>/of-<id>.",
                        "default": [
                            "https://www.infojobs.net/jobsearch/search-results/list.xhtml?keyword=python"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Optional keyword used to build a search URL when no searchUrls are provided."
                    },
                    "province": {
                        "title": "Province",
                        "type": "string",
                        "description": "Optional Spanish province filter applied to listings (e.g. 'Madrid', 'Barcelona'). Matched against the province/city field on each job."
                    },
                    "category": {
                        "title": "Category",
                        "type": "string",
                        "description": "Optional keyword used to build a search URL (passed as &category=). Works alongside keyword."
                    },
                    "contractType": {
                        "title": "Contract Type",
                        "enum": [
                            "any",
                            "indefinido",
                            "temporal",
                            "practicas",
                            "autonomo",
                            "otros"
                        ],
                        "type": "string",
                        "description": "Client-side filter on the parsed contractType. 'any' keeps all.",
                        "default": "any"
                    },
                    "workday": {
                        "title": "Workday",
                        "enum": [
                            "any",
                            "completa",
                            "parcial",
                            "indiferente"
                        ],
                        "type": "string",
                        "description": "Client-side filter on workday. 'any' keeps all.",
                        "default": "any"
                    },
                    "teleworking": {
                        "title": "Teleworking",
                        "enum": [
                            "any",
                            "presencial",
                            "hibrido",
                            "teletrabajo"
                        ],
                        "type": "string",
                        "description": "Client-side filter on teleworking mode. 'any' keeps all.",
                        "default": "any"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum job listings to return.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify proxy. Datacenter IPs are usually fine for InfoJobs search pages; residential is a safer choice when a specific IP is flagged by Distil.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
