{
  "openapi": "3.1.0",
  "info": {
    "title": "Marked",
    "description": "Structured financial data for Indian capital markets. Authenticate with an X-API-Key header. Keys are issued per workspace; see https://marked.run/agents.md",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/companies": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Canonical companies",
        "operationId": "get_companies_v1_companies_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "description": "name contains",
              "title": "Q"
            },
            "description": "name contains"
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sector"
            }
          },
          {
            "name": "listing_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 30
                },
                {
                  "type": "null"
                }
              ],
              "title": "Listing Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Companies V1 Companies Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/instruments": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Tradable securities under those companies",
        "operationId": "get_instruments_v1_instruments_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 64
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ticker"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 8
                },
                {
                  "type": "null"
                }
              ],
              "title": "Exchange"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 16
                },
                {
                  "type": "null"
                }
              ],
              "title": "Segment"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 16
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "isin",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 12
                },
                {
                  "type": "null"
                }
              ],
              "title": "Isin"
            }
          },
          {
            "name": "company",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Company"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Instruments V1 Instruments Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/prices": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Price history, or the latest quote",
        "operationId": "get_prices_v1_prices_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "title": "Ticker"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 8,
              "default": "NSE",
              "title": "Exchange"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "['1m', '5m', '15m', '30m', '1h', '1d']",
              "default": "1d",
              "title": "Interval"
            },
            "description": "['1m', '5m', '15m', '30m', '1h', '1d']"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "latest",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "the current quote instead of a series",
              "default": false,
              "title": "Latest"
            },
            "description": "the current quote instead of a series"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 5000,
              "minimum": 1,
              "default": 500,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Prices V1 Prices Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/financials": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Facts as of a point in time",
        "operationId": "get_financials_v1_financials_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "title": "Ticker"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "['quarterly', 'annual', 'any']",
              "default": "any",
              "title": "Period"
            },
            "description": "['quarterly', 'annual', 'any']"
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "consolidated | standalone",
              "title": "Basis"
            },
            "description": "consolidated | standalone"
          },
          {
            "name": "concept",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "comma-separated concept ids",
              "title": "Concept"
            },
            "description": "comma-separated concept ids"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "what was knowable then",
              "title": "As Of"
            },
            "description": "what was knowable then"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2000,
              "minimum": 1,
              "default": 500,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Financials V1 Financials Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/financial-metrics": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Ratios derived from those facts",
        "operationId": "get_financial_metrics_v1_financial_metrics_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "title": "Ticker"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "['quarterly', 'annual', 'any']",
              "default": "any",
              "title": "Period"
            },
            "description": "['quarterly', 'annual', 'any']"
          },
          {
            "name": "basis",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "consolidated | standalone",
              "title": "Basis"
            },
            "description": "consolidated | standalone"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "As Of"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Financial Metrics V1 Financial Metrics Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/shareholding": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Ownership snapshots, newest first",
        "operationId": "get_shareholding_v1_shareholding_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "title": "Ticker"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Period End"
            }
          },
          {
            "name": "holders",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "include the holder-level breakdown",
              "default": false,
              "title": "Holders"
            },
            "description": "include the holder-level breakdown"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Shareholding V1 Shareholding Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/filings": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Source documents behind the facts",
        "operationId": "get_filings_v1_filings_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ticker"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 60
                },
                {
                  "type": "null"
                }
              ],
              "description": "document_type",
              "title": "Type"
            },
            "description": "document_type"
          },
          {
            "name": "fiscal_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 2200,
                  "minimum": 1900
                },
                {
                  "type": "null"
                }
              ],
              "title": "Fiscal Year"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Filings V1 Filings Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Everything a company disclosed, one stream",
        "operationId": "get_events_v1_events_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ticker"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 60
                },
                {
                  "type": "null"
                }
              ],
              "description": "event_type",
              "title": "Type"
            },
            "description": "event_type"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "list the available event types instead",
              "default": false,
              "title": "Types"
            },
            "description": "list the available event types instead"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Events V1 Events Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/corporate-actions": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "Dividends, splits, bonuses, buybacks",
        "operationId": "get_corporate_actions_v1_corporate_actions_get",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ticker"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "dividend | stock_split | bonus_issue | rights_issue | buyback",
              "title": "Type"
            },
            "description": "dividend | stock_split | bonus_issue | rights_issue | buyback"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ex-date from",
              "title": "Start"
            },
            "description": "ex-date from"
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ex-date to",
              "title": "End"
            },
            "description": "ex-date to"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Corporate Actions V1 Corporate Actions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search": {
      "post": {
        "tags": [
          "marked v1"
        ],
        "summary": "Resolve a name, ticker or phrase to entities",
        "operationId": "post_search_v1_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Post Search V1 Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query": {
      "post": {
        "tags": [
          "marked v1"
        ],
        "summary": "Ask in natural language; answered from facts",
        "description": "Structured-first. No model-authored SQL and no model-invented values.",
        "operationId": "post_query_v1_query_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetrievalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Post Query V1 Query Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ask": {
      "post": {
        "tags": [
          "marked v1"
        ],
        "summary": "Ask, and watch the work as it happens",
        "description": "The same retrieval as /v1/query, streamed with its execution log.\n\nServer-sent events: a `step` for each stage, then one `answer`. The\nprose is written from the evidence packet only - the model never picks\nwhat to fetch and never sees the database.",
        "operationId": "post_ask_v1_ask_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/": {
      "get": {
        "tags": [
          "marked v1"
        ],
        "summary": "What this API is and what is behind it",
        "operationId": "index_v1__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Index V1  Get"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AskBody": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query"
          },
          "session": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Session"
          },
          "limit": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 10
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query",
          "session"
        ],
        "title": "AskBody"
      },
      "FactFilter": {
        "properties": {
          "operator": {
            "type": "string",
            "enum": [
              ">",
              ">=",
              "<",
              "<=",
              "="
            ],
            "title": "Operator"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Value"
          },
          "unit": {
            "type": "string",
            "maxLength": 30,
            "minLength": 1,
            "title": "Unit"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "operator",
          "value",
          "unit"
        ],
        "title": "FactFilter"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "NewKey": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Name"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "NewKey"
      },
      "RetrievalPlan": {
        "properties": {
          "route": {
            "type": "string",
            "enum": [
              "exact",
              "filter",
              "semantic",
              "hybrid",
              "hybrid_screen",
              "quote"
            ],
            "title": "Route"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          },
          "concepts": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Concepts"
          },
          "fiscal_year": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 2200.0,
                "minimum": 1900.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Year"
          },
          "fiscal_quarter": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 4.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Fiscal Quarter"
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "instant",
              "any"
            ],
            "title": "Period",
            "default": "annual"
          },
          "basis": {
            "type": "string",
            "enum": [
              "consolidated",
              "standalone"
            ],
            "title": "Basis",
            "default": "consolidated"
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "As Of"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FactFilter"
              },
              {
                "type": "null"
              }
            ]
          },
          "search_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Text"
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/ScreenPredicate"
            },
            "type": "array",
            "maxItems": 8,
            "title": "Filters"
          },
          "sort": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Sort"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "route"
        ],
        "title": "RetrievalPlan"
      },
      "RetrievalRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetrievalPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 10
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "RetrievalRequest"
      },
      "ScreenPredicate": {
        "properties": {
          "metric": {
            "type": "string",
            "maxLength": 60,
            "minLength": 1,
            "title": "Metric"
          },
          "operator": {
            "type": "string",
            "enum": [
              ">",
              ">=",
              "<",
              "<=",
              "=",
              "!="
            ],
            "title": "Operator"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Value"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "metric",
          "operator",
          "value"
        ],
        "title": "ScreenPredicate",
        "description": "One structured constraint, evaluated in Postgres and never by a model."
      },
      "SearchBody": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Query"
          },
          "kinds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 6
              },
              {
                "type": "null"
              }
            ],
            "title": "Kinds"
          },
          "ticker": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Ticker"
          },
          "limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 20
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "SearchBody"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.marked.run",
      "description": "Marked API"
    }
  ]
}
