{
  "openapi": "3.0.1",
  "info": {
    "title": "Qualibat · RGE Companies & Emails",
    "description": "Export Qualibat-labelled BTP firms: SIRET, phone, email from the certificate PDF, RGE work categories, directors, founded date, size. No official API. $4/1k. Empty shells not billed.",
    "version": "0.1",
    "x-build-id": "TqPxNcG1ctcbbOGmM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/corent1robert~qualibat-entreprises/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-corent1robert-qualibat-entreprises",
        "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/corent1robert~qualibat-entreprises/runs": {
      "post": {
        "operationId": "runs-sync-corent1robert-qualibat-entreprises",
        "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/corent1robert~qualibat-entreprises/run-sync": {
      "post": {
        "operationId": "run-sync-corent1robert-qualibat-entreprises",
        "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": {
          "query": {
            "title": "Search",
            "type": "string",
            "description": "Company name, **SIRET**, or a trade keyword (`PLOMBERIE`, `PHOTOVOLTAIQUE`). Needed for **This search**. On **All of France**, empty = every live firm.\n\nA bare qualification code (`3118`) without a location returns **0** — that is Qualibat, not this Actor."
          },
          "department": {
            "title": "Département",
            "enum": [
              "none",
              "01",
              "02",
              "03",
              "04",
              "05",
              "06",
              "07",
              "08",
              "09",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "2A",
              "2B",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "38",
              "39",
              "40",
              "41",
              "42",
              "43",
              "44",
              "45",
              "46",
              "47",
              "48",
              "49",
              "50",
              "51",
              "52",
              "53",
              "54",
              "55",
              "56",
              "57",
              "58",
              "59",
              "60",
              "61",
              "62",
              "63",
              "64",
              "65",
              "66",
              "67",
              "68",
              "69",
              "70",
              "71",
              "72",
              "73",
              "74",
              "75",
              "76",
              "77",
              "78",
              "79",
              "80",
              "81",
              "82",
              "83",
              "84",
              "85",
              "86",
              "87",
              "88",
              "89",
              "90",
              "91",
              "92",
              "93",
              "94",
              "95",
              "971",
              "972",
              "973",
              "974",
              "976"
            ],
            "type": "string",
            "description": "Search the whole **département**. Pick **None** only for a SIRET or company-name lookup (Qualibat then stops at **50**). A city below overrides this."
          },
          "city": {
            "title": "City or postcode",
            "type": "string",
            "description": "Optional. Leave empty for the **whole département**. Fill `Lyon` or `69003` to narrow. Typos fail — prefer the département list when you can."
          },
          "rge": {
            "title": "RGE",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "**Any** = every Qualibat-labelled firm. **RGE only** = badge on the card. Applied after the search, not a second Qualibat API.",
            "default": "any"
          },
          "maxCompanies": {
            "title": "How many",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Unique firms. Default **20** ≈ **$0.08**. Free Apify plans stop at 20.",
            "default": 20
          },
          "onlyNew": {
            "title": "Only new companies",
            "type": "boolean",
            "description": "Skip Qualibat ids already billed on a **previous run of this same search** (keyword × département × city × RGE). First run builds the memory. Relist a département without paying the same artisans twice.",
            "default": false
          },
          "coverage": {
            "title": "Scope",
            "enum": [
              "slice",
              "all"
            ],
            "type": "string",
            "description": "**This search (recommended):** Qualibat directory for the keyword × département above.\n\n**All of France:** Qualibat has no company sitemap and caps a broad list at 50. We scan live certificates instead (slow). Search / département still filter after. Newest first.",
            "default": "slice"
          },
          "location": {
            "title": "Location (API, hidden)",
            "type": "string",
            "description": "Legacy free-text. Console uses Département + City. Still accepted on the API; city/location wins over the département."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Used when City is set (Qualibat slider 1–200). Hidden. Default 30 km.",
            "default": 30
          },
          "rowDepth": {
            "title": "Row depth",
            "type": "string",
            "description": "API only. Console always uses directory (fiche + PDF). Pass listing for cards without phone/email.",
            "default": "directory"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. First request is direct. One retry with this proxy on 403 / challenge. Hidden in Console.",
            "default": {
              "useApifyProxy": false
            }
          },
          "minDelayMs": {
            "title": "Min delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between HTTP requests. Session cookie must survive the whole run.",
            "default": 400
          },
          "idFrom": {
            "title": "Resume ID",
            "minimum": 1,
            "type": "integer",
            "description": "Get all: start scanning downward from this certificate id. Hidden."
          },
          "idMin": {
            "title": "Min certificate id",
            "minimum": 1,
            "type": "integer",
            "description": "Get all: stop scanning below this id. Hidden."
          },
          "idMax": {
            "title": "Max certificate id",
            "minimum": 1,
            "type": "integer",
            "description": "Get all: skip auto-detect of the highest live id. Hidden."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}