# 1188.lv Latvia Scraper (`memo23/1188-lv-scraper`) Actor

Scrape 1188.lv (Latvian Yellow Pages) into structured business rows: name, phone, email when listed, website, address, hours. Keyword plus city, nationwide LV, or a search/profile URL. JSON or CSV out. $5 per 1,000 listings.

- **URL**: https://apify.com/memo23/1188-lv-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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

## 1188.lv Latvia Scraper

Scrape [1188.lv](https://www.1188.lv/katalogs) (Latvian Yellow Pages / 1188 Uzziņas) into one row per **business**: name, phone, email when listed, website, address, opening hours.

Works from a keyword plus optional city, a nationwide term, or a pasted `/katalogs/meklet` or `/katalogs/{category}/{slug}-{id}` URL. Cards and profiles answer without Apify Proxy.

**Pricing:** $0.005 per listing (`pushData`). Extra `contact-phone` $0.002 and `contact-email` $0.05 when those fields are present.

### Why use this scraper?

- Profile JSON-LD carries phone and email when the business published them.
- The weekday timetable is `time[datetime]` on the profile (`pirmd.` … `svētd.`).
- City is `InfopageSearch[vzd_code]` (Rīga = `100003003`). Bare `where=Riga` on a pasted URL is only the autocomplete label — 1188 ignores it unless the VZD code is present. The actor adds the code from the city name, or keeps it when you paste it.
- Optional harvest of the business site when the directory has no inbox.

### Overview

Built for lead lists and local research on Latvian companies. Each dataset item is one listing from 1188.lv (Helio Media / Tet).

### Supported inputs

| Input | What it does |
|---|---|
| `searchTerms` | What you type in 1188, e.g. `restorans`, `santehnikis` |
| `locations` | City name. Mapped to 1188 `InfopageSearch[vzd_code]`. Empty = nationwide |
| `startUrls` | `https://www.1188.lv/katalogs/meklet?...` or `/katalogs/{cat}/{slug}-{id}` |
| `maxItems` | Stop after N unique listings (free plan cap 50) |
| `harvestWebsiteEmail` | Fetch the business site if the profile has no inbox |
| `proxy` | Leave off |

The official Android app (`lv.lattelecombpo.yellowpages`, 1188 Business search) is live on Play. This actor reads the public HTML catalog, not the app API.

### Use cases

| Who | Why |
|---|---|
| Sales / agencies | Latvian phones and emails from a category |
| Researchers | Hours, city, and postcode coverage |
| SEO / maps | Website + coordinates per listing |

### How it works

1. Build `https://www.1188.lv/katalogs/meklet?InfopageSearch[what]={term}` and, for a city, `InfopageSearch[vzd_code]` (Rīga `100003003`). Page N is `?page=N`. A pasted search URL is fetched as-is, including VZD / branch filters.
2. Parse `.company.yp` cards.
3. Open `/katalogs/{category}/{slug}-{id}` for LocalBusiness JSON-LD, mailto, website, and the timetable.
4. Charge `contact-phone` / `contact-email` after `pushData`.
5. If still no email and harvest is on, fetch the business homepage/contact page.

### Input configuration

| Field | Type | Required | Notes |
|---|---|---|---|
| `searchTerms` | string\[] | one of terms/URLs | e.g. `restorans` |
| `locations` | string\[] | no | e.g. `Riga` |
| `startUrls` | url\[] | no | `/katalogs/meklet` or a profile |
| `maxItems` | integer | no | default 50 |
| `maxPages` | integer | no | default 20 |
| `scrapeDetails` | boolean | no | default true |
| `harvestWebsiteEmail` | boolean | no | default true |
| `maxConcurrency` | integer | no | default 5 |
| `proxy` | proxy | no | default off |

#### Example input

```json
{
  "searchTerms": ["restorans"],
  "locations": ["Riga"],
  "maxItems": 10,
  "harvestWebsiteEmail": false,
  "proxy": { "useApifyProxy": false }
}
```

### Output samples

```json
{
  "listingId": "453925",
  "name": "\"Pētergailis\",  restorāns Vecrīgā",
  "phone": "29240866",
  "email": "petergailis@petergailis.com",
  "website": "http://www.petergailis.com",
  "city": "Rīga",
  "postalCode": "LV-1050",
  "street": "Skārņu iela 25",
  "country": "LV",
  "hours": ["MO 12:00-24:00", "SA 12:00-24:00", "SU 12:00-24:00"],
  "profileUrl": "https://www.1188.lv/katalogs/restorans-2686/petergailis-restorans-vecriga-453925"
}
```

### FAQ

**Do I need a proxy?** Not on current HTML.

**Is there an official app API?** The Play listing is live (`lv.lattelecombpo.yellowpages`). This actor uses the public `/katalogs` HTML.

### Support

Questions and issues on the [actor page](https://apify.com/memo23/1188-lv-scraper).

### Disclaimer

Use this actor in line with 1188.lv terms and applicable law. You are responsible for how you store and contact the people and companies in the dataset.

### SEO Keywords

1188 scraper, 1188.lv, latvia yellow pages, latvian business emails, riga directory scraper

# Actor input Schema

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

Paste 1188.lv catalog links. Examples: <code>https://www.1188.lv/katalogs/meklet?InfopageSearch\[what]=restorans\&InfopageSearch\[vzd\_code]=100003003</code>, a category URL with the same VZD query, or a profile. A pasted <code>where=Riga</code> is upgraded to the Rīga VZD code.

## `searchTerms` (type: `array`):

What you would type into 1188, e.g. <b>restorans</b>, <b>santehnikis</b>, <b>advokats</b>, <b>viesnica</b>. Leave cities empty for a nationwide LV query. A 1188.lv /katalogs URL also works here.

## `locations` (type: `array`):

Latvian city, e.g. <b>Riga</b>, <b>Liepaja</b>, <b>Daugavpils</b>, <b>Jelgava</b>. Empty = nationwide. 1188 filters on <code>InfopageSearch\[vzd\_code]</code>, not on <code>where=</code> alone.

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

Stop after this many unique businesses across the whole run. Free plan is capped at 50.

## `scrapeDetails` (type: `boolean`):

Loads the /katalogs/{category}/{slug}-{id} page for the week of hours and extra contacts.

## `harvestWebsiteEmail` (type: `boolean`):

If the directory profile has no inbox, fetch the business website homepage/contact page.

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

Page N is <code>?page=N</code> on /katalogs/meklet.

## `maxConcurrency` (type: `integer`):

How many pages and profiles to load at the same time.

## `proxy` (type: `object`):

Leave off. Search and profile pages currently answer without Apify Proxy.

## Actor input object example

```json
{
  "searchTerms": [
    "restorans"
  ],
  "locations": [
    "Riga"
  ],
  "maxItems": 50,
  "scrapeDetails": true,
  "harvestWebsiteEmail": true,
  "maxPages": 20,
  "maxConcurrency": 5,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searchTerms": [
        "restorans"
    ],
    "locations": [
        "Riga"
    ],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/1188-lv-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 = {
    "searchTerms": ["restorans"],
    "locations": ["Riga"],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/1188-lv-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 '{
  "searchTerms": [
    "restorans"
  ],
  "locations": [
    "Riga"
  ],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call memo23/1188-lv-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/1188-lv-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/hMr1EPH9pHpjxTW5Y/builds/4SgMl4MGa5aqEyvoQ/openapi.json
