{
  "openapi": "3.1.0",
  "info": {
    "title": "lookups.nl",
    "version": "1.0.0",
    "description": "Pay-per-call verification lookups for AI agents. x402 payments (USDC on Base). No accounts."
  },
  "servers": [
    {
      "url": "https://lookups.nl"
    }
  ],
  "paths": {
    "/vat/{number}": {
      "get": {
        "operationId": "vat-eu",
        "summary": "Validate an EU VAT number: local format + check-digit prefilter, authoritative VIES check with retry and cache, durable audit receipt.",
        "x-price-usd": "$0.005",
        "x-payment-protocol": "x402",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "normalized": {
                      "type": "string"
                    },
                    "valid": {
                      "type": "boolean"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "address": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checked_at": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "const": "VIES"
                    },
                    "cache_age_seconds": {
                      "type": "number"
                    },
                    "consultation_id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "receipt_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "input",
                    "normalized",
                    "valid",
                    "name",
                    "address",
                    "checked_at",
                    "source",
                    "cache_age_seconds",
                    "consultation_id",
                    "receipt_url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed input (free — charged requests never 400)"
          },
          "402": {
            "description": "Payment required — x402 payment requirements in body"
          },
          "503": {
            "description": "Upstream source unavailable (free)"
          }
        }
      }
    },
    "/iban/{number}": {
      "get": {
        "operationId": "iban",
        "summary": "Validate an IBAN offline against the ISO 13616 registry: country and length check, ISO 7064 MOD-97-10 checksum, BBAN extraction, durable audit receipt.",
        "x-price-usd": "$0.002",
        "x-payment-protocol": "x402",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "normalized": {
                      "type": "string"
                    },
                    "valid": {
                      "type": "boolean"
                    },
                    "country": {
                      "type": "string"
                    },
                    "bban": {
                      "type": "string"
                    },
                    "checked_at": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "const": "ISO13616"
                    },
                    "cache_age_seconds": {
                      "type": "number"
                    },
                    "receipt_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "input",
                    "normalized",
                    "valid",
                    "country",
                    "bban",
                    "checked_at",
                    "source",
                    "cache_age_seconds",
                    "receipt_url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed input (free — charged requests never 400)"
          },
          "402": {
            "description": "Payment required — x402 payment requirements in body"
          },
          "503": {
            "description": "Upstream source unavailable (free)"
          }
        }
      }
    },
    "/eori/{number}": {
      "get": {
        "operationId": "eori",
        "summary": "Validate an EU EORI number (customs economic operator ID): structural prefilter, authoritative EOS check with retry and cache, registered name and address where the operator consented, durable audit receipt.",
        "x-price-usd": "$0.005",
        "x-payment-protocol": "x402",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "normalized": {
                      "type": "string"
                    },
                    "valid": {
                      "type": "boolean"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "address": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checked_at": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "const": "EOS"
                    },
                    "cache_age_seconds": {
                      "type": "number"
                    },
                    "receipt_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "input",
                    "normalized",
                    "valid",
                    "name",
                    "address",
                    "checked_at",
                    "source",
                    "cache_age_seconds",
                    "receipt_url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed input (free — charged requests never 400)"
          },
          "402": {
            "description": "Payment required — x402 payment requirements in body"
          },
          "503": {
            "description": "Upstream source unavailable (free)"
          }
        }
      }
    },
    "/lei/{code}": {
      "get": {
        "operationId": "lei",
        "summary": "Look up a Legal Entity Identifier in the global GLEIF register: local ISO 17442 checksum prefilter, authoritative GLEIF check with retry and cache, durable audit receipt.",
        "x-price-usd": "$0.005",
        "x-payment-protocol": "x402",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "normalized": {
                      "type": "string"
                    },
                    "found": {
                      "type": "boolean"
                    },
                    "legal_name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "legal_jurisdiction": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "registration_status": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "checked_at": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "const": "GLEIF"
                    },
                    "cache_age_seconds": {
                      "type": "number"
                    },
                    "receipt_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "input",
                    "normalized",
                    "found",
                    "legal_name",
                    "legal_jurisdiction",
                    "status",
                    "registration_status",
                    "checked_at",
                    "source",
                    "cache_age_seconds",
                    "receipt_url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed input (free — charged requests never 400)"
          },
          "402": {
            "description": "Payment required — x402 payment requirements in body"
          },
          "503": {
            "description": "Upstream source unavailable (free)"
          }
        }
      }
    },
    "/vat-rate/{country}": {
      "get": {
        "operationId": "vat-rate",
        "summary": "Current VAT rates for an EU member state: standard, reduced, super-reduced and parking rates, from a hand-verified table of European Commission rate data.",
        "x-price-usd": "$0.002",
        "x-payment-protocol": "x402",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "string"
                    },
                    "normalized": {
                      "type": "string"
                    },
                    "country_name": {
                      "type": "string"
                    },
                    "standard_rate": {
                      "type": "number"
                    },
                    "reduced_rates": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    "super_reduced_rate": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "parking_rate": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "const": "EC-TEDB"
                    },
                    "last_verified": {
                      "type": "string"
                    },
                    "disclaimer": {
                      "type": "string"
                    },
                    "checked_at": {
                      "type": "string"
                    },
                    "cache_age_seconds": {
                      "type": "number"
                    },
                    "receipt_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "input",
                    "normalized",
                    "country_name",
                    "standard_rate",
                    "reduced_rates",
                    "super_reduced_rate",
                    "parking_rate",
                    "source",
                    "last_verified",
                    "disclaimer",
                    "checked_at",
                    "cache_age_seconds",
                    "receipt_url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Malformed input (free — charged requests never 400)"
          },
          "402": {
            "description": "Payment required — x402 payment requirements in body"
          },
          "503": {
            "description": "Upstream source unavailable (free)"
          }
        }
      }
    },
    "/receipts/{id}": {
      "get": {
        "operationId": "receipt",
        "summary": "Fetch a durable audit receipt produced by a paid lookup (free)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt JSON: {id, lookup, input, result, created_at}"
          },
          "404": {
            "description": "Receipt not found"
          }
        }
      }
    }
  }
}