# City24 Latvia Scraper - Real Estate Listings & Prices (`studio-amba/city24-lv-scraper`) Actor

Scrape real estate listings from City24.lv, Latvia's leading property portal. Get sale and rent prices, addresses, rooms, area, floor, build year, coordinates and agency info. No login or cookies required.

- **URL**: https://apify.com/studio-amba/city24-lv-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 result scrapeds

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/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

## City24 Latvia Scraper

Scrape real estate listings from **City24.lv**, Latvia's leading property
portal. Get apartments and houses for sale and for rent with prices, addresses,
room counts, living area, floor, build year, energy label, geo coordinates,
photos and the listing agency. No login, no cookies, no browser automation.

### What this actor does

City24.lv is one of the largest real estate marketplaces in Latvia and part of
the Baltic City24 platform. This actor pulls structured listing data straight
from City24's own search API and returns it as clean JSON or a table you can
export to Excel, CSV, JSON, or feed into your own database.

You give it a location (a city or municipality), whether you want sale or rent
listings, and a property type. It returns every matching listing up to your
result limit, one row per property.

### Why use it

- **Market research** — track asking prices and rents across Rīga, Jūrmala,
  Liepāja, Daugavpils and the rest of Latvia.
- **Price monitoring** — watch price per square meter by district over time.
- **Lead lists** — collect listings and the agencies behind them.
- **Investment analysis** — filter by area, rooms, build year and location, then
  compute yield from sale vs rent data in the same schema.
- **Data enrichment** — every listing includes latitude and longitude for
  mapping and geospatial joins.

No login or cookies are required. The actor talks to City24's public search API,
so results match what you see on the site.

### How to scrape City24 Latvia data

1. Set **Location** to a Latvian city or municipality, for example `Rīga`,
   `Jūrmala`, `Liepāja`, `Jelgava`, or `Mārupes novads`. Leave it empty to
   search all of Latvia. Unknown names fall back to a country-wide search
   filtered by name.
2. Choose **Listing Type**: `sale` or `rent`.
3. Choose **Property Type**: apartment, house, commercial, land, cottage, or
   garage.
4. Set **Max Results** to the number of listings you want.
5. Provide a **Bright Data API key** (see below) or set the
   `BRIGHT_DATA_API_KEY` environment variable.
6. Run the actor. Results appear in the dataset, ready to export.

City24 sits behind Cloudflare, so this actor routes its API calls through Bright
Data Web Unlocker. One request returns up to 500 listings, so large runs stay
fast and cheap.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `location` | string | Latvian city or municipality. Default `Rīga`. Empty = all Latvia. |
| `searchQuery` | string | Optional alias for `location`. |
| `listingType` | string | `sale` or `rent`. Default `sale`. |
| `propertyType` | string | apartment, house, commercial, land, cottage, garage. Default apartment. |
| `maxResults` | integer | Maximum listings to return. Default 100. |
| `brightDataApiKey` | string (secret) | Bright Data Web Unlocker key. Required (or set `BRIGHT_DATA_API_KEY`). |
| `proxyConfiguration` | object | Proxy settings (documented fallback; the working transport is Bright Data). |

#### Example input

