# Eu B2b Compliance Ai Auditor (`thorlan04/eu-b2b-compliance-ai-auditor`) Actor

- **URL**: https://apify.com/thorlan04/eu-b2b-compliance-ai-auditor.md
- **Developed by:** [Cédric JOVER SAN JOSE](https://apify.com/thorlan04) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU B2B Compliance & AI-Search Readiness Auditor 🚀

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Version](https://img.shields.io/badge/version-1.0.2-green.svg)](https://apify.com)
[![Python](https://img.shields.io/badge/Python-3.11-3776AB.svg?logo=python\&logoColor=white)](https://python.org)
[![Docker](https://img.shields.io/badge/Docker-Ready-2496ED.svg?logo=docker\&logoColor=white)](https://docker.com)
[![Maintenance](https://img.shields.io/badge/Auto--Updated-Weekly-brightgreen.svg)]()
[![License](https://img.shields.io/badge/License-Apache--2.0-yellow.svg)](LICENSE)

> **Autonomous AI-Search Engine (GEO) & EU Corporate Compliance Auditor.**\
> Scans any domain, company name, or SIREN/SIRET to verify official government registries, compute Intracommunity VAT, audit French/GDPR legal notices, and assess readiness for AI search crawlers (`llms.txt`, `Schema.org`, `OAI-SearchBot`, `PerplexityBot`, `ClaudeBot`).

***

### 💡 Why This Actor is Essential for B2B & Agencies

In 2026, corporate websites face two massive challenges:

1. **Stricter EU & French Legal Enforcement (LCEN / GDPR)**:
   - Websites operating in France without compliant legal notices (missing SIRET, missing web host, missing publication director) face administrative fines from DGCCRF up to **€375,000**.
   - Loading advertising cookies (Meta Pixel, Google Analytics, TikTok) before explicit user consent violates CNIL guidelines.
2. **The Shift from SEO to GEO (Generative Engine Optimization)**:
   - Over 40% of B2B discovery now happens on conversational engines (**ChatGPT Search**, **Perplexity**, **Claude**, **Gemini**).
   - If a company blocks `OAI-SearchBot` or lacks a standardized `/llms.txt`, it becomes **completely invisible** in AI-generated answers.

**This Actor provides marketing agencies, sales teams, and compliance officers with turn-key, actionable audits that can be monetized immediately.**

***

### ✨ Key Features

- 🏛️ **Official Government Registry Resolution**: Free, real-time query against the French national company database (`recherche-entreprises.api.gouv.fr`). Extracts legal denomination, 9-digit SIREN, 14-digit SIRET, NAF/APE code, official registered address, and active corporate officers.
- 🧮 **Mathematical Intracommunity VAT Computation**: Automatic calculation using the official French tax formula (`FR + [12 + 3 * (SIREN % 97)] % 97 + SIREN`) and Luhn algorithm validation.
- 🤖 **AI-Search (GEO) Engine Audit**:
  - Verifies `/llms.txt` and `/llms-full.txt` presence and markdown syntax.
  - Inspects `robots.txt` directives for major AI bots: `GPTBot`, `OAI-SearchBot`, `ChatGPT-User`, `PerplexityBot`, `ClaudeBot`, `Claude-Web`, `Google-Extended`, `Meta-ExternalAgent`, `Bytespider`, `DeepSeekBot`, `MistralBot`.
  - Detects `Schema.org` JSON-LD structured data (`Organization`, `WebSite`, `LocalBusiness`).
  - Checks for AI plugin / OpenAPI specifications (`/.well-known/openapi.json`).
- ⚖️ **GDPR & Legal Notice Scoring**:
  - Automatically locates legal notice pages (`/mentions-legales`, `/legal`, `/privacy`).
  - Checks for displayed SIREN/SIRET, publication director, and identified hosting provider (OVH, AWS, Scaleway, Vercel, Cloudflare, etc.).
  - Detects third-party tracking scripts loaded on initial page load.
- 🎯 **Lead Enrichment**: Extracts verified public contact emails, social profiles (LinkedIn, X/Twitter, GitHub, YouTube), and detected tech stack (WordPress, Shopify, Next.js, Webflow, Tailwind, etc.).
- 📋 **Commercial Pitch Action Plan**: Generates a bulleted, prioritized action plan ready to be attached to a client proposal or outreach email.
- 🛡️ **Self-Healing Runtime Architecture**: Built-in fallback heuristics and optional **Gemini 2.5 Flash** repair to guarantee a 100% success rate with zero crashes, even on blocked or ill-formed websites.

***

### 🚀 Quick Start (1-Click Test)

Run the Actor with pre-filled targets on Apify Console or via API:

#### Input Example (`JSON`)

```json
{
  "targets": [
    "https://www.doctolib.fr",
    "794598813",
    "Mirakl"
  ],
  "audit_depth": "full_enterprise",
  "verify_official_registry": true,
  "check_ai_readiness": true,
  "check_gdpr_legal": true,
  "timeout_per_target_seconds": 30
}
```

***

### 📊 Output Dataset Example

Every item pushed to your Apify Dataset matches the following structured JSON schema:

```json
{
  "target_input": "https://www.doctolib.fr",
  "domain": "doctolib.fr",
  "company_name": "DOCTOLIB",
  "siren": "794598813",
  "siret": "79459881300077",
  "vat_number": "FR14794598813",
  "naf_ape_code": "62.01Z",
  "naf_label": "Programmation informatique",
  "official_address": "54 Quai Charles Pasqua, 92300 Levallois-Perret",
  "administrative_status": "A",
  "leaders": [
    "STANISLAS NIOX-CHATEAU (Président de SAS)",
    "GRANT THORNTON (Commissaire aux comptes titulaire)"
  ],
  "rgpd_compliance_score": 90,
  "ai_search_readiness_score": 85,
  "global_compliance_grade": "A",
  "llms_txt_status": {
    "has_llms_txt": true,
    "llms_txt_url": "https://doctolib.fr/llms.txt",
    "is_valid_markdown": true
  },
  "robots_ai_rules": {
    "OAI-SearchBot": "allowed",
    "PerplexityBot": "allowed",
    "ClaudeBot": "allowed",
    "Google-Extended": "allowed"
  },
  "schema_org_types": [
    "Organization",
    "WebSite"
  ],
  "public_emails": [
    "contact@doctolib.fr",
    "dpo@doctolib.fr"
  ],
  "social_profiles": {
    "linkedin": "https://www.linkedin.com/company/doctolib",
    "twitter_x": "https://twitter.com/doctolib"
  },
  "tech_stack": [
    "Cloudflare",
    "Next.js",
    "React"
  ],
  "detected_trackers": [
    "Google Analytics / GA4"
  ],
  "audit_action_plan": [
    "AUDIT COOKIES RGPD: 1 tracker tiers détecté (Google Analytics / GA4). S'assurer de la présence d'une bannière de consentement conforme CNIL.",
    "EXCELLENCE CONFORME: Site bien structuré pour le référencement génératif IA (GEO)."
  ],
  "scanned_at": "2026-10-18T09:00:00Z",
  "auditor_version": "1.0.0"
}
```

***

### ⚡ Automations & Workflow Integrations

#### 1. Make.com (Integromat)

Trigger an audit automatically when a new lead enters your CRM (HubSpot, Pipedrive, Notion):

1. **Webhook / New Lead** ->
2. **Apify Module: "Run Actor"** (`eu-b2b-compliance-ai-auditor`) ->
3. **Gmail / Slack Module**: Send an automated audit report and pitch directly to your sales team!

#### 2. n8n

```json
{
  "nodes": [
    {
      "parameters": {
        "actorId": "YOUR_USERNAME/eu-b2b-compliance-ai-auditor",
        "input": {
          "targets": ["={{ $json.website_url }}"]
        }
      },
      "name": "Apify Auditor",
      "type": "n8n-nodes-base.apify"
    }
  ]
}
```

#### 3. Zapier

Connect the Apify Zapier app: whenever a row is added to Google Sheets, trigger the Auditor and write back the `global_compliance_grade`, `vat_number`, and `audit_action_plan`.

***

### 🔄 Autonomous CI/CD & Self-Healing

- **Weekly GitHub Actions (`.github/workflows/auto_update_actor.yml`)**:\
  Every Monday at 04:00 UTC, the repository runs `src/self_updater.py` to scan for new AI crawlers and GDPR trackers, increments the semver build, and pushes changes to `main`.
- **Apify Git Integration**:\
  Each commit automatically triggers an Actor rebuild on Apify Store, maintaining the coveted **"Recently Updated"** badge and maximizing marketplace search rankings.
- **Fault-Tolerant Engine (`src/self_healing_parser.py`)**:\
  Handles HTTP 403, SSL certificate misconfigurations, and single-page apps without crashing, ensuring customers always receive billable data.

***

### 💰 Monetization Settings on Apify Store

To generate recurring monthly passive income:

- **Model**: Monthly Rental (**$29.00 - $79.00 / month**) or Pay-Per-Result (**$0.02 - $0.05 / result**).
- **Payouts**: Directly wired to your European/French bank account (**IBAN SEPA**) with zero currency conversion fees.
- **Accounting**: Pre-configured accounting module in `compta_impots/` with French Micro-Enterprise BNC support (Boxes 5HQ / 5TE).

***

### 📄 License

Licensed under the Apache License, Version 2.0.

# Actor input Schema

## `targets` (type: `array`):

Enter URLs (e.g., https://example.com), company domain names, SIREN/SIRET numbers, or legal corporate names. Test in 1 click with the pre-filled sample!

## `audit_depth` (type: `string`):

Select the inspection level: Quick (Homepage & Robots), Deep (Homepage, Legal Pages, llms.txt, Well-Known & Registry), or Full Enterprise (Deep + AI-Action Plan generation).

## `verify_official_registry` (type: `boolean`):

Query official open government registry (recherche-entreprises.api.gouv.fr) to verify SIREN, SIRET, NAF/APE code, VAT number, and legal executives.

## `check_ai_readiness` (type: `boolean`):

Verify /llms.txt, /llms-full.txt, Schema.org JSON-LD, OpenAPI specs, and robots.txt rules for GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, etc.

## `check_gdpr_legal` (type: `boolean`):

Verify mandatory legal notices (Mentions Légales, Host info, publication director, SIRET displayed) and detect third-party trackers.

## `gemini_api_key` (type: `string`):

Optional Gemini API key for advanced self-healing on blocked/obfuscated web pages and personalized AI strategic audit synthesis. If omitted, built-in heuristic rules take over.

## `max_retries` (type: `integer`):

Number of retries when encountering rate limits or slow responses.

## `timeout_per_target_seconds` (type: `integer`):

Maximum seconds allowed per target scan before self-healing fallback concludes the report.

## Actor input object example

```json
{
  "targets": [
    "https://www.doctolib.fr",
    "794598813",
    "Mirakl"
  ],
  "audit_depth": "full_enterprise",
  "verify_official_registry": true,
  "check_ai_readiness": true,
  "check_gdpr_legal": true,
  "max_retries": 2,
  "timeout_per_target_seconds": 30
}
```

# Actor output Schema

## `resultsDataset` (type: `string`):

Main dataset containing verified SIREN, VAT, GDPR, and AI scores.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "targets": [
        "https://www.doctolib.fr",
        "794598813",
        "Mirakl"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thorlan04/eu-b2b-compliance-ai-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "targets": [
        "https://www.doctolib.fr",
        "794598813",
        "Mirakl",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("thorlan04/eu-b2b-compliance-ai-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targets": [
    "https://www.doctolib.fr",
    "794598813",
    "Mirakl"
  ]
}' |
apify call thorlan04/eu-b2b-compliance-ai-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thorlan04/eu-b2b-compliance-ai-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ihMuZQhwTtSvJqSMW/builds/SxGvSMboeQ5GR90TO/openapi.json
