# CV.lv Jobs Scraper (`jobsapi/cv-lv-job-search-scraper`) Actor

Extract structured public job listings from CV.lv with employer, location, salary, remote-work, dates, keywords, and detail-page fields.

- **URL**: https://apify.com/jobsapi/cv-lv-job-search-scraper.md
- **Developed by:** [Jobs API](https://apify.com/jobsapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 cv.lv job records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## CV.lv Jobs Search Scraper

Extract complete public CV.lv vacancies from official search pages or exact public vacancy URLs. Search results are enriched from each public detail page before any dataset row is published.

### Modes and input

- `mode`: `search`, `single`, or `multiple`.
- `startUrls`: public `cv.lv/en/search` or `cv.lv/lv/search` pages for search mode.
- `jobUrl`: one public vacancy URL for single mode.
- `jobUrls`: public vacancy URLs for multiple mode.
- `maxItems`: maximum complete records.
- `pageSize` and `maxPages`: bounded offset pagination controls for search mode.
- `timeoutMs`: per-request timeout.
- `requestDelayMs`: spacing between sequential public requests.

The Actor always fetches detail pages in search mode. It uses ordinary direct HTTPS headers only and does not accept proxy, cookie, login, fingerprint, custom-user-agent, or concurrency controls. Personal contact values are excluded from retained public payloads.

### Example

```json
{
  "mode": "search",
  "startUrls": [{ "url": "https://www.cv.lv/en/search?limit=3" }],
  "maxItems": 3,
  "pageSize": 5,
  "maxPages": 1,
  "timeoutMs": 30000,
  "requestDelayMs": 500
}
```

### Dataset

Each job row contains stable identity, title, employer profile, employer media/registration/about fields, full HTML and readable description sections, requirements, benefits, responsibilities, location hierarchy, country, remote/work schedule flags, categories, category IDs, keywords, skills, languages, salary values/currency/rate, publication/updated/expiry dates, application URL and flags, vacancy status/type, public listing/detail payloads, response hashes/statuses, provenance, field coverage, and quality metadata. The live records contain substantially more than 20 populated source-grounded fields.

Rows are only emitted when the official detail page yields a complete description, employer, location, canonical vacancy URL, and successful detail receipt. The strict dataset schema rejects partial or unknown top-level fields.

### Access policy

Run summaries distinguish Apify platform `status` (`SUCCEEDED`/`FAILED`) from dataset `resultStatus` (`COMPLETE`, `LIMITED`, `SKIPPED`, `DEFERRED`, `NO_DATA`, or `FAILED`). HTTP 401, 403, 429, or 451, or a visible source-authored access-control/security challenge, stops the run and discards all staged jobs as `SUCCEEDED`/`SKIPPED`. HTTP 407 and other unverified access/transport unavailability are `SUCCEEDED`/`DEFERRED`, not a confirmed source block. An explicitly empty search is `SUCCEEDED`/`NO_DATA`; fatal non-block failures before any stored record are `FAILED`/`FAILED`. If a later dataset write, artifact write, or finalization fails after real jobs have been stored, the stored rows are retained as `SUCCEEDED`/`LIMITED`. Diagnostics and request receipts are kept in key-value artifacts, never in the job dataset. The Actor does not retry a source barrier or switch routes, identities, proxies, cookies, or fingerprints.

### Local validation

```text
npm test
npm run lint
apify validate-schema
apify run --purge --input-file INPUT.json
npm run validate -- storage-cvlv-final
```

The validator reconciles dataset files with `OUTPUT_SUMMARY`, checks strict schema keys/types, unique IDs/URLs, readable detail descriptions, no blank/placeholder values, and more than 20 meaningful populated fields per job.

# Changelog

This Actor's version history is a separate document: https://apify.com/jobsapi/cv-lv-job-search-scraper/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Search public pages, fetch one vacancy, or fetch several vacancies.

## `startUrls` (type: `array`):

Public CV.lv search pages. Existing query parameters such as language, keywords, sorting, country, or location are preserved while offset pagination is added.

## `jobUrls` (type: `array`):

Public CV.lv /en/vacancy/ or /lv/vacancy/ URLs for single and multiple modes.

## `jobUrl` (type: `string`):

Convenience input for single mode.

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

Maximum number of unique public vacancies returned.

## `pageSize` (type: `integer`):

CV.lv search page size used for bounded offset pagination.

## `maxPages` (type: `integer`):

Safety bound for offset pagination for each supplied search URL.

## `timeoutMs` (type: `integer`):

Maximum time allowed for each public CV.lv request.

## `requestDelayMs` (type: `integer`):

Minimum delay between sequential public listing/detail requests.

## Actor input object example

```json
{
  "mode": "search",
  "startUrls": [
    {
      "url": "https://www.cv.lv/en/search?limit=20"
    }
  ],
  "jobUrls": [],
  "maxItems": 25,
  "pageSize": 20,
  "maxPages": 5,
  "timeoutMs": 30000,
  "requestDelayMs": 500
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

## `diagnostics` (type: `string`):

No description

## `requestReceipts` (type: `string`):

No description

## `health` (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("jobsapi/cv-lv-job-search-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("jobsapi/cv-lv-job-search-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 jobsapi/cv-lv-job-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jobsapi/cv-lv-job-search-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/OT6VDzGtiQlRla0ky/builds/dP8sIxTzbKhe8SYQf/openapi.json