```json
{
  "location": "Rīga",
  "listingType": "sale",
  "propertyType": "apartment",
  "maxResults": 100
}
````

### Output

Each listing is a flat JSON object:

| Field | Type | Example |
|-------|------|---------|
| `friendlyId` | string | `"3544701"` |
| `listingTitle` | string | `"Apartment — Brāļu Kaudzīšu iela 37, Pļavnieki, Rīga"` |
| `price` | number | `200900` |
| `pricePerUnit` | number | `2456.6` |
| `currency` | string | `"EUR"` |
| `listingType` | string | `"sale"` |
| `propertyType` | string | `"Apartment"` |
| `address` | string | `"Brāļu Kaudzīšu iela 37-A 19, Pļavnieki, Rīga"` |
| `city` | string | `"Rīga"` |
| `district` | string | `"Pļavnieki"` |
| `county` | string | `""` |
| `street` | string | `"Brāļu Kaudzīšu iela 37-A 19"` |
| `rooms` | number | `4` |
| `area` | number | `81.8` |
| `lotSize` | number | `null` |
| `floor` | number | `3` |
| `totalFloors` | number | `5` |
| `buildYear` | number | `1986` |
| `condition` | string | `"renovated"` |
| `energyLabel` | string | `"C"` |
| `latitude` | number | `56.9496` |
| `longitude` | number | `24.1052` |
| `agencyName` | string | agency or broker name |
| `imageUrl` | string | primary image URL |
| `imageUrls` | array | all image URLs |
| `datePublished` | string | `"2026-06-19T16:09:01+03:00"` |
| `url` | string | full City24.lv listing URL |
| `scrapedAt` | string | ISO 8601 scrape timestamp |

#### Example output

```json
{
  "friendlyId": "3544701",
  "listingTitle": "Apartment — Brāļu Kaudzīšu iela 37, Pļavnieki, Rīga",
  "price": 200900,
  "pricePerUnit": 2456.6,
  "currency": "EUR",
  "listingType": "sale",
  "propertyType": "Apartment",
  "city": "Rīga",
  "district": "Pļavnieki",
  "county": "",
  "rooms": 4,
  "area": 81.8,
  "floor": 3,
  "totalFloors": 5,
  "buildYear": 1986,
  "latitude": 56.9496,
  "longitude": 24.1052,
  "url": "https://www.city24.lv/real-estate/apartments-for-sale/riga/3544701"
}
```

### Supported locations

Major cities resolve to exact City24 areas: Rīga, Jūrmala, Mārupe, Liepāja,
Jelgava, Daugavpils, Ventspils, Sigulda, Salaspils, Ādaži, Ikšķile, Ogre, Talsi,
Cēsis, Kuldīga, Saulkrasti. Municipalities (novadi) also work: Mārupes, Ropažu,
Ādažu, Salaspils, Siguldas, Ķekavas, Ogres, Talsu, Olaines, Cēsu,
Dienvidkurzemes, Bauskas, Limbažu, Tukuma novads. Any other name triggers a
country-wide search filtered by the name you entered.

### Cost estimate

The actor reads City24's search API in pages of up to 500 listings per request,
so it is fast and light. Bright Data Web Unlocker cost per listing is a fraction
of a cent because one request covers hundreds of results. A typical run of a few
hundred listings finishes in under a minute.

### Limitations and known issues

- Requires a Bright Data Web Unlocker key because City24 is behind Cloudflare.
- `condition` and `energyLabel` use City24's own codes (for example
  `new_building`, `no_certificate`, energy class letters).
- `floor` and `totalFloors` are only present when the seller filled them in.
- Detail-page URLs are built from the numeric listing ID and resolve on
  City24.lv; the visible slug may differ slightly from the on-site one.

### Related scrapers

Part of a European real estate collection:

- [City24 Estonia Scraper](https://apify.com/studio-amba/city24-ee-scraper) — Estonia
- [Hemnet Scraper](https://apify.com/studio-amba/hemnet-scraper) — Sweden
- [Funda Scraper](https://apify.com/studio-amba/funda-scraper) — Netherlands
- [Idealista Scraper](https://apify.com/studio-amba/idealista-scraper) — Spain
- [Otodom Scraper](https://apify.com/studio-amba/otodom-scraper) — Poland
- [Zimmo Scraper](https://apify.com/studio-amba/zimmo-scraper) — Belgium

### Disclaimer

Use this actor responsibly and in line with City24's terms and applicable law.
Scrape public data only and respect rate limits.

# Actor input Schema

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

Latvian city or municipality to search (e.g. 'Rīga', 'Jūrmala', 'Liepāja', 'Jelgava', 'Mārupes novads'). Leave empty for all of Latvia. Unknown names fall back to a country-wide search filtered by name.

## `searchQuery` (type: `string`):

Optional alias for Location. If set, it is used as the location to search.

## `listingType` (type: `string`):

Whether to scrape properties for sale or for rent.

## `propertyType` (type: `string`):

Type of property to search for.

## `maxResults` (type: `integer`):

Maximum number of listings to return.

## `brightDataApiKey` (type: `string`):

Bright Data API key for Web Unlocker. City24 sits behind a Cloudflare managed challenge, so a Web Unlocker key is required. Can also be supplied via the BRIGHT\_DATA\_API\_KEY environment variable. Get one at https://brightdata.com

## `proxyConfiguration` (type: `object`):

Proxy settings. The working transport is Bright Data Web Unlocker; this is kept as a documented fallback.

## Actor input object example

```json
{
  "location": "Rīga",
  "listingType": "sale",
  "propertyType": "apartment",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "LV"
  }
}
```

# 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 = {
    "location": "Rīga",
    "listingType": "sale",
    "propertyType": "apartment",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "LV"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/city24-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 = {
    "location": "Rīga",
    "listingType": "sale",
    "propertyType": "apartment",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "LV",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/city24-lv-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 '{
  "location": "Rīga",
  "listingType": "sale",
  "propertyType": "apartment",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "LV"
  }
}' |
apify call studio-amba/city24-lv-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "City24 Latvia Scraper - Real Estate Listings & Prices",
        "description": "Scrape real estate listings from City24.lv, Latvia's leading property portal. Get sale and rent prices, addresses, rooms, area, floor, build year, coordinates and agency info. No login or cookies required.",
        "version": "0.1",
        "x-build-id": "szRVwc20RZIQYYa4N"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~city24-lv-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-city24-lv-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/studio-amba~city24-lv-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-city24-lv-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/studio-amba~city24-lv-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-city24-lv-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",
                "properties": {
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Latvian city or municipality to search (e.g. 'Rīga', 'Jūrmala', 'Liepāja', 'Jelgava', 'Mārupes novads'). Leave empty for all of Latvia. Unknown names fall back to a country-wide search filtered by name.",
                        "default": "Rīga"
                    },
                    "searchQuery": {
                        "title": "Search Query (alias for Location)",
                        "type": "string",
                        "description": "Optional alias for Location. If set, it is used as the location to search."
                    },
                    "listingType": {
                        "title": "Listing Type",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Whether to scrape properties for sale or for rent.",
                        "default": "sale"
                    },
                    "propertyType": {
                        "title": "Property Type",
                        "enum": [
                            "apartment",
                            "house",
                            "commercial",
                            "land",
                            "cottage",
                            "garage"
                        ],
                        "type": "string",
                        "description": "Type of property to search for.",
                        "default": "apartment"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 20000,
                        "type": "integer",
                        "description": "Maximum number of listings to return.",
                        "default": 100
                    },
                    "brightDataApiKey": {
                        "title": "Bright Data API Key",
                        "type": "string",
                        "description": "Bright Data API key for Web Unlocker. City24 sits behind a Cloudflare managed challenge, so a Web Unlocker key is required. Can also be supplied via the BRIGHT_DATA_API_KEY environment variable. Get one at https://brightdata.com"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. The working transport is Bright Data Web Unlocker; this is kept as a documented fallback."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
