{"openapi":"3.1.0","info":{"title":"API Bridge","description":"Company qualification, email finding and French company search. Requires an `x-token` header.","version":"3.0.0-workers"},"paths":{"/qualify":{"post":{"tags":["Qualification"],"summary":"Qualify a company from its website","description":"Qualification of a company website, cached 7 days per normalized URL (Req 11).\n\nCache hit: the stored qualification with `status: 200`, `error_message: null`\nand `cached: true`, no upstream calls (billed at `qualify:cached`).\n`refresh: true` skips the lookup and recomputes at full cost. Miss responses are\nunchanged (no `cached` field), and only billable bodies are written to the cache.\n\nCosts 4 Credits per request (1 when served from the 7-day result cache).","operationId":"qualify_qualify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Qualify Qualify Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":4,"x-credit-cost-cached":1}},"/question":{"post":{"summary":"Answer Question","operationId":"answer_question_question_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Answer Question Question Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":3,"description":"Costs 3 Credits per request."}},"/email-verify":{"post":{"tags":["Email Verification"],"summary":"Find a likely professional email","description":"Most likely professional email, learned from addresses published on the company website.\n\nKeeps the original fields (email, status, message, domain_used, warning) and adds:\nconfidence (high/medium/low), pattern, candidates (top 5 with scores), pattern_source\n(website/statistical), examples_found, generic_emails, provider, domain_checks, cached.\nMailboxes are not probed: Cloudflare blocks outbound SMTP (port 25).\nOpted-out domains or persons get `email: null`, `status: \"suppressed\"`, `candidates: []`.\n\nCosts 2 Credits per request.","operationId":"email_verify_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Email Verify Email Verify Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":2}},"/scrape":{"post":{"tags":["Qualification"],"summary":"Scrape a website and return its main text","description":"Debug/utility route: shows exactly what text the LLM receives and which tier produced it.\n\nCosts 2 Credits per request.","operationId":"scrape_endpoint_scrape_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Scrape Endpoint Scrape Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":2}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/entreprise":{"post":{"tags":["Entreprise - Recherche textuelle"],"summary":"Search French companies by text","operationId":"entreprise_search_entreprise_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntrepriseSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Entreprise Search Entreprise Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"description":"The French company registry is busy (upstream rate limit). Not billed.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":1,"description":"Costs 1 Credit per request."}},"/entreprise/geo":{"post":{"tags":["Entreprise - Recherche géographique"],"summary":"Search French companies by GPS coordinates","operationId":"entreprise_geo_search_entreprise_geo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntrepriseGeoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Entreprise Geo Search Entreprise Geo Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"description":"The French company registry is busy (upstream rate limit). Not billed.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":1,"description":"Costs 1 Credit per request."}},"/enrich":{"post":{"tags":["Enrichment"],"summary":"Registry, qualification and email domain for one company","description":"One call: `registry` (recherche-entreprises), `qualification` (`/qualify` logic),\n`email_domain` (MX, checks, pattern, generic emails) and, with both names, `contact`.\n\nFailed sections are null with an `errors` entry; `status: 502` when neither\n`registry` nor `qualification` succeeded (not billed). Company-level sections\nare cached 7 days (`cached: true`, cheaper); `refresh: true` recomputes.\n\nCosts 8 Credits per request (3 when served from the 7-day result cache).","operationId":"enrich_endpoint_enrich_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Enrich Endpoint Enrich Post"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":8,"x-credit-cost-cached":3}},"/usage":{"get":{"summary":"Balance and current-month usage of the calling credential","operationId":"get_usage_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Usage Usage Get"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Invalid or missing token, forbidden key, or terms not accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded or monthly quota reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"APIKeyHeader":[]}],"x-credit-cost":0,"description":"This route is free (0 Credits)."}},"/billing/checkout":{"post":{"summary":"Create a Stripe Checkout session to buy a credit pack","operationId":"create_checkout_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Checkout Billing Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/privacy/opt-out":{"post":{"tags":["Privacy"],"summary":"Opt a domain or a person out of email discovery","description":"Public (anonymous callers are rate limited by IP). `{domain}` suppresses the\nwhole domain; `{domain, first_name, last_name}` suppresses one person. Names are\nstored only as an HMAC-SHA256 hash keyed with `PRIVACY_PEPPER` (Req 12.2, 12.5).","operationId":"privacy_opt_out_privacy_opt_out_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptOutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Privacy Opt Out Privacy Opt Out Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/legal/terms":{"get":{"tags":["Legal"],"summary":"Terms of service with the current version","description":"Published terms of service (Req 13.1); the page carries the `TERMS_VERSION` var.","operationId":"terms_legal_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"APIKeyHeader":[]}]}},"/legal/privacy":{"get":{"tags":["Legal"],"summary":"Privacy notice","description":"Privacy notice: legitimate interest, sources, retention and the opt-out procedure (Req 12.6).","operationId":"privacy_notice_legal_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"APIKeyHeader":[]}]}},"/legal/terms/accept":{"post":{"tags":["Legal"],"summary":"Accept the current terms version for the calling API key","description":"Records the acceptance of `terms_version` (it must equal `TERMS_VERSION`) on the\ncalling Customer_Key and audits it in the same D1 batch (Req 13.2, 8.6).","operationId":"accept_terms_legal_terms_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAcceptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Accept Terms Legal Terms Accept Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/signup":{"post":{"tags":["Storefront"],"summary":"Self-serve signup: create a free Customer_Key","description":"Create a `free`-plan Customer_Key (Turnstile verified, one key per email).\n\nThe full key is returned once; the terms of the current `TERMS_VERSION` are\nrecorded as accepted in the same D1 batch as the key (audited as `key.create`\nand `terms.accept`).","operationId":"signup_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}}},"components":{"schemas":{"CheckoutRequest":{"properties":{"pack_id":{"type":"string","minLength":1,"title":"Pack Id","description":"Credit pack identifier from CREDIT_PACKS.","example":"pack_1000"}},"type":"object","required":["pack_id"],"title":"CheckoutRequest","description":"Request body for `POST /billing/checkout`."},"EmailVerifyRequest":{"properties":{"url":{"type":"string","title":"Url","description":"The company website URL (used to derive the email domain).","example":"https://www.example.com"},"first_name":{"type":"string","title":"First Name","description":"First name of the contact.","example":"Jean"},"last_name":{"type":"string","title":"Last Name","description":"Last name of the contact.","example":"Dupont"}},"type":"object","required":["url","first_name","last_name"],"title":"EmailVerifyRequest","description":"Request body for email verification."},"EnrichRequest":{"properties":{"url":{"type":"string","title":"Url","description":"The company website URL.","example":"https://www.example.com"},"siren":{"anyOf":[{"type":"string","pattern":"^\\d{9}$"},{"type":"null"}],"title":"Siren","description":"9-digit SIREN; exact registry match when given.","example":"123456789"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"Company name for the registry search (default: derived from the URL)."},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"Contact first name (with last_name, enables the contact section).","example":"Jean"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Contact last name (with first_name, enables the contact section).","example":"Dupont"},"refresh":{"type":"boolean","title":"Refresh","description":"Bypass the 7-day result cache and recompute (full cost).","default":false}},"type":"object","required":["url"],"title":"EnrichRequest","description":"Request body for `POST /enrich` (Req 6.1, 11.4)."},"EntrepriseGeoRequest":{"properties":{"lat":{"type":"number","title":"Lat","description":"Latitude of the search center point.","example":48.8566},"long":{"type":"number","title":"Long","description":"Longitude of the search center point.","example":2.3522},"radius":{"type":"number","maximum":50.0,"minimum":0.0,"title":"Radius","description":"Search radius in km (max 50).","default":5,"example":5},"activite_principale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activite Principale","description":"NAF/APE activity code(s), comma-separated.","example":"01.12Z,28.15Z"},"section_activite_principale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Activite Principale","description":"Activity section letter(s), comma-separated (A-U).","example":"A,J,U"},"limite_matching_etablissements":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Limite Matching Etablissements","description":"Number of matching establishments to include per result (1-100).","example":10},"minimal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Minimal","description":"If true, returns a minimal response excluding secondary fields."},"include":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include","description":"Only with minimal=true. Comma-separated secondary fields: complements, dirigeants, finances, matching_etablissements, siege, score.","example":"siege,complements"},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number to return.","default":1,"example":1},"per_page":{"type":"integer","maximum":25.0,"minimum":1.0,"title":"Per Page","description":"Number of results per page (max 25).","default":10,"example":10},"page_etablissements":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Etablissements","description":"Page number for the matching_etablissements sub-pagination."},"sort_by_size":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sort By Size","description":"If true, sort results by company size (number of establishments)."}},"type":"object","required":["lat","long"],"title":"EntrepriseGeoRequest","description":"Request body for French company geographic search.\n\nProxies the GET /near_point endpoint of the API Recherche d'Entreprises.\nSearches for companies around given GPS coordinates within a radius."},"EntrepriseSearchRequest":{"properties":{"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q","description":"Search terms: company name, address, directors, or elected officials.","example":"la poste"},"activite_principale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activite Principale","description":"NAF/APE activity code(s), comma-separated. Applies to the legal unit only.","example":"01.12Z,28.15Z"},"section_activite_principale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Activite Principale","description":"Activity section letter(s), comma-separated. A=Agriculture, B=Extractive, C=Manufacturing, D=Energy, E=Water, F=Construction, G=Commerce, H=Transport, I=Hospitality, J=IT, K=Finance, L=Real estate, M=Scientific, N=Admin support, O=Public admin, P=Education, Q=Health, R=Arts, S=Other services, T=Households, U=Extra-territorial.","example":"A,J,U"},"categorie_entreprise":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Categorie Entreprise","description":"Company size category: PME, ETI, or GE. Comma-separated.","example":"PME"},"nature_juridique":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nature Juridique","description":"Legal category code(s) of the legal unit, comma-separated.","example":"7344,6544"},"tranche_effectif_salarie":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tranche Effectif Salarie","description":"Employee headcount bracket code(s), comma-separated.","example":"NN,00,01"},"etat_administratif":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Etat Administratif","description":"Administrative status: 'A' = Active, 'C' = Ceased.","example":"A"},"code_postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Postal","description":"Postal code(s), 5 digits, comma-separated. Filters on establishments.","example":"75001,69001"},"code_commune":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Commune","description":"INSEE commune code(s), 5 chars, comma-separated. Filters on establishments.","example":"01247,01111"},"departement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Departement","description":"Department code(s), 2-3 digits, comma-separated. Filters on establishments.","example":"75,69"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Region code(s), 2 digits, comma-separated. Filters on establishments.","example":"11,76"},"epci":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Epci","description":"EPCI SIREN number(s), comma-separated. Filters on establishments.","example":"200058519,248100737"},"code_collectivite_territoriale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Collectivite Territoriale","description":"Territorial collectivity code (Commune=INSEE code, EPCI=SIREN, Département=INSEE+'D', Région=INSEE).","example":"75C"},"nom_personne":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nom Personne","description":"Last name of a stakeholder (director or elected official).","example":"Dupont"},"prenoms_personne":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prenoms Personne","description":"First name(s) of a stakeholder (director or elected official).","example":"Jean"},"date_naissance_personne_min":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Naissance Personne Min","description":"Minimum birth date of a stakeholder (YYYY-MM-DD).","example":"1960-01-01"},"date_naissance_personne_max":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Naissance Personne Max","description":"Maximum birth date of a stakeholder (YYYY-MM-DD).","example":"1990-01-01"},"type_personne":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Personne","description":"Stakeholder type: 'dirigeant' (director) or 'elu' (elected official).","example":"dirigeant"},"ca_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ca Min","description":"Minimum revenue (chiffre d'affaires) in euros.","example":100000},"ca_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ca Max","description":"Maximum revenue (chiffre d'affaires) in euros.","example":5000000},"resultat_net_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resultat Net Min","description":"Minimum net income (résultat net) in euros.","example":10000},"resultat_net_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resultat Net Max","description":"Maximum net income (résultat net) in euros.","example":1000000},"id_convention_collective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Convention Collective","description":"Collective agreement identifier (IDCC) of an establishment.","example":"1090"},"id_finess":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Finess","description":"FINESS geographic identifier of an establishment (9 digits).","example":"010003853"},"id_rge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Rge","description":"RGE (Reconnu Garant de l'Environnement) identifier of an establishment.","example":"8611M10D109"},"id_uai":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id Uai","description":"UAI (Unité Administrative Immatriculée) identifier of an establishment.","example":"0022004T"},"convention_collective_renseignee":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Convention Collective Renseignee","description":"Only companies with at least one establishment with a declared collective agreement."},"egapro_renseignee":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Egapro Renseignee","description":"Only companies with a professional gender equality index (Egapro)."},"est_achats_responsables":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Achats Responsables","description":"Only companies with the RFAR (Relations Fournisseurs et Achats Responsables) label."},"est_alim_confiance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Alim Confiance","description":"Only companies with at least one Alim'Confiance sanitary control result."},"est_association":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Association","description":"Only associations (RNA identifier or association legal category)."},"est_bio":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Bio","description":"Only companies with at least one establishment certified organic (Agence Bio)."},"est_collectivite_territoriale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Collectivite Territoriale","description":"Only territorial collectivities."},"est_entrepreneur_individuel":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Entrepreneur Individuel","description":"Only sole proprietorships (entreprises individuelles)."},"est_entrepreneur_spectacle":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Entrepreneur Spectacle","description":"Only companies with a performing arts entrepreneur license."},"est_ess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Ess","description":"Only social and solidarity economy (ESS) companies."},"est_finess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Finess","description":"Only companies in the health/social sector (FINESS)."},"est_organisme_formation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Organisme Formation","description":"Only companies with a training organization establishment."},"est_patrimoine_vivant":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Patrimoine Vivant","description":"Only companies with the Entreprise du Patrimoine Vivant (EPV) label."},"est_qualiopi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Qualiopi","description":"Only companies with Qualiopi certification."},"est_rge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Rge","description":"Only companies recognized as Garant de l'Environnement (RGE)."},"est_siae":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Siae","description":"Only work integration social enterprises (SIAE)."},"est_service_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Service Public","description":"Only public service organizations. Note: not exhaustive, may contain false positives."},"est_l100_3":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est L100 3","description":"Only administrations per article L.100-3 CRPA. Note: not exhaustive, may contain false positives."},"est_societe_mission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Societe Mission","description":"Only mission-driven companies (sociétés à mission)."},"est_uai":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Est Uai","description":"Only companies with a UAI establishment (education sector)."},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number to return.","default":1,"example":1},"per_page":{"type":"integer","maximum":25.0,"minimum":1.0,"title":"Per Page","description":"Number of results per page (max 25).","default":10,"example":10},"page_etablissements":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Etablissements","description":"Page number for the matching_etablissements sub-pagination."},"limite_matching_etablissements":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Limite Matching Etablissements","description":"Number of matching establishments to include per result (1-100).","example":10},"minimal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Minimal","description":"If true, returns a minimal response excluding secondary fields. Use 'include' to selectively add them back."},"include":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include","description":"Only with minimal=true. Comma-separated list of secondary fields to include: complements, dirigeants, finances, matching_etablissements, siege, score.","example":"siege,complements"},"sort_by_size":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sort By Size","description":"If true, sort results by company size (number of establishments)."}},"type":"object","title":"EntrepriseSearchRequest","description":"Request body for French company text search.\n\nProxies the GET /search endpoint of the API Recherche d'Entreprises.\nAll filters are optional. At least one search parameter should be provided.\nString list parameters accept comma-separated values (e.g. \"01.12Z,28.15Z\")."},"ErrorBody":{"properties":{"status":{"type":"integer","title":"Status","description":"HTTP status code.","example":402},"error_message":{"type":"string","title":"Error Message","description":"Human-readable reason.","example":"Insufficient credits"}},"type":"object","required":["status","error_message"],"title":"ErrorBody","description":"Error payload of the documented 402, 403 and 429 responses."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OptOutRequest":{"properties":{"domain":{"type":"string","title":"Domain","description":"Company domain or website URL.","example":"example.com"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"First name of the person (with last_name).","example":"Jean"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"Last name of the person (with first_name).","example":"Dupont"}},"type":"object","required":["domain"],"title":"OptOutRequest","description":"Request body for `POST /privacy/opt-out` (Req 12.2).\n`{domain}` suppresses the whole domain; `{domain, first_name, last_name}`\nsuppresses one person (stored as an HMAC hash, never in clear)."},"QualifyRequest":{"properties":{"url":{"type":"string","title":"Url","description":"The company website URL to scrape and qualify.","example":"https://www.example.com"},"refresh":{"type":"boolean","title":"Refresh","description":"Bypass the 7-day result cache and recompute (full cost).","default":false}},"type":"object","required":["url"],"title":"QualifyRequest","description":"Request body for `/qualify`: `SummaryRequest` plus the optional cache bypass (Req 11.4)."},"QuestionRequest":{"properties":{"url":{"type":"string","title":"Url"},"question":{"type":"string","title":"Question"}},"type":"object","required":["url","question"],"title":"QuestionRequest"},"SignupRequest":{"properties":{"email":{"type":"string","title":"Email","description":"Contact email; becomes the key owner.","example":"you@company.com"},"accept_terms":{"type":"boolean","title":"Accept Terms","description":"Must be true: the caller accepts TERMS_VERSION."},"turnstile_token":{"type":"string","minLength":1,"title":"Turnstile Token","description":"Cloudflare Turnstile response token from the signup page."}},"type":"object","required":["email","accept_terms","turnstile_token"],"title":"SignupRequest","description":"Request body for `POST /signup`: self-serve Customer_Key creation.\n\n`accept_terms` must be true: the key is created with the current\n`TERMS_VERSION` already accepted, so it can call metered routes (including\n`/billing/checkout`) immediately."},"SummaryRequest":{"properties":{"url":{"type":"string","title":"Url","description":"The company website URL to scrape and qualify.","example":"https://www.example.com"}},"type":"object","required":["url"],"title":"SummaryRequest","description":"Request body for company qualification."},"TermsAcceptRequest":{"properties":{"terms_version":{"type":"string","minLength":1,"title":"Terms Version","description":"Terms version being accepted; must equal TERMS_VERSION.","example":"2026-11-01"}},"type":"object","required":["terms_version"],"title":"TermsAcceptRequest","description":"Request body for `POST /legal/terms/accept` (Req 13.2)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-token"}}},"tags":[{"name":"Qualification","description":"Qualify a company from its website URL (scrape, summarize via LLM, classify)."},{"name":"Email Verification","description":"Find a likely professional email from a company URL and a contact name (MX-checked, no SMTP)."},{"name":"Entreprise - Recherche textuelle","description":"Proxy of /search on https://recherche-entreprises.api.gouv.fr."},{"name":"Entreprise - Recherche géographique","description":"Proxy of /near_point on https://recherche-entreprises.api.gouv.fr."}]}