Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: BoringToolsKit Privacy region API
version: 1.0.0
description: Privacy-preserving public endpoints for BoringToolsKit (boringtoolskit.com). Every calculator runs in the browser; only optional, labeled event and region endpoints exist server-side. All endpoints require no authentication and collect no personal data. See https://boringtoolskit.com/llms.txt for the full tool catalogue and https://boringtoolskit.com/tool-knowledge.json for evidence-labeled tool records.
contact:
name: BoringToolsKit
url: https://boringtoolskit.com/contact/
servers:
- url: https://boringtoolskit.com
tags:
- name: Privacy region
description: Resolve a visitor's privacy region for consent handling.
paths:
/api/region:
get:
tags:
- Privacy region
operationId: getPrivacyRegion
summary: Resolve the visitor's privacy region from the edge country
description: Returns the visitor's privacy region (eu, uk, us, or other) derived from Cloudflare's edge country, plus whether consent is required. Most pages receive this via edge middleware and make no fetch; this endpoint is a fallback for on-demand use. No personal data is stored server-side.
responses:
'200':
description: Privacy region resolved.
content:
application/json:
schema:
type: object
required:
- region
- consentRequired
- v
properties:
region:
type: string
enum:
- eu
- uk
- us
- other
description: Privacy region of the requesting client.
consentRequired:
type: boolean
description: Whether consent is required in this region.
country:
type:
- string
- 'null'
description: Two-letter edge country code, or null when unknown.
v:
type: integer
const: 1
description: API schema version.
'403':
description: Disallowed Origin.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Error:
type: object
required:
- code
- message
properties:
code:
type: string
description: Stable machine-readable error code.
message:
type: string
description: Human-readable error description.
resolution:
type: string
description: Optional hint for how to resolve the error.