{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Legal Entity Extractor: CIF, VAT & Audit",
    "description": "Find the company behind any website: CIF/NIF, EU VAT ID and legal name, plus cookie-consent, security, SEO and social-profile audit in one run.",
    "version": "0.0",
    "x-build-id": "HsmbWg1dlkkxRFMJD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~legal-entity-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-legal-entity-extractor",
        "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/rastriq~legal-entity-extractor/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-legal-entity-extractor",
        "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/rastriq~legal-entity-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-legal-entity-extractor",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Website URLs",
            "type": "array",
            "description": "Home pages (or any page) of the websites to analyze. Example: <code>https://www.example.es</code>. The actor looks for the tax ID on the page, then in the privacy policy and legal notice (aviso legal) linked from it.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPagesPerSite": {
            "title": "Max pages per site",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of pages audited per website (one billed result per page). Use <b>1</b> to only analyze the URL you provide; higher values also follow internal links.",
            "default": 1
          },
          "consentStates": {
            "title": "Consent states to test",
            "type": "array",
            "description": "<b>baseline</b>: no interaction with the banner. <b>reject</b>: rejects non-essential cookies. <b>accept</b>: accepts all. Selecting only <code>baseline</code> is about 3x faster. Example: <code>[\"baseline\"]</code>.",
            "items": {
              "type": "string",
              "enum": [
                "baseline",
                "reject",
                "accept"
              ],
              "enumTitles": [
                "Baseline (no interaction)",
                "Reject all",
                "Accept all"
              ]
            },
            "default": [
              "baseline",
              "reject",
              "accept"
            ]
          },
          "locales": {
            "title": "Browser language",
            "type": "array",
            "description": "Browser locale used for the audit. It affects the language of the consent banner and the page. The first value is used. Example: <code>es-ES</code>, <code>en-GB</code>, <code>de-DE</code>.",
            "items": {
              "type": "string"
            },
            "default": [
              "es-ES"
            ]
          },
          "captureRawCookieValues": {
            "title": "Store raw cookie values",
            "type": "boolean",
            "description": "When off, cookie values and tracking identifiers are masked before saving. Turn on only if you need real values for forensic analysis.",
            "default": false
          },
          "captureRequestPayloadValues": {
            "title": "Store request payloads",
            "type": "boolean",
            "description": "When off, HTTP request bodies are redacted. Turn on to inspect what data trackers send.",
            "default": false
          },
          "includeUrlGlobs": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Only internal links matching these globs are followed. Example: <code>https://example.com/legal/**</code>",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "excludeUrlGlobs": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Internal links matching these globs are skipped. Example: <code>https://example.com/blog/**</code>",
            "items": {
              "type": "object",
              "required": [
                "glob"
              ],
              "properties": {
                "glob": {
                  "type": "string",
                  "title": "Glob of a web page"
                }
              }
            }
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages disallowed by robots.txt when discovering internal links.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used for the audit. Consent banners are often geo-targeted: set the country to where your audience is (for example ES, DE, FR) to see the EU banner. Not every country is available on datacenter proxies.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          },
          "saveDetailedDatasets": {
            "title": "Save detailed raw datasets",
            "type": "boolean",
            "description": "Also write 8 raw named datasets per run (pcs-RUNID-pages, -network-requests, -detections, -storage-items, -consent-audit, -tracking-ids, -social-profiles, -sites). Named datasets are kept in your storage until you delete them. Leave off unless you need raw request-level evidence.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages processed in parallel. Higher is faster but needs more memory (4 GB is enough for the default).",
            "default": 4
          },
          "maxRequestsPerCrawl": {
            "title": "Max requests per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on total pages requested in the whole run.",
            "default": 100
          },
          "pageTimeoutSeconds": {
            "title": "Page timeout",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Navigation timeout for each page load, in seconds.",
            "default": 45
          },
          "userAgent": {
            "title": "Custom User-Agent",
            "type": "string",
            "description": "Leave empty to use the default Chromium user agent."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}