openapi: 3.2.0 info: title: Sirenic Secteur API version: 1.0.0 description: 'French & European company data, pay-per-call in USDC or EURC — EURC at numeric parity: the same figure as the USDC price, not FX-converted (at the ECB rate of 4 Sept 2026, about 16 % more in dollar terms) via the x402 protocol — or with an API key and prepaid credits (1 credit = 1 EUR, same per-call prices, no wallet).' contact: email: contact@sirenic.eu license: name: 'Data: Licence Ouverte / Open License Etalab 2.0' url: https://www.etalab.gouv.fr/licence-ouverte-open-licence/ servers: - url: https://api.sirenic.eu security: - {} - ApiKeyAuth: [] - BearerAuth: [] tags: - name: Secteur paths: /v1/secteur/{code_naf}/benchmarks: get: summary: Sector benchmarks by NAF activity code (medians vs peers) description: 'Sector benchmarks and sector statistics for a French NAF activity code (any level: division, groupe, classe, sous-classe): number of active companies, median company age (with quartiles), workforce-bracket distribution, and — when at least 5 companies file public accounts — median revenue, EBITDA margin, pre-tax result and debt ratio. Peer comparison in one call: place a company against its peers. Aggregates only, no personal data; sectors with fewer than 5 companies are excluded.' x-price: $0.05 x-payment: protocol: x402 network: eip155:8453 parameters: - name: code_naf in: path required: true schema: type: string pattern: ^\d{2}(\.\d{0,2}[A-Z]?)?$ example: 68.20B description: 'NAF code, any level: division (68), groupe (68.2), classe (68.20), sous-classe (68.20B)' responses: '200': description: Number of active companies, median age (+quartiles), workforce distribution, and financial medians (masked when fewer than 5 companies file accounts). content: application/json: example: code_naf: 62.01Z niveau: sous-classe effectif_entreprises: actives_diffusibles: 98868 age_annees: mediane: 4 q1: 1 q3: 11 effectifs_salaries: repartition: NN: 88097 repartition_libelles: NN: non renseigné finances: entreprises_avec_comptes: 8950 marge_ebe_pct: mediane: 7.197 rcai_sur_ca_pct: mediane: 3.989 taux_endettement: mediane: 3.348 source: INSEE Sirene (Licence Ouverte Etalab 2.0) et ratios financiers INPI / Banque de France (Licence Ouverte 2.0) '400': description: Invalid NAF code. Never charged. / Jamais facturé. '402': $ref: '#/components/responses/Reponse402PaymentRequired' '404': description: Unknown NAF code, or sector excluded by k-anonymity (fewer than 5 companies). tags: - Secteur operationId: getV1SecteurByCodeNafBenchmarks x-operation-id-source: derived components: responses: Reponse402PaymentRequired: description: Payment required — x402 payment requirements in body (JSON) and headers. securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Api-Key description: 'Sirenic API key (srn_live_…) paying with prepaid credits (1 credit = 1 EUR, same prices as x402). Credits expire 12 months after purchase; calls are charged first to the credits closest to expiry. Optional: without it, the same routes answer 402 with a signable x402 quote. Insufficient balance → 402 {error: credits_insuffisants} WITHOUT a PAYMENT-REQUIRED header. Get a key at /compte.' BearerAuth: type: http scheme: bearer description: 'The same srn_live_… API key sent as Authorization: Bearer. A bearer value that is not an srn_ key is ignored (x402 flow unchanged).'