# Firmy.cz Scraper (`moving_beacon-owner1/firmy-cz-scraper`) Actor

Scrapes public business listings from Firmy.cz and its English directory, capturing company names, categories, addresses, phone numbers, emails, websites, IČO registration numbers, ratings, reviews, opening information, descriptions, coordinates, images, and social links, with keyword or custom URL

- **URL**: https://apify.com/moving_beacon-owner1/firmy-cz-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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

````markdown
## Firmy.cz Scraper (Apify Actor)

Scrapes public **Firmy.cz** search and category result pages, optionally enriching each record from public company detail pages. **No login, API key, browser, proxy, or CAPTCHA bypass.**

### Input

| Field          | Type    | Default      | Description |
|----------------|---------|--------------|-------------|
| `mode`         | string  | `query`      | `query` (search text) or `url` (custom URL). |
| `query`        | string  | `restaurace` | Search text (mode = query). |
| `url`          | string  | `""`         | Full Firmy.cz URL (mode = url). |
| `pages`        | integer | `2`          | Result pages to fetch (~20/page). |
| `limit`        | integer | `30`         | Max unique records. |
| `details`      | boolean | `false`      | Enrich each record from its detail page. |
| `detailsLimit` | integer | `0`          | Enrich first N records (0 = all). |
| `delay`        | number  | `1.2`        | Base delay between requests (seconds). |
| `timeout`      | number  | `30`         | Request timeout (seconds). |
| `retries`      | integer | `3`          | Retries on transient errors. |

#### Example

```json
{ "mode": "query", "query": "restaurace", "pages": 2, "limit": 30, "details": true, "detailsLimit": 5 }
````

### Output

- Each company → default **Dataset** (JSON/CSV/XLSX export from Apify console).
- Run summary → **Key-Value Store** key `SUMMARY`.

#### Fields

`source_id, name, category, categories, street, city, postal_code, address, phone, email, website, ico, rating, review_count, opening_info, description, latitude, longitude, detail_url, image_url, logo_url, social_links, scraped_at`

### Rate limiting

- Default `delay` = 1.2s (jittered 1.0–1.5×), concurrency = 1.
- Exponential backoff on `429/5xx`, honors `Retry-After`.
- Detail pages use a fresh cookie-less session to avoid the consent wall.

### Files

| File | Purpose |
|------|---------|
| `.actor/actor.json` | Actor manifest |
| `.actor/input_schema.json` | Input validation |
| `.actor/dataset_schema.json` | Dataset views |
| `src/main.py` | Actor entrypoint |
| `requirements.txt` | Dependencies |
| `Dockerfile` | Build image |
| `README.md` | This file |

***

### Policy & Compliance

#### Data source & legality

- **Public data only.** Scrapes `www.firmy.cz` and its English locale `en.firmy.cz` — both public, unauthenticated catalogue pages. No login, no private data, no auth bypass.
- **No circumvention.** No proxy, no CAPTCHA solving, no rate-limit bypass. When Firmy.cz serves its consent manager, the actor re-requests the same public page in a fresh cookie-less session — it does **not** accept terms on your behalf, click anything, or solve a challenge.
- **Respectful crawling.** Default `delay` = 1.2s (jittered 1.0–1.5×), concurrency = 1, exponential backoff on `429/5xx`, honors `Retry-After`. Do not set `delay=0` for large runs.

#### Terms of Service

- You are responsible for reviewing [Firmy.cz Terms of Use](https://www.firmy.cz/) and `robots.txt` before running at scale. If Firmy.cz changes access controls or signals that automated access is unwelcome, stop using the actor.
- This actor is **not affiliated with, endorsed by, or sponsored by** Firmy.cz, Seznam.cz, or their affiliates. "Firmy.cz" and "Seznam" are trademarks of their respective owners.

#### Personal data & GDPR

- Firmy.cz records are **business directory data** (company name, address, phone, email, website, IČO, opening hours). Under GDPR, business-contact data may still constitute personal data when it identifies a sole trader or named contact — treat it accordingly.
- **You are the data controller** for any collection you perform. Ensure a lawful basis (legitimate interest, contract, consent) and honor data-subject rights (access, rectification, erasure, objection).
- Do not use scraped data for unsolicited marketing in jurisdictions that require prior consent (e.g. EU ePrivacy Directive / Czech Act No. 480/2004 Coll.).
- Store and process data in accordance with GDPR, the Czech Data Protection Act, and any applicable local law.

#### Content & usage rights

- Text, logos, photos, and other content remain the property of the respective companies and/or Firmy.cz. Public display requires attribution and compliance with their terms.
- **Permitted uses:** research, market analysis, B2B lead generation (with lawful basis), internal dashboards, academic study.
- **Prohibited uses:** building a competing directory that misrepresents itself as Firmy.cz, spam, harassment, doxxing, reselling raw data without license, or any use violating Firmy.cz's terms or applicable law.

#### Security

- No credentials, API keys, or third-party cookies are stored or transmitted.
- Requests use a standard browser `User-Agent` and do not evade detection.
- Outbound traffic goes only to `www.firmy.cz` and `en.firmy.cz`.

#### Warranty & liability

Provided **"as is"**, without warranty of any kind. The author is not liable for:

- Markup changes, outages, or data inaccuracies.
- Rate-limiting, IP blocks, or account actions taken by Firmy.cz.
- Legal or contractual consequences of your use.

**You are solely responsible** for how you use the collected data and for compliance with all applicable laws, Firmy.cz's terms, and third-party rights.

#### Changes & takedowns

If Firmy.cz or a rights-holder requests removal of the actor or specific data, the maintainer will comply promptly. Report issues via the actor's repository.

````



# Actor input Schema

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

Search by free-text query, or scrape a specific category/search URL.
## `query` (type: `string`):

Search text, e.g. 'restaurace'. Used when mode = query.
## `url` (type: `string`):

Full Firmy.cz search or category URL. Used when mode = url.
## `pages` (type: `integer`):

Number of result pages to fetch (approx. 20 companies per page).
## `limit` (type: `integer`):

Maximum number of unique company records to keep.
## `details` (type: `boolean`):

Enrich records by fetching each company's public detail page (slower).
## `detailsLimit` (type: `integer`):

Enrich only the first N records (0 = all kept records).
## `delay` (type: `number`):

Base delay between requests in seconds. Keep >= 1.0 to be polite.
## `timeout` (type: `number`):

HTTP request timeout in seconds.
## `retries` (type: `integer`):

Number of retries for transient errors.

## Actor input object example

```json
{
  "mode": "query",
  "query": "restaurace",
  "url": "",
  "pages": 2,
  "limit": 30,
  "details": false,
  "detailsLimit": 0,
  "delay": 1.2,
  "timeout": 30,
  "retries": 3
}
````

# Actor output Schema

## `results` (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("moving_beacon-owner1/firmy-cz-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("moving_beacon-owner1/firmy-cz-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 moving_beacon-owner1/firmy-cz-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/firmy-cz-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/2uSnLzEsahCA5CsHZ/builds/ZOOSu7HK22NANeP64/openapi.json
