# 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:** 44 total users, 10 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## 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/actors/running/actors-in-store.md#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

## 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/infojobs-scraper"
        }
    }
}

```

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/bnQZcOXxPoOtdnGtB/builds/XxhReyVUKLvrmh2ET/openapi.json
