{
  "openapi": "3.0.1",
  "info": {
    "title": "StarOfService Scraper | Pros | Coverage | Leads",
    "description": "Scrape StarOfService professional profiles, coverage areas and catalog data for service business lead generation and home services market research. Covers ~1,010 trades across France with contact details in structured rows.",
    "version": "0.1",
    "x-build-id": "iO8039WDl2bkGOVNP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ahmed_jasarevic~starofservice-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ahmed_jasarevic-starofservice-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/ahmed_jasarevic~starofservice-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ahmed_jasarevic-starofservice-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/ahmed_jasarevic~starofservice-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ahmed_jasarevic-starofservice-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": [
              "profiles",
              "coverage",
              "trades",
              "cities",
              "profilesByUrl"
            ],
            "type": "string",
            "description": "What to scrape:\n- `profiles` — enumerate pro profiles for each trade+city combination (the main mode).\n- `coverage` — cheap mode: only the number of pros per trade+city combination (1 request per combination, no profile rows).\n- `trades` — list all trade/service categories with their slugs (1010 for the FR marketplace).\n- `cities` — list/search city records (uuid, name, zip code, slug).\n- `profilesByUrl` — fetch full detail for pro profile URLs supplied in `startUrls`.",
            "default": "profiles"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Used by `profilesByUrl` mode. Starofservice pro profile URLs, e.g. `https://www.starofservice.com/inv/professionnel/plomberie/paris/173009619/duchateau-fils`. Both the `/inv/professionnel/...` and `/professionnel/...` variants are supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "trades": {
            "title": "Trades / services",
            "type": "array",
            "description": "Trade slugs from the Starofservice `/services` catalog, e.g. `plomberie`, `electricite`, `menuiserie`, `serrurerie`, `peinture`. Run `mode=trades` to list all ~1010 slugs. Combined with `cities` to build trade+city queries. Leave empty to use `defaultTrades`.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names or slugs to resolve, e.g. `Paris`, `Lyon`, `Marseille`, `Aix-en-Provence`, `Bordeaux`. Each is resolved to a Starofservice city record (UUID + region/department slugs) via the `/cities` endpoint.",
            "items": {
              "type": "string"
            },
            "default": [
              "Paris"
            ]
          },
          "defaultTrades": {
            "title": "Default trades (when `trades` is empty)",
            "type": "array",
            "description": "Trade slugs used when the `trades` input is left empty. These are real slugs from StarofService's `/services` catalog — run `trades` mode to list all ~1010.",
            "items": {
              "type": "string"
            },
            "default": [
              "plomberie",
              "electricite",
              "menuiserie",
              "serrurerie",
              "peinture",
              "jardinage",
              "nettoyage",
              "charpenterie-et-menuiserie",
              "chaudiere-et-chauffage-central",
              "installation-et-remplacement-de-toiture"
            ]
          },
          "maxPairs": {
            "title": "Max trade+city combinations (backstop)",
            "type": "integer",
            "description": "Backstop on the number of trade × city combinations to process. 0 = automatic: enough combinations to reach `maxProfiles` (about 10 profiles per combination, plus sort variants).",
            "default": 0
          },
          "maxProfiles": {
            "title": "Max profiles",
            "type": "integer",
            "description": "Target number of pro profiles to push to the dataset — the Actor keeps fetching combinations (and both sort variants of each, up to ~23 unique profiles per combination) until it is reached. Free accounts are capped at 10.",
            "default": 500
          },
          "maxTrades": {
            "title": "Max trades",
            "type": "integer",
            "description": "Maximum number of trade categories to list (`trades` mode).",
            "default": 1010
          },
          "maxCities": {
            "title": "Max cities",
            "type": "integer",
            "description": "Maximum number of city records to list (`cities` mode).",
            "default": 200
          },
          "includeDetails": {
            "title": "Include full profile details",
            "type": "boolean",
            "description": "Fetch one extra request per pro to add description, phone number, photo gallery and offered services. Slower but much richer.",
            "default": false
          },
          "apiToken": {
            "title": "API token override",
            "type": "string",
            "description": "Optional override for the zeus API token. Leave empty to use the built-in token; the Actor also tries to auto-refresh it from the site's Next.js data blob when the built-in one stops working."
          },
          "country": {
            "title": "Country code",
            "type": "string",
            "description": "Value sent in the `Accept-Country` header (the site uses `fr` for the French marketplace).",
            "default": "fr"
          },
          "maxRequestsPerCrawl": {
            "title": "Max requests per crawl",
            "type": "integer",
            "description": "Hard cap on total HTTP requests made by this run.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "type": "integer",
            "description": "How many zeus API requests to run in parallel (1-10).",
            "default": 8
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your crawler."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}