{
  "openapi": "3.1.0",
  "info": {
    "title": "Elyv API",
    "version": "1.0.0",
    "summary": "The OSINT lookups, searches and exposure checks of Elyv, from your own code.",
    "description": "The Elyv API runs the same lookups as the Elyv dashboard, from your own scripts, servers and tools.\n\nThree kinds of calls make up the API. The **modules** are one lookup each, one per source, reached at `POST /{module}`; the catalogue at `GET /modules` lists every one with the field it takes. The **full searches** (`/username`, `/email`, `/phone`, `/ip`, `/domain`, `/company`, `/fullname`) run everything the dashboard runs for an identifier at once, including the site sweep for usernames. The **exposure checks** (`/breach`, `/breaches`) say whether an identifier appears in known data breaches and which services were breached.\n\nExposure checks report where an identifier appears, when a breach happened and what kinds of data it exposed. They never return the leaked data itself: no passwords, no rows, no addresses.\n\nEvery call that runs a lookup spends one search from your plan, the same allowance as the dashboard; a call that finds nothing, or that a source fails to answer, gives it back. API keys come with the Pro and Ultra plans.",
    "contact": {
      "name": "Elyv",
      "url": "https://elyv.cc/contact"
    },
    "termsOfService": "https://elyv.cc/terms"
  },
  "servers": [
    {
      "url": "https://elyv.cc/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Modules",
      "description": "One lookup per source. 44 modules are open to API keys."
    },
    {
      "name": "Searches",
      "description": "Run every lookup that fits an identifier at once, plus the site sweep for usernames."
    },
    {
      "name": "Exposure",
      "description": "Whether an identifier appears in known breaches, and the breach radar. The leaked data is never returned."
    },
    {
      "name": "Catalogue",
      "description": "The lists of modules and sites. Free, no key."
    }
  ],
  "paths": {
    "/modules": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "operationId": "listModules",
        "summary": "List every module",
        "description": "Every module open to API keys, each mapped to the field it takes, an example value and its endpoint. Free, needs no key. Fetch once and cache: new modules appear here first.",
        "security": [],
        "responses": {
          "200": {
            "description": "The module catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalogue"
                }
              }
            }
          }
        }
      }
    },
    "/sites": {
      "get": {
        "tags": [
          "Catalogue"
        ],
        "operationId": "listSites",
        "summary": "List every site of the sweep",
        "description": "Every site the username sweep checks itself, with its slug, its name, its domain and its kind (`username`). Free, needs no key.",
        "security": [],
        "responses": {
          "200": {
            "description": "The list of sites.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sites"
                }
              }
            }
          }
        }
      }
    },
    "/{module}": {
      "post": {
        "tags": [
          "Modules"
        ],
        "operationId": "runModule",
        "summary": "Run one module",
        "description": "Reads one source. Send the single field named for that module in the catalogue. The answer always carries `module`, `query` and `found`, with the data under a key named after the module (for example `dns` for the `dns` module).",
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "required": true,
            "description": "The module slug, from `GET /modules`.",
            "schema": {
              "type": "string",
              "example": "dns"
            }
          },
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModuleRequest"
              },
              "examples": {
                "dns": {
                  "summary": "A domain module",
                  "value": {
                    "domain": "example.com"
                  }
                },
                "username": {
                  "summary": "A username module",
                  "value": {
                    "username": "torvalds"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The module answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                },
                "examples": {
                  "dns": {
                    "summary": "DNS records",
                    "value": {
                      "module": "dns",
                      "query": "example.com",
                      "found": true,
                      "dns": {
                        "domain": "example.com",
                        "a": [
                          "104.20.23.154"
                        ],
                        "aaaa": [
                          "2606:4700:10::6814:179a"
                        ],
                        "ns": [
                          "elliott.ns.cloudflare.com"
                        ],
                        "mx": [],
                        "txt": [
                          "v=spf1 -all"
                        ],
                        "signals": [
                          "No mail server"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A value is missing or has the wrong shape (`BAD_INPUT`). Costs nothing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No key, or a wrong or revoked key (`NO_KEY`, `BAD_KEY`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The plan does not include API access (`PLAN_REQUIRED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such module (`UNKNOWN_MODULE`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "The plan allowance is used up (`QUOTA`, `RATE_LIMIT`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The source did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Elyv is under maintenance (`MAINTENANCE`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/site/{slug}": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "checkSite",
        "summary": "Check one username on one site",
        "description": "The sweep behind `/username`, one site at a time. Use it when you already know where to look.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The site slug, from `GET /sites`.",
            "schema": {
              "type": "string",
              "example": "github"
            }
          },
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "example": "torvalds"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The site was checked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                },
                "examples": {
                  "github": {
                    "value": {
                      "module": "site/github",
                      "query": "torvalds",
                      "found": true,
                      "site": {
                        "name": "GitHub",
                        "slug": "github",
                        "status": "found",
                        "url": "https://github.com/torvalds"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such site (`UNKNOWN_SITE`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/username": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchUsername",
        "summary": "The full username search",
        "description": "Checks the username on every site of `GET /sites` and on the platforms of the exposure index, lists the accounts found, and adds the exposure check. Can take up to a minute: set a generous timeout. The answer reports how long it took in `tookMs`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "example": "torvalds"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/email": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchEmail",
        "summary": "The full email search",
        "description": "Gravatar, the domain and its mail setup, the services with an account, and the exposure check.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "example": "someone@example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/phone": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchPhone",
        "summary": "The full phone search",
        "description": "The number country, line type and formats, the operator when known, and the exposure check.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "+33612345678"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ip": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchIp",
        "summary": "The full IP address search",
        "description": "Location and network from several providers, reputation, and the exposure check.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ip"
                ],
                "properties": {
                  "ip": {
                    "type": "string",
                    "example": "93.184.215.14"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/domain": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchDomain",
        "summary": "The full domain search",
        "description": "Registration (RDAP), DNS records, subdomains, the web server and its security headers, and the exposure check.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/company": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchCompany",
        "summary": "The full company search",
        "description": "Company registries: the companies matching a name or an identifier, their officers and key figures.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Renault"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`PLAN_REQUIRED`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`, `RATE_LIMIT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fullname": {
      "post": {
        "tags": [
          "Searches"
        ],
        "operationId": "searchFullname",
        "summary": "The full name search",
        "description": "Encyclopaedia entries, the companies the person runs, and the exposure check, for a name. Send `first_name`, `last_name` or both.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Ada"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Lovelace"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The search ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/breach": {
      "post": {
        "tags": [
          "Exposure"
        ],
        "operationId": "checkExposure",
        "summary": "Exposure check for one identifier",
        "description": "Tells you whether an identifier appears in known data breaches, which ones, when they happened and what kinds of data they exposed. Send one of `email`, `username`, `phone` or `ip`.\n\nThe leaked data itself is never returned. No passwords, no rows, no addresses: the check answers where an identifier appears, so the person or the organisation concerned can act on it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Incognito"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Exactly one of the four identifiers.",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "ip": {
                    "type": "string"
                  }
                },
                "examples": [
                  {
                    "email": "someone@example.com"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The exposure check ran.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Exposure"
                },
                "examples": {
                  "hit": {
                    "value": {
                      "module": "breach",
                      "type": "email",
                      "query": "someone@example.com",
                      "found": true,
                      "total": 2,
                      "databases": [
                        {
                          "name": "Example Telecom",
                          "breachDate": "2023-04-11",
                          "exposed": [
                            "Email addresses",
                            "Names",
                            "Phone numbers"
                          ]
                        },
                        {
                          "name": "Sample Retail",
                          "breachDate": "2021-09-02",
                          "exposed": [
                            "Email addresses",
                            "Postal addresses"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`BAD_INPUT`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`QUOTA`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The breach sources did not answer (`UPSTREAM`). Nothing counted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/breaches": {
      "get": {
        "tags": [
          "Exposure"
        ],
        "operationId": "listBreaches",
        "summary": "The breach radar",
        "description": "Every publicly reported breach, newest first. It lists which services were breached, never who was in them.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only breaches reported on or after this date (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2026-09-01"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "A service, a domain or a kind of data.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The breach radar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Breaches"
                },
                "examples": {
                  "feed": {
                    "value": {
                      "version": 1,
                      "source": "Elyv breach radar (publicly reported breaches)",
                      "count": 1,
                      "breaches": [
                        {
                          "name": "ExampleShop",
                          "title": "Example Shop",
                          "domain": "exampleshop.com",
                          "breachDate": "2026-08-25",
                          "addedDate": "2026-09-21T13:54:00Z",
                          "pwnCount": 315579,
                          "dataClasses": [
                            "Email addresses",
                            "Names",
                            "Phone numbers"
                          ],
                          "verified": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`NO_KEY`, `BAD_KEY`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sk_elyv_...",
        "description": "An Elyv API key, created in the dashboard under Account, API keys. Sent as `Authorization: Bearer sk_elyv_...`."
      }
    },
    "parameters": {
      "Incognito": {
        "name": "incognito",
        "in": "query",
        "required": false,
        "description": "Run the call without writing it to the account history.",
        "schema": {
          "type": "boolean"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A sentence you can show.",
            "example": "Enter a valid domain name."
          },
          "code": {
            "type": "string",
            "description": "A stable code you can test.",
            "enum": [
              "BAD_INPUT",
              "NO_KEY",
              "BAD_KEY",
              "PLAN_REQUIRED",
              "UNKNOWN_MODULE",
              "UNKNOWN_SITE",
              "QUOTA",
              "RATE_LIMIT",
              "UPSTREAM",
              "MAINTENANCE"
            ]
          },
          "field": {
            "type": "string",
            "description": "The field at fault, when one is.",
            "example": "domain"
          }
        }
      },
      "ModuleRequest": {
        "type": "object",
        "description": "One field, named for the module in the catalogue.",
        "additionalProperties": true,
        "properties": {
          "username": {
            "type": "string",
            "description": "An account name, 2 to 30 characters: letters, digits, dot, underscore, dash. 43 modules take this field.",
            "example": "torvalds"
          },
          "domain": {
            "type": "string",
            "description": "A domain name. 1 modules take this field.",
            "example": "example.com"
          }
        }
      },
      "ModuleResponse": {
        "type": "object",
        "required": [
          "module",
          "query",
          "found"
        ],
        "additionalProperties": true,
        "properties": {
          "module": {
            "type": "string",
            "description": "The module you called."
          },
          "query": {
            "type": "string",
            "description": "The value you sent, as the module read it."
          },
          "found": {
            "type": "boolean",
            "description": "Whether the source had something. A miss gives the search back."
          },
          "tookMs": {
            "type": "integer",
            "description": "How long the call took, on the searches that report it."
          }
        }
      },
      "Exposure": {
        "type": "object",
        "required": [
          "module",
          "found"
        ],
        "properties": {
          "module": {
            "type": "string",
            "const": "breach"
          },
          "type": {
            "type": "string",
            "enum": [
              "email",
              "username",
              "phone",
              "ip"
            ]
          },
          "query": {
            "type": "string"
          },
          "found": {
            "type": "boolean"
          },
          "total": {
            "type": "integer",
            "description": "How many breaches mention the identifier."
          },
          "databases": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "exposed"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The breached service."
                },
                "breachDate": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "When the breach happened (YYYY-MM-DD or YYYY-MM)."
                },
                "exposed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The kinds of data the breach exposed. Never the data itself."
                },
                "records": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "How many records mention the identifier, when known."
                },
                "stealerLog": {
                  "type": "boolean",
                  "description": "Present when the source is an infostealer log."
                }
              }
            }
          }
        }
      },
      "Breaches": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "breaches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "domain": {
                  "type": "string"
                },
                "breachDate": {
                  "type": "string",
                  "format": "date"
                },
                "addedDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "pwnCount": {
                  "type": "integer",
                  "description": "How many accounts the breach held."
                },
                "dataClasses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "verified": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "Catalogue": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer"
          },
          "auth": {
            "type": "string"
          },
          "cost": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "field": {
                  "type": "string",
                  "enum": [
                    "username",
                    "domain"
                  ]
                },
                "example": {
                  "type": "string"
                },
                "endpoint": {
                  "type": "string"
                },
                "family": {
                  "type": "string"
                },
                "domain": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Sites": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "sites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "domain": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "username"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
