# OCC Mexico Jobs Scraper (`stilled_stalagmite/occ-mexico-jobs-scraper`) Actor

Scrape job listings from OCC Mexico: titles, companies, locations, and salary ranges.

- **URL**: https://apify.com/stilled\_stalagmite/occ-mexico-jobs-scraper.md
- **Developed by:** [Danilo Frias](https://apify.com/stilled_stalagmite) (community)
- **Categories:** Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/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

## OCC Mexico Jobs Scraper

Scrapes **public job listings from OCC Mundial (occ.com.mx)**, Mexico's large job board, using plain HTTP requests and HTML parsing (httpx + BeautifulSoup). It runs without login, cookies, JavaScript execution, proxies, or headless browsers.

Who would use it: labor-market researchers, recruiters doing competitive mapping, salary-benchmark builders, and job aggregators who need a simple Mexico-wide listing feed.

### How it works

OCC's listing pages (`https://www.occ.com.mx/empleos/...`) return fully server-rendered HTML (verified 2026-09-25, HTTP 200, no login wall, no CAPTCHA). Each listing card carries:

- Job title (`h2`), salary text, benefits/perks bullets
- Company name (often "Empresa confidencial" when the employer hides its name)
- Location (e.g. "Jalisco", "Ciudad de México")
- Posted-date text in Spanish ("Hoy", "Ayer", "Hace N días")
- A numeric offer id (`data-id`) used to build the detail URL

The actor paginates with OCC's own `?page=N` parameter until `max_items` is reached, with ~1 request/second politeness and per-page try/except resilience.

### Inputs

- `search_query` (string, default `""`): keyword filter, e.g. `"contador"`. Converted to OCC's semantic URL segment (`de-contador`). Empty = no keyword filter.
- `location` (string, default `"Mexico"`): location filter, e.g. `"Ciudad de Mexico"`, `"Jalisco"`. Converted to OCC's semantic URL segment (`en-ciudad-de-mexico`). `"Mexico"` (default) uses the plain Mexico-wide `/empleos/` page.
- `start_urls` (array of strings, default derived from the two fields above): explicit public OCC listing URLs. Takes precedence over `search_query`/`location`.
- `max_items` (integer, default `50`, min `1`): cap on total records pushed.

Example input for accountants in Mexico City:

```json
{
  "search_query": "contador",
  "location": "Ciudad de Mexico",
  "max_items": 50
}
```

### Sample output record

```json
{
  "title": "Contador general",
  "company": "Keyperspot",
  "location": "Benito Juárez, Ciudad de México",
  "salary_text": "$ 25,000 - $ 27,000 Mensual",
  "job_url": "https://www.occ.com.mx/empleo/oferta/21350252",
  "posted_date": "Ayer",
  "description_snippet": null
}
```

(Taken verbatim from the local test run, 2026-09-26, input `contador` / `Ciudad de Mexico`.)

### Coverage and limits

- Listing pages: WORKING (200, server-rendered cards, ~20-22 cards/page, `?page=N` pagination returns fresh cards).
- Job detail pages (`https://www.occ.com.mx/empleo/oferta/<id>`): **BLOCKED for bots** - the server returns HTTP 403 with the body "scraping abuse" for plain-HTTP clients (verified 2026-09-25). `job_url` is still emitted (the URL is valid and opens in a real browser), but `description_snippet` is limited to the benefits/perks bullets shown on the listing card - the full job description cannot be fetched without browser rendering, which this actor deliberately does not do.
- `posted_date` is the raw Spanish text from the card ("Hoy", "Ayer", "Hace N días") - no normalization.
- OCC pins sponsored cards at the top of every page; the actor dedupes by offer id so they are not duplicated across pages.
- \~1 req/s politeness between requests; timeouts and HTTP errors end pagination for that start URL gracefully.

### Data rules

- **Public pages only**: the actor requests only pages that load fully for logged-out visitors. No login flows, no session cookies, no CAPTCHA solving, no proxy services, no headless browsers.
- **No personal data**: company names are collected (businesses are fine), but recruiter names, emails, phone numbers, or any other private-individual data are never scraped or stored. Listing cards do not expose personal contacts.

# Actor input Schema

## `location` (type: `string`):

Location filter as shown on occ.com.mx (e.g. 'Ciudad de Mexico', 'Jalisco'). Converted into OCC's semantic URL segment (en-<slug>). 'Mexico' (default) uses the plain Mexico-wide listing page.

## `max_items` (type: `integer`):

Maximum number of job records to scrape across all start URLs. Pagination stops when this is reached.

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

Job keyword to search for (e.g. 'contador', 'desarrollador'). It is converted into OCC's semantic URL segment (de-<slug>). Empty means no keyword filter.

## `start_urls` (type: `array`):

Explicit public OCC listing URLs to scrape (e.g. https://www.occ.com.mx/empleos/de-contador/en-ciudad-de-mexico/). When provided, they take precedence over search\_query/location.

## Actor input object example

```json
{
  "location": "Mexico",
  "max_items": 50,
  "search_query": ""
}
```

# Actor output Schema

## `overview` (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("stilled_stalagmite/occ-mexico-jobs-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("stilled_stalagmite/occ-mexico-jobs-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 '{}' |
apify call stilled_stalagmite/occ-mexico-jobs-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stilled_stalagmite/occ-mexico-jobs-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/oHYgOjrVBwy7VPT42/builds/JSdoOJcgOZi9n4jRn/openapi.json
