{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain New Companies (BORME) - B2B Leads, GDPR-safe",
    "description": "Companies newly registered in Spain, from the official BORME (Registro Mercantil gazette): name, province, municipality, address, business purpose, share capital and registry data. Filter by province, keywords in the business purpose and minimum capital. Company data only: no personal names.",
    "version": "1.0",
    "x-build-id": "ShWbHmA9f3xX1K5Ft"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hydramill~new-companies/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hydramill-new-companies",
        "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/hydramill~new-companies/runs": {
      "post": {
        "operationId": "runs-sync-hydramill-new-companies",
        "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/hydramill~new-companies/run-sync": {
      "post": {
        "operationId": "run-sync-hydramill-new-companies",
        "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": {
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First BORME date (YYYY-MM-DD), or a period counted back from 'To date' such as \"6 days\" (handy for scheduled runs). Empty = 'To date' minus 6 days (one week)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last BORME date (YYYY-MM-DD). Empty = today (Madrid time). A future date is replaced by today."
          },
          "provinces": {
            "title": "Provinces",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep companies registered in any of these provinces (the province of the Registro Mercantil that published the act). Empty = all of Spain. API callers may also send names (\"Barcelona\", \"Gerona\", \"Vizcaya\", accents and case ignored) or INE codes (\"8\", \"08\").",
            "items": {
              "type": "string",
              "enum": [
                "01",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20",
                "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"
              ],
              "enumTitles": [
                "Araba/Álava (01)",
                "Albacete (02)",
                "Alicante/Alacant (03)",
                "Almería (04)",
                "Ávila (05)",
                "Badajoz (06)",
                "Illes Balears (07)",
                "Barcelona (08)",
                "Burgos (09)",
                "Cáceres (10)",
                "Cádiz (11)",
                "Castellón/Castelló (12)",
                "Ciudad Real (13)",
                "Córdoba (14)",
                "A Coruña (15)",
                "Cuenca (16)",
                "Girona (17)",
                "Granada (18)",
                "Guadalajara (19)",
                "Gipuzkoa (20)",
                "Huelva (21)",
                "Huesca (22)",
                "Jaén (23)",
                "León (24)",
                "Lleida (25)",
                "La Rioja (26)",
                "Lugo (27)",
                "Madrid (28)",
                "Málaga (29)",
                "Murcia (30)",
                "Navarra (31)",
                "Ourense (32)",
                "Asturias (33)",
                "Palencia (34)",
                "Las Palmas (35)",
                "Pontevedra (36)",
                "Salamanca (37)",
                "Santa Cruz de Tenerife (38)",
                "Cantabria (39)",
                "Segovia (40)",
                "Sevilla (41)",
                "Soria (42)",
                "Tarragona (43)",
                "Teruel (44)",
                "Toledo (45)",
                "Valencia/València (46)",
                "Valladolid (47)",
                "Bizkaia (48)",
                "Zamora (49)",
                "Zaragoza (50)",
                "Ceuta (51)",
                "Melilla (52)"
              ]
            }
          },
          "keywords": {
            "title": "Keywords in business purpose",
            "type": "array",
            "description": "Words or word fragments searched in the 'objeto social' (business purpose), accent- and case-insensitive substring match (\"hosteleria\" finds \"Hostelería\", \"inmobiliari\" finds inmobiliaria/inmobiliario). Write them in Spanish, as the BORME does; CNAE codes such as \"5610\" also work when the company published them. Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "'Any' keeps a company when at least one keyword appears; 'All' only when every keyword appears.",
            "default": "any"
          },
          "minCapital": {
            "title": "Minimum share capital (EUR)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep only companies with at least this share capital in euros (most new S.L. have 1-3,000 EUR; 60,000 EUR is the legal minimum of an S.A.). Companies that publish no capital (pension funds) are left out when this is above 0. 0 = no filter.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many companies (each one is a billable result), newest BORME first. 0 = no limit.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}