# My Actor (`katzino96.original/my-actor`) Actor

- **URL**: https://securitybyobscurity.apify.com/katzino96.original/my-actor.md
- **Developed by:** [Tomáš Katz](https://securitybyobscurity.apify.com/katzino96.original) (community)
- **Categories:** AI
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

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

![banner](https://i.ibb.co/B56MwBwc/search-ch.png)

## Search.ch Scraper

The Search.ch Apify Scraper is a powerful web scraping tool specifically designed to extract business directory data from Search.ch, Switzerland's leading local search engine. This scraper enables users to collect comprehensive business information, including contact details, descriptions, images, ratings, and more.

Search.ch is Switzerland's most popular local search platform, providing detailed information about businesses, services, and locations across the country. To gather valuable business data from the platform, users can leverage the Search.ch Apify Scraper, which facilitates market research, competitor analysis, and business intelligence.

### Use Cases

The Search.ch Apify Scraper can be used in multiple scenarios, including but not limited to:

1.  **Market Research:** Extract business data from Search.ch to analyze market trends, competitor presence, and business performance across different regions in Switzerland.
2.  **Business Intelligence:** Track business information, contact details, and service offerings to build comprehensive business databases and directories.
3.  **Competitor Analysis:** Gather data on competitor businesses and their online presence to identify market opportunities and competitive advantages.
4.  **Lead Generation:** Collect contact information and business details for targeted marketing campaigns and business development initiatives.
5.  **Local Business Mapping:** Create comprehensive maps of businesses in specific areas or industries for location-based services and analysis.

Happy scraping!

### Input 📥

To use this actor, you need to provide the following input:

- Field: **startUrls**
  - Type: array
  - Required: Yes
  - Description: Search or business URLs to scrape
- Field: **query**
  - Type: string
  - Required: No
  - Description: Search query (e.g., "software developer", "hotel", "restaurant")
- Field: **maxItems**
  - Type: integer
  - Required: No
  - Description: The number of items to be scraped (default: 10)
- Field: **proxyConfiguration**
  - Type: object
  - Required: No
  - Description: Proxy configuration for the scraper
  - Default: Uses Apify Proxy with no specific proxy groups

### How to get `startUrls`?

1. A single business listing

   Open the business page on [Search.ch](https://search.ch) and copy its link from the browser URL bar.

2. Search results

   2.1. Open the [Search.ch](https://search.ch) website.

   2.2. Navigate to the search page and enter your search terms.

   2.3. Once in the search results page, add any needed filters. This will change the URL in the browser search bar. Once ready, copy the URL and paste to Apify as an item in the `startUrls` array.

#### Examples

A single business listing:

````

https://search.ch/tel/appenzell/kaustrasse-183/hotel-kaubad

```

A search page (Hotels in Zurich):

```

https://search.ch/tel/?was=hotel\&wo=zurich

````

### Output 📤

<a name="output"></a>

An example output looks like this:

```json
{
  "url": "https://search.ch/tel/appenzell/kaustrasse-183/hotel-kaubad",
  "title": "Hotel Kaubad",
  "numberPhone": "079 901 44 66",
  "email": "info@hotelkaubad.ch",
  "categories": [
    "Hotel",
    "Conference Hotels",
    "Seminar",
    "Conference facilities",
    "Health and well-being",
    "Restaurant"
  ],
  "avatarImageUrl": "https://search.ch/tel/media/5791cd0bd146512f6f12221bf8c73e6b2e1c739e.png/rs/320x320/vektor-datei-600x402.png",
  "rating": null,
  "openingHours": ["00:00-24:00"],
  "description": "InformationHotel Kaubad Traditioneller Schweizer Charme und moderner Konfort Tauchen Sie ein in eine Oase der Ruhe und Entspannung. Unser Hotel, umgeben von Wäldern und Wiesen, bietet Ihnen den perfekten Rückzugsort. Jedes unserer liebevoll gestalteten Zimmer lädt Sie ein, die Seele baumeln zu lassen und die natürliche Schönheit der Umgebung zu geniessen. Erleben Sie Komfort und Erholung in unserer idyllischen Umgebung.",
  "imageGallery": [
    "https://search.ch/tel/media/535ef9ecb329b1c1e08cc904f66d126ae09ad3ae.jpg/tn/360x255/2024-07-06-14-.jpg",
    "https://search.ch/tel/media/752193581a5a4bde034653ba44576b552d135a91.jpg/tn/360x255/2024-07-06-9-.jpg"
  ]
}
````

### Need to scrape more data?

👉 Scrape Wayfair with [Wayfair Scraper](https://apify.com/lexis-solutions/wayfair-v2-scraper)

👉 Scrape Alibaba with [Alibaba Scraper](https://apify.com/lexis-solutions/alibaba-scraper)

👉 Scrape Michaels.com with [Michaels.com Scraper](https://apify.com/lexis-solutions/michaels-scraper)

### FAQ

**Q: How do I set up the Search.ch Apify Scraper?**

A: To set up the scraper, you'll need an Apify account. Once you have an account, you can access the scraper through the Apify Console, input the required parameters, and start the scraping process.

**Q: Is this scraper legal to use?**

A: Web scraping is subject to legal and ethical considerations. Before using the Search.ch Apify Scraper, ensure that you comply with the website's terms of service, robots.txt file, and any applicable laws and regulations.

**Q: How fast is the data extraction process?**

A: The speed of data extraction depends on various factors such as the number of businesses, server response time, and the complexity of the data. The scraper is designed to be efficient and fast, but the actual extraction speed may vary.

**Q: How can I export the extracted data?**

A: The Search.ch Apify Scraper allows you to export the extracted data in various formats like JSON, CSV, or Excel. You can download the data directly from the Apify Console or use the Apify API to integrate it into your applications.

***

## Actor input object example

```json
{}
```

# 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("katzino96.original/my-actor").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("katzino96.original/my-actor").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 '{}' |
apify call katzino96.original/my-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=katzino96.original/my-actor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "My Actor",
        "version": "0.0",
        "x-build-id": "taPkJuAQtwVJ9weQ5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/katzino96.original~my-actor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-katzino96.original-my-actor",
                "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/katzino96.original~my-actor/runs": {
            "post": {
                "operationId": "runs-sync-katzino96.original-my-actor",
                "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/katzino96.original~my-actor/run-sync": {
            "post": {
                "operationId": "run-sync-katzino96.original-my-actor",
                "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": {}
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
