Structured XBRL segments plus an external denominator

Compare growth against the industry

Which of Walmart's segments grew fastest, and did the company beat its industry?

Two calls that answer different halves of one question. The first reads the segment tables out of the filing's own XBRL, by business segment, product line and geography. The second puts the company's revenue growth next to the Census retail total for its industry, so "grew 4.7%" becomes "grew 2.6 points faster than general merchandise retail".

Recorded Walmart Inc., 10-K filed 2026-03-13, fiscal year to 2026-01-31, on 23 October 2026 against parser version 3. Responses are trimmed to the fields the example is about; elisions are marked.

1. get_segment_revenue

Get the segment breakdown as numbers, not as prose about a table.

Request

{
  "tool": "get_segment_revenue",
  "arguments": {
    "ticker": "WMT",
    "lookback": 1
  }
}

Response

{
  "data": [ {
    "accession": "0000104169-26-000055", "filed_at": "2026-03-13",
    "period": "2026-01-31", "unit_note": "$ in Millions",
    "consolidated": { "revenue": [
      { "concept": "us-gaap:Revenues", "label": "Total revenues",
        "value": 713163000000, "displayed": "713,163" },
      { "concept": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
        "label": "Net sales", "value": 706413000000, "displayed": "$ 706,413" }
    ] },
    "breakdowns": [
      { "axis": "us-gaap:StatementBusinessSegmentsAxis",
        "axis_label": "Statement business segments", "segment_count": 3,
        "segments": [
          { "label": "Walmart U.S.", "revenue_latest": 485599000000,
            "revenue_growth_yoy": 0.044279, "revenue_share_of_total": 0.680909 },
          { "label": "Walmart International", "revenue_latest": 131988000000,
            "revenue_growth_yoy": 0.069916, "revenue_share_of_total": 0.185074 },
          { "label": "Sam's Club U.S.", "revenue_latest": 95540000000,
            "revenue_growth_yoy": 0.032184, "revenue_share_of_total": 0.133967 }
        ] },
      { "axis": "srt:ProductOrServiceAxis", "axis_label": "Product or service" },
      { "axis": "srt:StatementGeographicalAxis", "axis_label": "Geographical" }
    ]
  } ],
  "meta": {
    "metrics": ["revenue", "operating_income", "counts", "assets"],
    "notes": [ "No unit count was tagged. Store and location counts are tagged
                by a minority of filers; where they are absent here they are
                absent from the filing rather than withheld." ]
  }
}

Every figure carries the concept the filer tagged it with, because two filers' store counts are not the same definition and a number without its concept invites an apples-to-oranges comparison. Growth is fractional: 0.069916 is 6.99%.

2. compare_to_sector

Give the growth figure a denominator the filer does not control.

Request

{
  "tool": "compare_to_sector",
  "arguments": {
    "ticker": "WMT",
    "periods": 6
  }
}

Response

{
  "data": [
    { "period_end": "2026-01-31", "form": "10-K", "filed_at": "2026-03-13",
      "company_revenue": 706413000000, "company_growth_yoy": 0.047255,
      "sector_total_millions": 940102, "sector_growth_yoy": 0.02144,
      "excess_growth": 0.025815,
      "sector_periods_used": 12, "sector_periods_expected": 12 },
    { "period_end": "2025-01-31",
      "company_growth_yoy": 0.049641, "sector_growth_yoy": 0.027505,
      "excess_growth": 0.022136 },
    { "period_end": "2024-01-31",
      "company_growth_yoy": 0.060665 }
    // ... 3 more periods
  ],
  "meta": {
    "company": { "cik": "104169", "name": "Walmart Inc.",
                 "sic": "5331", "sic_description": "Retail-Variety Stores" },
    "sector": { "series": "MRTSSM452USS", "naics": "452",
                "title": "Retail Sales: General Merchandise Stores",
                "chosen_by": "sic", "frequency": "monthly",
                "source_url": "https://fred.stlouisfed.org/series/MRTSSM452USS" },
    "units": { "sector_total": "USD millions", "growth": "fraction, not percent" }
  }
}

Walmart grew 4.73% against a general-merchandise sector that grew 2.14%, so 2.58 points of excess growth. sector_periods_used against sector_periods_expected is the honesty check: 12 monthly observations of 12 covered the fiscal year, so the denominator is complete rather than annualized from a partial one.

What to take from this

  • The sector series is chosen from the filer's SIC code, and the choice is reported as chosen_by along with the series id and a link, so you can disagree with it. Pass sector to override it.
  • Growth is a fraction in both tools, as it is everywhere in this API. 0.047255 is 4.73%.
  • This is the one filings tool that reads something other than EDGAR. The series is Census retail trade, read through the FRED mirror of the same series when no Census key is configured, and meta says which path answered.

Next: Read a section you can quote. Or run these tools against a filer of your own in the filing explorer, or read the full argument reference under the filings API.