{
  "openapi": "3.0.1",
  "info": {
    "title": "Ofri.ch Scraper - Swiss Tradesmen Leads with Phone & UID",
    "description": "Scrape Ofri.ch Swiss trade companies as B2B leads: phone, own website, street address, canton, UID (CHE) number, legal form, managing director, trades, rating and reviews. Filter by trade and canton or sweep all ~5,000 profiles. $0.005 per company.",
    "version": "0.1",
    "x-build-id": "dtXFwWsbPElSDzuZH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~ofri-ch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-ofri-ch-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/scrapersdelight~ofri-ch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-ofri-ch-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/scrapersdelight~ofri-ch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-ofri-ch-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "directory",
              "urls"
            ],
            "type": "string",
            "description": "<b>directory</b> sweeps every company profile Ofri lists in its public sitemap (5,074 URLs on 2026-09-23), filtered by the trades / cantons / reviews below. <b>urls</b> scrapes only the company profiles or listing pages you paste into Start URLs.",
            "default": "directory"
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Keep only companies listing one of these trades. Use Ofri's own German labels, e.g. Sanitär, Elektriker, Maler, Gipser, Schreinerei, Heizungsinstallateur, Dachdecker, Reinigungsfirma, Umzugsfirma, Gärtnerei, Plattenleger, Bodenleger. Case and accents are ignored and a part of a label matches (\"klima\" matches \"Kälte- und Klimatechnik\"). In language fr use the French labels (Électricien, Peintre, Sanitaire...). Empty = every trade.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cantons": {
            "title": "Cantons",
            "type": "array",
            "description": "Keep only companies whose postcode lies in these cantons (two-letter codes: ZH, BE, LU, AG, SG, VD, GE, TI, BS, BL, ...). The canton is looked up from the printed postcode in swisstopo's official locality register. Empty = all of Switzerland and Liechtenstein.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (mode urls)",
            "type": "array",
            "description": "Ofri company profiles (https://www.ofri.ch/NuvaThermGmbH or just NuvaThermGmbH) and/or listing pages (https://www.ofri.ch/suche/ZH/Z%C3%BCrich/Sanit%C3%A4r, https://www.ofri.ch/firmen/Elektriker). Every company linked from a listing page is scraped. Used only in mode urls.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Profile language",
            "enum": [
              "de",
              "fr"
            ],
            "type": "string",
            "description": "Ofri serves every profile in German and French. Trades, legal form and verification labels are delivered exactly as the site prints them in this language — never translated by the actor.",
            "default": "de"
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only companies with at least this many Ofri customer reviews. 0 = no filter.",
            "default": 0
          },
          "requireWebsite": {
            "title": "Only companies with their own website",
            "type": "boolean",
            "description": "Skip companies that publish no website of their own (about half). Useful when you feed the websites into an Impressum / email enrichment step.",
            "default": false
          },
          "updatedSince": {
            "title": "Profile updated since (mode directory)",
            "type": "string",
            "description": "ISO date, e.g. 2026-01-01. Only profiles whose sitemap lastmod is on or after this date — a cheap way to target recently active companies. Empty = no filter.",
            "default": ""
          },
          "maxResults": {
            "title": "Max companies",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after delivering this many companies. 0 = no limit (the whole directory is ~5,000 profiles).",
            "default": 50
          },
          "onlyWithContact": {
            "title": "Only companies with a phone, website or email",
            "type": "boolean",
            "description": "Skip profiles that publish no way to reach the company. Only such companies are ever charged; switch off to also receive contact-less profiles free of charge (measured: every profile sampled carried a phone).",
            "default": true
          },
          "dedupeByUid": {
            "title": "One row per company (dedupe on UID)",
            "type": "boolean",
            "description": "Some companies hold two Ofri profiles (measured: 1 pair in 60 rows). When on, a profile whose checksum-valid UID (CHE number) was already delivered in this run is skipped and not charged.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Profiles fetched in parallel.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Ofri answers Apify's own network directly (measured 2026-09-23), so no proxy is needed. If you ever see unreachable profiles, choose Apify proxy with the RESIDENTIAL group.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debugSaveRawSamples": {
            "title": "Save raw HTML samples",
            "type": "boolean",
            "description": "Debugging: store up to 40 fetched profile pages in the key-value store.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}