Skip to content

industry

The industry.* commands discover Yahoo Finance industry keys and return overview or table data for one industry. Use this namespace when the user asks for comparable companies, industry ETFs, mutual funds, or industry-level research context.

All examples use --output json so results are stable to parse in terminals, scripts, and automation workflows.

List Yahoo industry keys, optionally filtered by sector.

finance industry.keys lists Yahoo industry keys, optionally filtered by sector. It returns ok, data, error, and warnings in JSON output. The result payload includes industries, count, source.

Use this command when you need a valid Yahoo industry key before calling finance industry.overview or finance industry.table.

Terminal window
finance industry.keys [sector=SECTOR_KEY] [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
sectorNoSECTOR_KEYStringOptional sector key used to filter the returned industry list.
Terminal window
finance industry.keys sector=technology --output json

This output was generated with finance industry.keys sector=technology --output json.

{
"ok": true,
"data": {
"industries": [
{
"key": "solar",
"name": "Solar",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "information-technology-services",
"name": "Information Technology Services",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "computer-hardware",
"name": "Computer Hardware",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "software-infrastructure",
"name": "Software Infrastructure",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "scientific-technical-instruments",
"name": "Scientific Technical Instruments",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "semiconductor-equipment-materials",
"name": "Semiconductor Equipment Materials",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "electronic-components",
"name": "Electronic Components",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "communication-equipment",
"name": "Communication Equipment",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "consumer-electronics",
"name": "Consumer Electronics",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "software-application",
"name": "Software Application",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "electronics-computer-distribution",
"name": "Electronics Computer Distribution",
"sector_key": "technology",
"sector_name": "Technology"
},
{
"key": "semiconductors",
"name": "Semiconductors",
"sector_key": "technology",
"sector_name": "Technology"
}
],
"count": 12,
"source": "yfinance"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.countintegerNumber of records included in the adjacent result array.
data.industriesarrayIndustries returned for a sector.
data.industries[]objectIndustries returned for a sector.
data.sourcestringProvider or source identifier for the returned data.
data.industries[].keystringStable key that can be passed back to this namespace as an argument.
data.industries[].namestringHuman-readable industry name.
data.industries[].sector_keystringSector key that owns this industry.
data.industries[].sector_namestringHuman-readable sector name that owns this industry.

Fetch industry overview metadata.

finance industry.overview fetches industry overview metadata. It returns ok, data, error, and warnings in JSON output. The result payload includes key, name, sector_key, sector_name, symbol, overview, source.

Use this command when you need the industry description, company count, market cap, market weight, or parent sector for a known industry key.

Terminal window
finance industry.overview KEY [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
keyYesNoneStringSector or industry key returned by the corresponding keys command.
Terminal window
finance industry.overview software-infrastructure --output json

This output was generated with finance industry.overview software-infrastructure --output json.

{
"ok": true,
"data": {
"key": "software-infrastructure",
"name": "Software - Infrastructure",
"sector_key": "technology",
"sector_name": "Technology",
"symbol": "^YH31110030",
"overview": {
"companies_count": 214,
"market_cap": 5170753699840,
"message_board_id": "INDEXYH31110030",
"description": "Companies that develop, design, support, and provide system software and services, including operating systems, networking software and devices, web portal services, cloud storage, and related services.",
"industries_count": null,
"market_weight": 0.18857579,
"employee_count": 827850
},
"source": "yfinance"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.keystringStable key that can be passed back to this namespace as an argument.
data.namestringHuman-readable industry name.
data.overviewobjectOverview metadata for a sector or industry.
data.sector_keystringSector key that owns this industry.
data.sector_namestringHuman-readable sector name that owns this industry.
data.sourcestringProvider or source identifier for the returned data.
data.symbolstringYahoo Finance industry index symbol.
data.overview.companies_countintegerNumber of companies represented by the provider object.
data.overview.descriptionstringProvider description for this item.
data.overview.employee_countintegerEmployee count returned in the provider overview.
data.overview.industries_countnullNumber of industries in the sector.
data.overview.market_capintegerMarket capitalization.
data.overview.market_weightnumberSector or industry market-weight value.
data.overview.message_board_idstringYahoo Finance message-board identifier.

Fetch industry top companies or reports.

finance industry.table fetches industry top companies or reports. It returns ok, data, error, and warnings in JSON output. The result payload includes key, name, sector_key, sector_name, table, rows, count, source.

Use this command when you need comparable companies, growth leaders, top performers, or research report rows for a known industry key.

Terminal window
finance industry.table KEY [table=top_companies|top_growth_companies|top_performing_companies|research_reports limit=25] [--output json]
ArgumentRequiredDefaultAccepted valuesDescription
keyYesNoneStringSector or industry key returned by the corresponding keys command.
limitNo25IntegerMaximum number of records returned.
tableNoNonetop_companies, top_growth_companies, top_performing_companies, research_reportsTable key to return for the sector or industry.
Terminal window
finance industry.table software-infrastructure table=top_companies limit=5 --output json

This output was generated with finance industry.table software-infrastructure table=top_companies limit=5 --output json.

{
"ok": true,
"data": {
"key": "software-infrastructure",
"name": "Software - Infrastructure",
"sector_key": "technology",
"sector_name": "Technology",
"table": "top_companies",
"rows": [
{
"symbol": "MSFT",
"name": "Microsoft Corporation",
"rating": "Strong Buy",
"market_weight": 0.5923323
},
{
"symbol": "ORCL",
"name": "Oracle Corporation",
"rating": "Buy",
"market_weight": 0.109565884
},
{
"symbol": "PLTR",
"name": "Palantir Technologies Inc.",
"rating": "Buy",
"market_weight": 0.062436976
},
{
"symbol": "PANW",
"name": "Palo Alto Networks, Inc.",
"rating": "Buy",
"market_weight": 0.037624378
},
{
"symbol": "CRWD",
"name": "CrowdStrike Holdings, Inc.",
"rating": "Buy",
"market_weight": 0.028749423
}
],
"count": 5,
"source": "yfinance"
},
"error": null,
"warnings": []
}
FieldTypeDescription
okbooleanWhether the command completed successfully.
dataobject or nullCommand-specific result payload. It is null when ok is false.
errorstring or nullHuman-readable error message when ok is false; otherwise null.
warningsarrayNon-fatal warnings returned by the command.
data.countintegerNumber of records included in the adjacent result array.
data.keystringStable key that can be passed back to this namespace as an argument.
data.namestringHuman-readable industry name.
data.rowsarrayStructured rows returned by the command.
data.rows[]objectStructured rows returned by the command.
data.sector_keystringSector key that owns this industry.
data.sector_namestringHuman-readable sector name that owns this industry.
data.sourcestringProvider or source identifier for the returned data.
data.tablestringSector or industry table key returned by the command.
data.rows[].market_weightnumberSector or industry market-weight value.
data.rows[].namestringCompany or report name for the row.
data.rows[].ratingstringProvider rating label for the row.
data.rows[].symbolstringTicker or provider symbol for the row.