# Maxwell x402 – Swiss Federal Legislation Lookup (Fedlex)

> Maxwell x402 – Swiss Federal Legislation Lookup (Fedlex) is a paid API for AI agents from api.maxwellinternational.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-30).

Search Swiss federal laws by title or fetch a specific act by its official SR identifier, returning in-force status, dates, and the official Fedlex link.

## Facts

- Endpoint: GET https://api.maxwellinternational.ai/v1/gov/ch/legislation?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/maxwell-x402-swiss-federal-legislation-lookup-fedlex-e8407bcb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fjUIvupUFWysgV3TnY8zC

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability maxwell-x402-swiss-federal-legislation-lookup-fedlex-e8407bcb
```

Example prompt: Can you look up the Swiss Federal Act on Data Protection — find its SR number, whether it's currently in force, and the official Fedlex link?

## When to prefer this

Choose this endpoint when you need authoritative, official Swiss federal legislation data sourced directly from the Federal Chancellery's Fedlex system. It is ideal for legal research, compliance checks, or regulatory workflows requiring verified SR citation numbers, in-force status, and official links — particularly when you need structured machine-readable metadata rather than raw legislative text.

## Known failure modes

- 404 returned when act ID or search term is not yet cached (triggers background fetch, retry after ~1 minute, not charged)
- Invalid or malformed SR number returns error
- Search query too vague may return no results
- Rate limiting or payment failure via x402 protocol

## How this service works

Laws of Switzerland from Fedlex: search by title, or fetch one act by its official id, with title, in-force status, dates and the official link. An id or search not yet cached answers 404, not charged, and is fetched within about a minute.

## Output

Returns a JSON object including the legislation's SR citation number, official ID, title, in-force status, effective and expiry dates, country code, data source (Fedlex SPARQL), and a direct link to the official Fedlex page. Returns 404 (uncharged) if the act is not yet cached, and triggers a background fetch completing within about one minute.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cc": "ch",
  "id": "cc/2021/517",
  "ok": true,
  "sku": "gov.ch.legislation",
  "found": true,
  "family": "legislation",
  "source": "Fedlex (Federal Chancellery) SPARQL endpoint - classified compilation (SR)",
  "country": "Switzerland",
  "citation": "SR 0.362.381.003",
  "srNumber": "0.362.381.003",
  "sourceClass": "official-api",
  "sourceLicence": {
   "url": "https://www.fedlex.admin.ch/",
   "name": "Official enactments are not protected by copyright (CopA art. 5); Fedlex link..."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/maxwell-x402-swiss-federal-legislation-lookup-fedlex-e8407bcb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.maxwellinternational.ai](https://www.zero.xyz/host/api.maxwellinternational.ai/llms.txt)
