Scope

Search by content type. Options include:

  • ALL: Retrieve any match within the Bigdata universe. This is the default scope when nothing is specified.
  • NEWS: Access premium publishers of global news content, including non-English language content translated into English.
  • TRANSCRIPTS: Extract transcripts from analyst calls of global public companies sourced from audio records, offering insights beyond earnings reports by identifying speakers, dates, and narratives for more comprehensive analyst call insights.
  • FILINGS: Obtain filings, corporate disclosures, and other regulatory information from global companies, organizations, and individuals.
  • FILES: Filter by the content uploaded to Bigdata and search within your own universe.

Example:

from bigdata_client import Bigdata
from bigdata_client.query import Entity, Keyword, Watchlist
from bigdata_client.models.search import SortBy, DocumentType

bigdata = Bigdata()

MICROSOFT = "228D42"
APPLE = "D8442A"

query = Entity(MICROSOFT) | Entity(APPLE)
# Search for Entities in News
search = bigdata.search.new(query, scope=DocumentType.NEWS)

# Search for Entities in Transcripts
# search = bigdata.search.new(query, scope=DocumentType.TRANSCRIPTS)

# Search for Entities in Filings
# search = bigdata.search.new(query, scope=DocumentType.FILINGS)

# Search for Entities in Files
# search = bigdata.search.new(query, scope=DocumentType.FILES)

# Search for Entities Everywhere
# search = bigdata.search.new(query, scope=DocumentType.ALL)
# Or more commonly
# search = bigdata.search.new(query)

documents = search.run(2)
print(documents)

See class Scope for further details.

SortBy

The search results can be sorted either by relevance (best matching results first) or by date (most recent results first), where the default if not specified is by relevance. This is controlled by the sortby parameter, where the possible values are either SortBy.RELEVANCE or SortBy.DATE.

Example:

from bigdata_client import Bigdata
from bigdata_client.query import Entity
from bigdata_client.daterange import RollingDateRange
from bigdata_client.models.search import SortBy

MICROSOFT = "228D42"

bigdata = Bigdata()
search = bigdata.search.new(
    query=Entity(MICROSOFT),
    date_range=RollingDateRange.LAST_THIRTY_DAYS,
    sortby=SortBy.DATE,
)

documents = search.run(2)
print(documents)

See class SortBy for further details.

Date Range

Two types of date ranges can be used in the search:

  • Rolling date ranges (RollingDateRange): Predefined relative date ranges include:

    • RollingDateRange.TODAY
    • RollingDateRange.YESTERDAY
    • RollingDateRange.THIS_WEEK
    • RollingDateRange.LAST_WEEK
    • RollingDateRange.LAST_SEVEN_DAYS
    • RollingDateRange.LAST_THIRTY_DAYS
    • RollingDateRange.LAST_NINETY_DAYS
    • RollingDateRange.YEAR_TO_DATE
    • RollingDateRange.LAST_YEAR
    • RollingDateRange.LAST_ONE_HOURS
    • RollingDateRange.LAST_THREE_HOURS
    • RollingDateRange.LAST_SIX_HOURS
    • RollingDateRange.LAST_NINE_HOURS
    • RollingDateRange.LAST_TWELVE_HOURS
    • RollingDateRange.LAST_TWENTY_FOUR_HOURS
    • RollingDateRange.LAST_FORTY_EIGHT_HOURS
    from bigdata_client import Bigdata
    from bigdata_client.daterange import RollingDateRange
    from bigdata_client.query import Entity, Keyword
    
    MICROSOFT = "228D42"
    
    query = Entity(MICROSOFT) | Keyword("tesla")
    
    bigdata = Bigdata()
    search = bigdata.search.new(
        query=query,
        date_range=RollingDateRange.LAST_WEEK
    )
    
    documents = search.run(2)
    print(documents)
    
  • Absolute date ranges (AbsoluteDateRange`): Defined by start and end dates. Dates must follow ISO 8601 Examples:

    from bigdata_client import Bigdata
    from bigdata_client.daterange import AbsoluteDateRange
    from bigdata_client.query import Entity, Keyword
    from datetime import datetime
    import pytz
    
    MICROSOFT = "228D42"
    
    query = Entity(MICROSOFT) | Keyword("tesla")
    # The following are equivalent
    date_range = AbsoluteDateRange(datetime(2024, 1, 1), datetime(2024, 1, 31))
    date_range = AbsoluteDateRange("2024-01-01", "2024-01-31")
    date_range = AbsoluteDateRange("2024-01-01T00:00:00", "2024-01-31T00:00:00")
    # Or you can set a timezone
    end_date =  pytz.timezone("Asia/Tokyo").localize(datetime(2024, 1, 31, 9))
    date_range = AbsoluteDateRange("2024-01-01T01:00:00+01:00", end_date)
    
    bigdata = Bigdata()
    search = bigdata.search.new(
        query=query,
        date_range=daterange
    )
    
    documents = search.run(2)
    print(documents)