Skip to main content

Search Chunks

Search for chunks based on a query.

Request body:

  • query: The search query (required)
  • tickers: Optional list of ticker symbols to filter documents by. If unsure about available tickers, you can use the /companies endpoint to retrieve a list of all available companies and their tickers, or just filter by a single ticker to see if it's available.
  • sourceType: Optional source type(s) to include (available options: '10-K', '10-Q', '8-K', '20-F', '40-F', '6-K', 'transcript', 'DEF 14A', etc.). Can be a single string or a list of strings.
  • startDate: Optional start date for document filtering (format: YYYY-MM-DD)
  • endDate: Optional end date for document filtering (format: YYYY-MM-DD)
  • sourceLink: Optional source link(s) to search within. Can be a single string or a list of strings. No other documents will be queried by the agent but these. Use to restrict the search to user-selected documents.

Returns chunks that are most relevant to the query.

Note: This endpoint returns the same chunks that are used internally by the /agent-query endpoint. Each chunk contains metadata including id and sourceLink which should be preserved and returned when implementing custom answer generation based on these chunks. These fields are essential for proper source linking in the frontend using the Captide.js library (https://github.com/captide-tech/captidejs#readme), which allows users to view and highlight the original document sources.

Note: All JSON fields use camelCase naming convention.

Request Body REQUIRED
query Query REQUIRED

The query to ask the agent

tickers Tickers

List of ticker symbols to filter documents by (e.g., ['AAPL', 'MSFT']). Check the '/companies' endpoint for available tickers.

sourceType Sourcetype

Source type(s) to include. Available options: 10-K, 10-Q, 8-K, 20-F, 40-F, 6-K, transcript, DEF 14A, DEFM14A, DEF 14C, DEFM14C. Can be a single string or a list of strings.

start_date Start Date

Start date for document filtering (format: YYYY-MM-DD)

end_date End Date

End date for document filtering (format: YYYY-MM-DD)

sourceLink Sourcelink

Source link(s) to search within. No other documents will be queried by the agent but these. Can be a single string or a list of strings. Use to restrict the search to user-selected documents.

Responses
200

Successful Response

Schema OPTIONAL
source_chunks object[]
text Text
text_with_ids Text With Ids
metadata object
422

Validation Error

Schema OPTIONAL
detail object[] OPTIONAL
loc undefined[]
msg Message
type Error Type