{
  "openapi": "3.0.0",
  "paths": {
    "/v1/account": {
      "get": {
        "operationId": "AccountController_getAccount",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get account details",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/topics": {
      "get": {
        "operationId": "TopicsController_getTopics",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopicsListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List topics",
        "tags": [
          "topics"
        ]
      }
    },
    "/v1/prompts": {
      "get": {
        "operationId": "PromptsController_getPrompts",
        "parameters": [
          {
            "name": "take",
            "required": false,
            "in": "query",
            "schema": {
              "maximum": 1000,
              "exclusiveMinimum": true,
              "default": 50,
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "skip",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 0,
              "maximum": 9007199254740991,
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptsListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List prompts",
        "tags": [
          "prompts"
        ]
      }
    },
    "/v1/competitors": {
      "get": {
        "operationId": "CompetitorsController_getCompetitors",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompetitorsListResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List competitors",
        "tags": [
          "competitors"
        ]
      }
    },
    "/v1/analytics/brands/mentions": {
      "post": {
        "description": "Returns a time series of how often your brand and tracked competitors appear in AI search engine answers",
        "operationId": "AnalyticsController_getBrandsMentions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeSeriesRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeSeriesResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Brand mention trends",
        "tags": [
          "analytics"
        ]
      }
    },
    "/v1/analytics/sources": {
      "post": {
        "description": "Returns the domains or URLs most frequently cited in AI search answers for your account, ranked by citation volume",
        "operationId": "AnalyticsController_getSourceAnalysis",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceAnalysisRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceAnalysisResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Top cited sources",
        "tags": [
          "analytics"
        ]
      }
    },
    "/v1/traffic/sdk/captured-actions": {
      "post": {
        "description": "Returns visitor actions captured on your domain. **Beta:** the response shape may change.",
        "operationId": "SdkTrafficController_getCapturedActions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CapturedActionsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapturedActionsResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Export captured actions",
        "tags": [
          "traffic"
        ],
        "x-stability": "beta"
      }
    },
    "/v1/auth/accesskey/exchange": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Exchange a static API key for a short-lived session JWT.",
        "description": "Send your static API key as a Bearer token. Returns a short-lived session JWT to use on all subsequent API requests.",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Session JWT issued.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "keyId",
                    "sessionJwt"
                  ],
                  "properties": {
                    "keyId": {
                      "type": "string",
                      "description": "Identifier of the static key used."
                    },
                    "sessionJwt": {
                      "type": "string",
                      "description": "Bearer token for subsequent API calls."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Static key is missing, invalid, or revoked."
          }
        }
      }
    }
  },
  "info": {
    "title": "Limy API",
    "description": "Limy public API",
    "version": "1.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "authentication"
    },
    {
      "name": "accounts"
    },
    {
      "name": "competitors"
    },
    {
      "name": "prompts"
    },
    {
      "name": "topics"
    },
    {
      "name": "analytics"
    },
    {
      "name": "traffic"
    }
  ],
  "servers": [],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "AccountResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "domains"
        ]
      },
      "TopicsListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "PromptsListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "prompt": {
                  "type": "string"
                },
                "topicId": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "id",
                "prompt",
                "topicId"
              ]
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "take": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "skip": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasMore": {
                "type": "boolean"
              }
            },
            "required": [
              "take",
              "skip",
              "hasMore"
            ]
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "CompetitorsListResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "domains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "domains"
              ]
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "TimeSeriesRequestDto": {
        "type": "object",
        "properties": {
          "interval": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ]
          },
          "filters": {
            "type": "object",
            "properties": {
              "timeRange": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              },
              "providers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "GEMINI",
                    "OPENAI",
                    "ANTHROPIC",
                    "PERPLEXITY",
                    "GROK",
                    "GOOGLE_AI_MODE",
                    "GOOGLE_AI_OVERVIEW",
                    "COPILOT"
                  ]
                }
              },
              "topics": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              },
              "regions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 2,
                      "pattern": "^[A-Za-z]{2}$",
                      "description": "ISO 3166-1 alpha-2 country code (case-insensitive). "
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            },
            "required": [
              "timeRange"
            ]
          }
        },
        "required": [
          "interval",
          "filters"
        ]
      },
      "TimeSeriesResponseDto": {
        "type": "object",
        "properties": {
          "interval": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ]
          },
          "timeRange": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "from",
              "to"
            ]
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "value": {
                        "type": "number",
                        "nullable": true
                      }
                    },
                    "required": [
                      "timestamp",
                      "value"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "data"
              ]
            }
          }
        },
        "required": [
          "interval",
          "timeRange",
          "series"
        ]
      },
      "SourceAnalysisRequestDto": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 100,
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "groupBy": {
            "type": "string",
            "enum": [
              "domain",
              "url"
            ]
          },
          "filters": {
            "type": "object",
            "properties": {
              "timeRange": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              },
              "providers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "GEMINI",
                    "OPENAI",
                    "ANTHROPIC",
                    "PERPLEXITY",
                    "GROK",
                    "GOOGLE_AI_MODE",
                    "GOOGLE_AI_OVERVIEW",
                    "COPILOT"
                  ]
                }
              },
              "topics": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              },
              "regions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 2,
                      "pattern": "^[A-Za-z]{2}$",
                      "description": "ISO 3166-1 alpha-2 country code (case-insensitive). "
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            },
            "required": [
              "timeRange"
            ]
          }
        },
        "required": [
          "limit",
          "offset",
          "groupBy",
          "filters"
        ]
      },
      "SourceAnalysisResponseDto": {
        "type": "object",
        "properties": {
          "groupBy": {
            "type": "string",
            "enum": [
              "domain",
              "url"
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string"
                },
                "share": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "citations": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "source",
                "share",
                "citations"
              ]
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "exclusiveMinimum": true,
                "maximum": 9007199254740991,
                "minimum": 0
              },
              "offset": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasMore": {
                "type": "boolean"
              }
            },
            "required": [
              "total",
              "limit",
              "offset",
              "hasMore"
            ]
          }
        },
        "required": [
          "groupBy",
          "sources",
          "pagination"
        ]
      },
      "CapturedActionsRequestDto": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "object",
            "properties": {
              "timeRange": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Start of the export window (inclusive), ISO 8601 date-time."
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time",
                    "description": "End of the export window (exclusive), ISO 8601 date-time."
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              },
              "userIds": {
                "description": "Optional list of visitor IDs (distinctId) to filter by. Omit to return all visitors.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "timeRange"
            ]
          },
          "limit": {
            "default": 200,
            "description": "Maximum number of actions to return per page (1–1000).",
            "type": "integer",
            "exclusiveMinimum": true,
            "maximum": 1000,
            "minimum": 0
          },
          "cursor": {
            "description": "Opaque keyset cursor from a previous response. Pass `pagination.nextCursor` to fetch the next page; omit for the first page.",
            "type": "string"
          }
        },
        "required": [
          "filters"
        ]
      },
      "CapturedActionsResponseDto": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uuid": {
                  "type": "string",
                  "format": "uuid"
                },
                "sessionId": {
                  "type": "string"
                },
                "event": {
                  "type": "string"
                },
                "eventType": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "deviceType": {
                  "type": "string"
                },
                "browser": {
                  "type": "string"
                },
                "os": {
                  "type": "string"
                },
                "referrer": {
                  "type": "string"
                },
                "sessionEntryUrl": {
                  "type": "string"
                },
                "sessionEntryPathname": {
                  "type": "string"
                },
                "browserLanguage": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "rawUserAgent": {
                  "type": "string"
                },
                "utmSource": {
                  "type": "string"
                },
                "currentUrl": {
                  "type": "string"
                },
                "elementText": {
                  "type": "string"
                },
                "lmElementId": {
                  "type": "string",
                  "description": "Limy-assigned identifier of the element the visitor interacted with. Null when Limy did not classify the element.",
                  "nullable": true
                },
                "lmDisplayName": {
                  "type": "string",
                  "description": "Human-readable label Limy classified for the interacted element. Null when not classified.",
                  "nullable": true
                },
                "lmPageCategory": {
                  "type": "string",
                  "description": "Limy-derived category of the page where the action occurred. Null when not classified.",
                  "nullable": true
                },
                "lmProductId": {
                  "type": "string",
                  "description": "Product identifier associated with the interacted element. Null when not applicable.",
                  "nullable": true
                },
                "lmAttrValue": {
                  "type": "number",
                  "description": "Limy attribution value (weight) assigned to the action. Null when not attributed.",
                  "nullable": true
                },
                "aiProvider": {
                  "type": "string",
                  "description": "AI engine that referred the visit (e.g. ChatGPT, Gemini, Perplexity). Null for non-AI traffic.",
                  "nullable": true
                },
                "elementsChainHref": {
                  "type": "string",
                  "description": "href of the interacted element, from the autocapture element chain."
                },
                "elementsChainTexts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Text contents of the elements in the autocapture element chain."
                },
                "elementsChain": {
                  "type": "string",
                  "description": "Raw autocapture element chain for the interacted element."
                },
                "elementsChainIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Element IDs from the autocapture element chain."
                },
                "elementsChainElements": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Tag names of the elements in the autocapture element chain."
                },
                "distinctId": {
                  "type": "string",
                  "description": "Stable visitor identifier. This is the value matched by the `filters.userIds` request filter."
                },
                "deviceId": {
                  "type": "string",
                  "description": "Persistent device identifier assigned by the tracking pixel."
                },
                "pathname": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                },
                "windowId": {
                  "type": "string"
                },
                "pageviewId": {
                  "type": "string"
                },
                "referringDomain": {
                  "type": "string",
                  "nullable": true
                },
                "sessionEntryReferrer": {
                  "type": "string",
                  "nullable": true
                },
                "sessionEntryHost": {
                  "type": "string",
                  "nullable": true
                },
                "sessionEntryUtmSource": {
                  "type": "string",
                  "nullable": true
                },
                "sessionEntryReferringDomain": {
                  "type": "string",
                  "nullable": true
                },
                "screenWidth": {
                  "type": "number"
                },
                "screenHeight": {
                  "type": "number"
                },
                "viewportWidth": {
                  "type": "number"
                },
                "viewportHeight": {
                  "type": "number"
                },
                "browserVersion": {
                  "type": "number"
                },
                "osVersion": {
                  "type": "string",
                  "nullable": true
                },
                "timezone": {
                  "type": "string"
                },
                "timezoneOffset": {
                  "type": "number"
                },
                "browserLanguagePrefix": {
                  "type": "string"
                },
                "externalClickUrl": {
                  "type": "string",
                  "nullable": true
                },
                "lmButtonClassifier": {
                  "type": "string",
                  "description": "Limy classification of the interacted button. Null when not classified.",
                  "nullable": true
                },
                "geoipCountryCode": {
                  "type": "string",
                  "nullable": true
                },
                "geoipContinentName": {
                  "type": "string",
                  "nullable": true
                },
                "geoipContinentCode": {
                  "type": "string",
                  "nullable": true
                },
                "geoipTimeZone": {
                  "type": "string",
                  "nullable": true
                },
                "geoipSubdivision1Code": {
                  "type": "string",
                  "nullable": true
                },
                "geoipSubdivision1Name": {
                  "type": "string",
                  "nullable": true
                },
                "utmMedium": {
                  "type": "string",
                  "nullable": true
                },
                "utmTerm": {
                  "type": "string",
                  "nullable": true
                },
                "utmCampaign": {
                  "type": "string",
                  "nullable": true
                },
                "utmContent": {
                  "type": "string",
                  "nullable": true
                },
                "gclid": {
                  "type": "string",
                  "nullable": true
                },
                "gadSource": {
                  "type": "string",
                  "nullable": true
                },
                "gclsrc": {
                  "type": "string",
                  "nullable": true
                },
                "dclid": {
                  "type": "string",
                  "nullable": true
                },
                "gbraid": {
                  "type": "string",
                  "nullable": true
                },
                "wbraid": {
                  "type": "string",
                  "nullable": true
                },
                "fbclid": {
                  "type": "string",
                  "nullable": true
                },
                "msclkid": {
                  "type": "string",
                  "nullable": true
                },
                "twclid": {
                  "type": "string",
                  "nullable": true
                },
                "liFatId": {
                  "type": "string",
                  "nullable": true
                },
                "mcCid": {
                  "type": "string",
                  "nullable": true
                },
                "igshid": {
                  "type": "string",
                  "nullable": true
                },
                "ttclid": {
                  "type": "string",
                  "nullable": true
                },
                "rdtCid": {
                  "type": "string",
                  "nullable": true
                },
                "epik": {
                  "type": "string",
                  "nullable": true
                },
                "qclid": {
                  "type": "string",
                  "nullable": true
                },
                "sccid": {
                  "type": "string",
                  "nullable": true
                },
                "irclid": {
                  "type": "string",
                  "nullable": true
                },
                "kx": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "uuid",
                "sessionId",
                "event",
                "eventType",
                "timestamp",
                "deviceType",
                "browser",
                "os",
                "referrer",
                "sessionEntryUrl",
                "sessionEntryPathname",
                "browserLanguage",
                "city",
                "country",
                "rawUserAgent",
                "utmSource",
                "currentUrl",
                "elementText",
                "lmElementId",
                "lmDisplayName",
                "lmPageCategory",
                "lmProductId",
                "lmAttrValue",
                "aiProvider",
                "elementsChainHref",
                "elementsChainTexts",
                "elementsChain",
                "elementsChainIds",
                "elementsChainElements",
                "distinctId",
                "deviceId",
                "pathname",
                "host",
                "windowId",
                "pageviewId",
                "referringDomain",
                "sessionEntryReferrer",
                "sessionEntryHost",
                "sessionEntryUtmSource",
                "sessionEntryReferringDomain",
                "screenWidth",
                "screenHeight",
                "viewportWidth",
                "viewportHeight",
                "browserVersion",
                "osVersion",
                "timezone",
                "timezoneOffset",
                "browserLanguagePrefix",
                "externalClickUrl",
                "lmButtonClassifier",
                "geoipCountryCode",
                "geoipContinentName",
                "geoipContinentCode",
                "geoipTimeZone",
                "geoipSubdivision1Code",
                "geoipSubdivision1Name",
                "utmMedium",
                "utmTerm",
                "utmCampaign",
                "utmContent",
                "gclid",
                "gadSource",
                "gclsrc",
                "dclid",
                "gbraid",
                "wbraid",
                "fbclid",
                "msclkid",
                "twclid",
                "liFatId",
                "mcCid",
                "igshid",
                "ttclid",
                "rdtCid",
                "epik",
                "qclid",
                "sccid",
                "irclid",
                "kx"
              ],
              "additionalProperties": {}
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "nextCursor": {
                "type": "string",
                "nullable": true
              },
              "hasMore": {
                "type": "boolean"
              }
            },
            "required": [
              "nextCursor",
              "hasMore"
            ]
          }
        },
        "required": [
          "actions",
          "pagination"
        ]
      }
    }
  }
}