{
    "openapi": "3.1.0",
    "info": {
        "title": "SBI API suite",
        "version": "0.0.1",
        "description": "De SBI Codes API geeft toegang tot de volledige CBS Standaard Bedrijfsindeling (SBI 2025) met ruim 2.300 bedrijfsactiviteitencodes. Kies uit drie endpoints: indexeer alle codes hi\u00ebrarchisch, zoek een specifieke code op of doorzoek op trefwoord.\n\n## Authentication\n\nAll API endpoints require authentication. Include your API key in every request using **one** of the following methods:\n\n**Option 1 \u2014 X-Api-Key header (recommended)**\n```\nX-Api-Key: ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\n**Option 2 \u2014 Bearer token**\n```\nAuthorization: Bearer ga_live_xxxxxxxxxxxxxxxxxxxx\n```\n\nYou can generate and manage API keys in your [dashboard](https://getapi.nl/dashboard).\n\n## AI & Agent Payments (x402)\n\nSome endpoints support direct payments for AI agents via the **x402** protocol (https://www.x402.org).\nNo API key or account is needed. Send a normal request without key;\nthe server will respond with **HTTP 402** and a `PAYMENT-REQUIRED` header:\n\n```\nPAYMENT-REQUIRED: <base64 JSON PaymentRequirements>\n```\n\nThis base64 string contains, among other things, `network`, `asset`, `amount`, and `payTo`. \nYour agent signs an EIP-3009 *transferWithAuthorization* for the specified `amount` of USDC to that `payTo` address, \nencodes the signature as base64, and resubmits the request with:\n\n```\nPAYMENT-SIGNATURE: <base64 SignedAuthorization>\n```\n\nThe server verifies the signature via a facilitator, provides the data, and settles the payment on-chain. \nThe success response includes a `PAYMENT-RESPONSE` header containing the transaction information. \nA one-time `nonce` prevents replay attacks. Payments are made in USDC on **Base**; \nthe price is determined by the `credit_cost` of the endpoint.",
        "contact": {
            "email": "info@wdnoord.nl"
        },
        "x-guidance": "GetAPI.nl is een Nederlandse API-platform voor lookups en validaties (postcode,\nadres, kenteken, BTW, e-mail, KVK, IBAN, energiemaatwerk, overheidsdata). Elke\nendpoint accepteert een API key via de X-Api-Key header of Authorization:\nBearer <key>.\n\nSommige endpoints zijn ook direct betaalbaar voor AI-agents via het x402-protocol\n(https://www.x402.org) zonder account of API key: stuur een verzoek zonder key,\nde server antwoordt met HTTP 402 en een PAYMENT-REQUIRED header (base64 JSON met\nnetwork, asset, amount, payTo). Teken daarna een EIP-3009 transferWithAuthorization\nvoor het gevraagde bedrag in USDC op Base en hertrail met een PAYMENT-SIGNATURE\nheader. De server verifieert, levert de data en settleert on-chain.\n\nTips voor agents:\n- Lees eerst de PAYMENT-REQUIRED header van een 402-antwoord; die is leidend.\n- Geef altijd de exact door de server gevraagde parameters mee.\n- Een endpoint met een \"x-payment-info\" blok vereist betaling voor gebruik."
    },
    "servers": [
        {
            "url": "https://api.getapi.nl",
            "description": "GetAPI"
        }
    ],
    "security": [
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        },
        {
            "ApiKeyAuth": []
        },
        {
            "BearerAuth": []
        }
    ],
    "paths": {
        "/v1/cbs/sbi": {
            "get": {
                "operationId": "cbs.sbi",
                "description": "Returns all SBI codes from the local dataset. Optionally filter by `level` (1\u20135)\nand/or `parent_code` to retrieve only the direct children of a given SBI code.\n\nLevels: 1 = sectie (A\u2013U), 2 = afdeling, 3 = groep, 4 = klasse, 5 = subklasse.\n\nSource: [CBS Standaard Bedrijfsindeling 2025](https://www.cbs.nl/sbi)",
                "summary": "SBI code index",
                "tags": [
                    "CBS - SBI Codes",
                    "SbiIndex"
                ],
                "parameters": [
                    {
                        "name": "level",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 5
                        }
                    },
                    {
                        "name": "parent_code",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9.]*$",
                            "maxLength": 12
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of SBI codes",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "total": 2,
                                            "results": [
                                                {
                                                    "code": "A",
                                                    "code_numeric": "A",
                                                    "parent_code": null,
                                                    "level": 1,
                                                    "title": "Landbouw, bosbouw en visserij",
                                                    "has_children": true
                                                },
                                                {
                                                    "code": "01",
                                                    "code_numeric": "01",
                                                    "parent_code": "A",
                                                    "level": 2,
                                                    "title": "Landbouw, jacht en dienstverlening voor de landbouw en jacht",
                                                    "has_children": true
                                                }
                                            ]
                                        }
                                    ],
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "code_numeric": {
                                                        "type": "string"
                                                    },
                                                    "parent_code": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "level": {
                                                        "type": "integer"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "has_children": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "code_numeric",
                                                    "parent_code",
                                                    "level",
                                                    "title",
                                                    "has_children"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "results"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "402": {
                        "description": "Payment Required"
                    }
                },
                "x-payment-info": {
                    "price": {
                        "mode": "fixed",
                        "currency": "USD",
                        "amount": "0.005000"
                    },
                    "protocols": [
                        {
                            "x402": {}
                        }
                    ]
                }
            }
        },
        "/v1/cbs/sbi/search": {
            "get": {
                "operationId": "cbs.sbi.search",
                "description": "Searches through all SBI codes and titles using a free-text query.\nReturns up to 25 matches, ordered by level (broad \u2192 specific) and code.\n\nSource: [CBS Standaard Bedrijfsindeling 2025](https://www.cbs.nl/sbi)",
                "summary": "SBI code search",
                "tags": [
                    "CBS - SBI Codes",
                    "SbiSearch"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Search results",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "found": true,
                                            "query": "hypotheek",
                                            "total": 2,
                                            "results": [
                                                {
                                                    "code": "64.92",
                                                    "code_numeric": "6492",
                                                    "title": "Overige kredietverstrekking",
                                                    "level": 4
                                                },
                                                {
                                                    "code": "64.92.3",
                                                    "code_numeric": "64923",
                                                    "title": "Hypotheekverstrekkers",
                                                    "level": 5
                                                }
                                            ]
                                        }
                                    ],
                                    "properties": {
                                        "found": {
                                            "type": "boolean"
                                        },
                                        "query": {
                                            "type": "string"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "code_numeric": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "level": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "code_numeric",
                                                    "title",
                                                    "level"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "found",
                                        "query",
                                        "total",
                                        "results"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "402": {
                        "description": "Payment Required"
                    }
                },
                "x-payment-info": {
                    "price": {
                        "mode": "fixed",
                        "currency": "USD",
                        "amount": "0.001000"
                    },
                    "protocols": [
                        {
                            "x402": {}
                        }
                    ]
                }
            }
        },
        "/v1/cbs/sbi/{code}": {
            "get": {
                "operationId": "cbs.sbi.detail",
                "description": "Returns the title, description, level and full classification path for a single SBI code.\nAccepts both the dotted CBS format (`64.92.3`) and the numeric format (`64923`).\n\nSource: [CBS Standaard Bedrijfsindeling 2025](https://www.cbs.nl/sbi)",
                "summary": "SBI code lookup",
                "tags": [
                    "CBS - SBI Codes",
                    "Sbi"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "64.92"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "SBI code found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "found": true,
                                            "code": "64.92.3",
                                            "code_numeric": "64923",
                                            "title": "Hypotheekverstrekkers",
                                            "description": null,
                                            "level": 5,
                                            "path": [
                                                {
                                                    "code": "64",
                                                    "code_numeric": "64",
                                                    "title": "Financi\u00eble dienstverlening (geen verzekeringen en pensioenfondsen)"
                                                },
                                                {
                                                    "code": "64.9",
                                                    "code_numeric": "649",
                                                    "title": "Financi\u00eble dienstverlening (geen verzekeringen en pensioenfondsen), overig"
                                                },
                                                {
                                                    "code": "64.92",
                                                    "code_numeric": "6492",
                                                    "title": "Overige kredietverstrekking"
                                                },
                                                {
                                                    "code": "64.92.3",
                                                    "code_numeric": "64923",
                                                    "title": "Hypotheekverstrekkers"
                                                }
                                            ]
                                        }
                                    ],
                                    "properties": {
                                        "found": {
                                            "type": "boolean"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "code_numeric": {
                                            "type": "string"
                                        },
                                        "title": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "description": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "level": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "path": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "code_numeric": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "code_numeric",
                                                    "title"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "found",
                                        "code",
                                        "code_numeric",
                                        "title",
                                        "description",
                                        "level",
                                        "path"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "SBI code not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "examples": [
                                        {
                                            "found": false,
                                            "code": "99.99.9",
                                            "code_numeric": "99999",
                                            "title": null,
                                            "description": null,
                                            "level": null,
                                            "path": []
                                        }
                                    ],
                                    "properties": {
                                        "found": {
                                            "type": "boolean"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "code_numeric": {
                                            "type": "string"
                                        },
                                        "title": {
                                            "type": "null"
                                        },
                                        "description": {
                                            "type": "null"
                                        },
                                        "level": {
                                            "type": "null"
                                        },
                                        "path": {
                                            "type": "array",
                                            "items": []
                                        }
                                    },
                                    "required": [
                                        "found",
                                        "code",
                                        "code_numeric",
                                        "title",
                                        "description",
                                        "level",
                                        "path"
                                    ]
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Payment Required"
                    }
                },
                "x-payment-info": {
                    "price": {
                        "mode": "fixed",
                        "currency": "USD",
                        "amount": "0.001000"
                    },
                    "protocols": [
                        {
                            "x402": {}
                        }
                    ]
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}