Obtain revenue by product segmentation (e.g. iPad, Advertisement, Windows).

Note that this information requires a Premium FMP subscription.

Also known as: revenue by product, product segment revenue.

Revenue Product Segmentation in Python

get_revenue_product_segmentation is part of the Toolkit module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_revenue_product_segmentation as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2021-05-01", quarterly=False
)

product_segmentation = toolkit.get_revenue_product_segmentation()

product_segmentation.loc['MSFT']

Which returns:

  2022Q2 2022Q3 2022Q4 2023Q1 2023Q2
Devices 1.581e+09 1.448e+09 1.43e+09 1.282e+09 1.361e+09
Enterprise Services 1.902e+09 1.876e+09 1.862e+09 2.007e+09 1.977e+09
Gaming 3.455e+09 3.61e+09 4.758e+09 3.607e+09 3.491e+09
Linked In Corporation 3.712e+09 3.663e+09 3.876e+09 3.697e+09 3.909e+09
Office Products And Cloud Services 1.1639e+10 1.1548e+10 1.1837e+10 1.2438e+10 1.2905e+10
Other Products And Services 1.403e+09 1.348e+09 1.359e+09 1.428e+09 -3.924e+09
Search And News Advertising 2.926e+09 2.928e+09 3.223e+09 3.045e+09 3.012e+09
Server Products And Cloud Services 1.8839e+10 1.8388e+10 1.9594e+10 2.0025e+10 2.1963e+10
Windows 6.408e+09 5.313e+09 4.808e+09 5.328e+09 6.058e+09

Parameters

get_revenue_product_segmentation accepts the following parameters:

  • overwrite (bool): Defines whether to overwrite the existing data.
  • show_columns (list[str] | None): A list of column names to keep in the result. Invalid names are reported and ignored. Defaults to None, which keeps every column.
Share