POST
/
api
/
in
/
v0
/
documents
/
embeddings-search
curl --request POST \
  --url https://stockinsights-ai-main-49970eb.d2.zuplo.dev/api/in/v0/documents/embeddings-search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "top_k": 10,
  "filters": {
    "types": [
      "earnings-transcript"
    ],
    "tickers": [
      "NSE:OLECTRA"
    ],
    "sectors": [
      "<string>"
    ],
    "industries": [
      "<string>"
    ],
    "years": [
      "<string>"
    ],
    "quarters": [
      "Q1"
    ]
  }
}'
{
  "status": "<string>",
  "data": [
    {
      "text": "<string>",
      "metadata": {
        "chunk_num": "<string>"
      },
      "document": {
        "type": "<string>",
        "published_date": "2023-11-07T05:31:56Z",
        "year": "<string>",
        "quarter": "Q1",
        "link": "<string>"
      },
      "company": {
        "id": "<string>",
        "company_name": "<string>",
        "ticker": "<string>",
        "exchange_tickers": [
          {
            "exchange": "BSE",
            "ticker": "<string>",
            "id": "<string>",
            "url": "<string>"
          }
        ]
      },
      "similarity_score": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
required

The user query in natural language for which similar chunks of filings text is retrieved using OpenAI embeddings.

top_k
integer
default:10

Number of top matching chunks to return in the response. This parameter is optional and defaults to 20 if not specified. Maximum value is 50.

Required range: x <= 100
filters
object

Filters to narrow the search scope. For example, the search can be limited to few companies only. Without filters, search will be performed across all the filings.

Response

200
application/json
Successful response. Contains the list of chunks for given query vector
status
string

Status code

data
object[]