{
  "openapi": "3.0.1",
  "info": {
    "title": "ListaFirme Scraper",
    "description": "Search and extract Romanian company data from ListaFirme.ro. Get company details, administrators, shareholders, balance sheets, and contact info using your own API key.",
    "version": "1.0",
    "x-build-id": "oSYL2eacoSFnWcX6f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artificially~listafirme-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artificially-listafirme-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/artificially~listafirme-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artificially-listafirme-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/artificially~listafirme-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artificially-listafirme-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",
        "required": [
          "apiKey"
        ],
        "properties": {
          "apiKey": {
            "title": "API Key",
            "type": "string",
            "description": "Your ListaFirme.ro API key (required; API access must be enabled on your ListaFirme.ro plan). Lookups are billed in ListaFirme credits on your own account."
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Company names (or CUI / trade register numbers) to search for, at least 3 characters each. Every match is looked up in full. Example: [\"Dedeman\", \"Borg Design\"].",
            "items": {
              "type": "string"
            }
          },
          "cuiList": {
            "title": "CUI List",
            "type": "array",
            "description": "Romanian fiscal codes (CUI / CIF) to look up directly, digits with or without the RO prefix. Fastest and cheapest way to get one exact company. Example: [\"14837428\", \"RO2816464\"].",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of companies saved per search query (1-500). ListaFirme returns at most 50 matches per search, so use specific names. Use 5-10 for quick answers.",
            "default": 100
          },
          "includeBalance": {
            "title": "Include Balance Sheet",
            "type": "boolean",
            "description": "If true, adds the latest balance sheet (turnover, net profit, employees, assets, equity, debt) in RON.",
            "default": true
          },
          "includeBalanceHistory": {
            "title": "Include Balance History",
            "type": "boolean",
            "description": "If true, adds balanceHistory with several years of financial data for trend analysis (uses more ListaFirme credits than latest year only).",
            "default": true
          },
          "yearsOfHistory": {
            "title": "Years of History",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of years of financial history (1-10) when includeBalanceHistory is true. Example: 5.",
            "default": 5
          },
          "includeFinancialAnalysis": {
            "title": "Include Financial Analysis",
            "type": "boolean",
            "description": "If true, adds financialAnalysis with profit margin, ROA, ROE, debt-to-equity, revenue per employee and multi-year trends.",
            "default": true
          },
          "includeAdministrators": {
            "title": "Include Administrators",
            "type": "boolean",
            "description": "If true, adds administrators (directors) with their roles.",
            "default": true
          },
          "includeShareholders": {
            "title": "Include Shareholders",
            "type": "boolean",
            "description": "If true, adds shareholders with ownership percentages.",
            "default": true
          },
          "includeContact": {
            "title": "Include Contact Info",
            "type": "boolean",
            "description": "If true, adds phone, mobile, email and website (uses extra ListaFirme credits).",
            "default": false
          },
          "includeIndustryInfo": {
            "title": "Include Industry Info",
            "type": "boolean",
            "description": "If true, adds naceInfo with the NACE (CAEN) code description and industry section.",
            "default": true
          },
          "compactOutput": {
            "title": "Compact output (for AI agents)",
            "type": "boolean",
            "description": "If true, each dataset item is a slim record with only key decision fields (CUI, name, status, legal form, registration, county, city, NACE code, latest turnover, profit and employees, health score, contacts, URL) and counts instead of balance history, financial analysis, administrator and shareholder lists. Recommended for AI agents and MCP clients. If false, the full record is returned.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional. The ListaFirme API does not require a proxy; if your API key is IP-restricted, leave this off."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}