Search
search_by_companies
Screen for documents based on a list of companies, sentences, and other filters. Parameterscompanies(List[Company]): The list of companies to use.sentences(List[str]): The list of sentences to screen for.start_date(str): The start date for the search.end_date(str): The end date for the search.scope(DocumentType): The document type scope (e.g.,DocumentType.ALL,DocumentType.TRANSCRIPTS). Defaults toDocumentType.ALL.fiscal_year(Optional[int]): The fiscal year to filter queries. If None, no fiscal year filter is applied.sources(Optional[List[str]]): List of sources to filter on. If none, searches across all sources.keywords(List[str]): A list of keywords for constructing keyword queries.control_entities(Dict): A dictionary of control entities of different types for creating co-mentions queries.freq(str): The frequency of the date ranges. Defaults to ‘M’.sort_by(SortBy): The sorting criterion for the search results. Defaults toSortBy.RELEVANCE.rerank_threshold(Optional[float]): The threshold for reranking the search results.document_limit(int): The maximum number of documents to return per Bigdata query.batch_size(int): The number of entities to include in each batched query.**kwargs: Additional keyword arguments.
DataFrame: The DataFrame with the screening results.
Columns include:
timestamp_utc,document_id,sentence_id,headline,entity_id,document_type,is_reporting_entity,entity_name,entity_sector,entity_industry,entity_country,entity_ticker,text,other_entities,entities,masked_text,other_entities_map.
search_narratives
Screen for documents based on input sentences and other filters. Parameterssentences(List[str]): The list of theme sentences to screen for.start_date(str): The start date for the search.end_date(str): The end date for the search.scope(DocumentType): The document type scope (e.g.,DocumentType.NEWS,DocumentType.TRANSCRIPTS).fiscal_year(Optional[int]): The fiscal year to filter queries. If None, no fiscal year filter is applied.sources(Optional[List[str]]): List of sources to filter on. If none, searches across all sources.keywords(Optional[List[str]]): A list of keywords for constructing keyword queries.control_entities(Optional[List[str]]): A list of control entity IDs for creating co-mentions queries.freq(str): The frequency of the date ranges. Defaults to ‘M’.sort_by(SortBy): The sorting criterion for the search results. Defaults toSortBy.RELEVANCE.rerank_threshold(Optional[float]): The threshold for reranking the search results.document_limit(int): The maximum number of documents to return per Bigdata query.batch_size(int): The number of entities to include in each batched query.**kwargs: Additional keyword arguments.
DataFrame: The DataFrame with the screening results.
Columns include:timestamp_utc,document_id,sentence_id,headline,text.
run_search
Execute multiple searches concurrently using the Bigdata client, with rate limiting. Parametersqueries(list[QueryComponent]): A list of QueryComponent objects.date_ranges(Optional[Union[AbsoluteDateRange, RollingDateRange, List[Union[AbsoluteDateRange, RollingDateRange]]]]): Date range filter for the search results.sortby(SortBy): The sorting criterion for the search results. Defaults toSortBy.RELEVANCE.scope(DocumentType): The scope of the documents to include. Defaults toDocumentType.ALL.limit(int): The maximum number of documents to return per query. Defaults to 10.only_results(bool): If True, return only the search results. If False, return the queries along with the results. Defaults to True.rerank_threshold(Optional[float]): The threshold for reranking the search results.**kwargs: Additional keyword arguments to pass to the underlying search manager.
list[list[Document]]ifonly_resultsis True: List of search results.dict[tuple[QueryComponent, Union[AbsoluteDateRange, RollingDateRange]], list[Document]]ifonly_resultsis False: Mapping of query/date range to results.
build_batched_query
Build a list of batched query objects for advanced search, supporting similarity, keyword, entity, control entity, source, and fiscal year filters. Parameterssentences(List[str]): Sentences for creating similarity queries.keywords(Optional[List[str]]): Keywords for constructing keyword queries.entities(Optional[EntitiesToSearch]): Entities to include in the query (companies, people, orgs, etc).control_entities(Optional[EntitiesToSearch]): Control entities for co-mentions or control queries.sources(Optional[List[str]]): List of sources for constructing source queries.batch_size(int): Number of entities per batch when auto-batching.fiscal_year(Optional[int]): Fiscal year to filter queries.scope(DocumentType): Document type scope (e.g., ALL, TRANSCRIPTS).custom_batches(Optional[List[EntitiesToSearch]]): Custom entity batches for advanced batching.
List[QueryComponent]: List of expanded query components.
EntitiesToSearch
A dataclass for specifying which entities to include in a search. Fieldspeople(Optional[List[str]])product(Optional[List[str]])org(Optional[List[str]])place(Optional[List[str]])topic(Optional[List[str]])concepts(Optional[List[str]])companies(Optional[List[str]])

