Daniel Saks
Chief Executive Officer
Claude Code for market research means producing a market number you can defend: you write the market definition first, Claude Code runs the count against a B2B company database, breaks it down by state, country and size band, and saves the exact filters next to every figure. The output is a chart-ready table plus a methodology note, not a number pasted from a search result.
That matters because market numbers on the web rarely agree. One source counts every registered entity, another counts firms with employees, a third counts companies tagged with a keyword. The U.S. Census Bureau's nonemployer business story (July 2025) reports that employer businesses made up only 21.6% of all U.S. businesses in 2023, so whether a count includes businesses with no staff can change it several times over.
This guide covers seven steps, a worked example from two real counts pulled on November 3, 2026, metrics, honest limits and mistakes. It is for market researchers, analysts, strategy and product marketing teams, and journalists who need B2B market numbers they can source.
Quick answer: To use Claude Code for market research, write the market definition (industry, keywords, size band, geography) in a file, have Claude Code run a company count with those filters against a connected company database, break the count down by state and size band, map competitors with a lookalike search, export a CSV, and publish the filters and pull date with the number.
Most disagreements come from four definitional choices. Write each one down before counting and you can explain any gap with another source.
Government data uses NAICS codes; company databases often use a LinkedIn-style taxonomy. In LinkedIn's industry codes V2, "Computer and Network Security" (ID 118) sits under Professional Services, then IT Services and IT Consulting. A security software vendor tagged "Software Development" falls outside that code.
A firm, an establishment (each location), and a legal entity are different units. A company with five offices is one firm and five establishments, and a holding structure can add several legal entities on top. Pick one unit and name it in every table header.
Including businesses with no employees inflates totals. Census Nonemployer Statistics notes that the majority of U.S. business establishments have no paid employees, which is why the Census publishes them as a separate series. State whether your count starts at 1, 11 or 51 employees.
Headquarters, registered office and employee location give three different geographic splits for the same companies. A state ranking built on registered addresses looks nothing like one built on headquarters, so name the field next to the map.
Ask Claude Code to draft the definition file from your research question, then edit it by hand. It needs a value for each of these:
Decision rule: if any line says "tech", "mid-market" or "around", replace it with a label or a number before counting. Cost: none.
Have Claude Code run a count-only search that names every filter, such as U.S.-headquartered Computer and Network Security companies with 51-200 employees. The reply lists the filters it applied and the count. Claude Code should record the filters, the count, the date and the session id in the methods log on the same line as the number, so the filter set never gets separated from the figure. If the reply says a label did not match exactly, fix the definition and count again. Cost: none; a standard count search does not use credits.
Count the same definition with one dimension changed at a time, for example split by HQ state across California, Virginia, Texas, New York and Maryland. For size bands, run one count per band (1-10, 11-50, 51-200, 201-500, 501-1,000, 1,001+) rather than asking for a "top N" ranking, which the standard search does not aggregate across the full database. Check that the parts add up to no more than the total. Cost: none.
Start from one or more known companies in the market, such as your own company and a rival, and ask Claude Code for companies like them. Claude Code then groups the result by size band and HQ state and writes a short note per cluster. Review the top 25 by hand and remove resellers, agencies and subsidiaries before counting the map. Cost: none for the search. Scoring each row against yes/no questions (qualifying) uses credits, so check the estimate before running it.
The cheapest trend is a repeat count: repeat Steps 2 and 3 on the first of each month with the unchanged definition and add the result to the methods log. Headcount growth rates and job-posting counts need a custom query over the full database, which runs in research mode. For example, ask which companies in the market grew headcount more than 20% in the last 12 months.
The first turn drafts the query and quotes an estimated credit cost, and is free. Confirming the run uses credits. Save the drafted query in the methods log whether or not you run it. Details are in the advanced dataset creator guide.
Ask Claude Code for the company list instead of the count and save it as a CSV, then have it total the companies by HQ state in the dataset you own. Downloads are capped at roughly 1,000 rows per query, so split larger markets by size band. Claude Code can then write a Python script that turns the CSV into a bar chart. Enriching rows with extra fields uses credits.
Every published number needs a methods line: data source, pull date, filters, unit (company records), what was excluded, and known limits. Ask Claude Code to generate it from the methods log and place it under the chart. Set an owner and a rerun date (monthly for trend pieces, before every republish for evergreen pages). Rerun when the definition changes or a reader questions the number.
These are real counts from two default searches run on November 3, 2026, with no credits spent. Definition: industry = Computer and Network Security, HQ country = United States, size band = 51-200 employees, counted at company level.
The same definition gives three numbers depending on whether a company must have a website and appear in the exported list. That is the conflict this guide is about, inside one database. Publish the one that matches your unit and state which it is.
By HQ state (list count, then full records): California 167 and 249, New York 90 and 126, Virginia 58 and 79, Texas 56 and 99, Maryland 36 and 53. The five states hold 407 of 783 listed companies and 606 of 1,189 full records, about half the market in both cases, per the counts above. Those five rows, each with the definition and pull date, make up the chart-ready table.
If the next step is a sales plan rather than a published figure, turn this count into TAM, SAM and SOM with the TAM vs SAM vs SOM guide.
Review these each time the count is rerun.
Analysts often start with a broad search and tune filters until the number looks right. The result cannot be reproduced. Fix: freeze the definition file before the first count and log every change.
A figure copied into a slide loses its definition within a week, and nobody can rerun it. Fix: keep filters, date and session id on the same line as the number in the methods log and in the chart caption.
Comparing a company count with a Census establishment count makes the market look larger or smaller than it is. Fix: name the unit in every table header.
A competitor map shows who resembles a seed company, not every company in the category. Fix: size the market with Step 2 and use the map only for positioning.
Landbase gives Claude Code a counted market instead of web guesses: 40M+ companies and 800M+ contacts from 20+ providers, with 1,500+ fields per record. From Claude Code, count, breakdown and lookalike searches run in plain language in the same session. For prospect lists built on the same definition, see Claude Code for sales prospecting; for turning counts into content and ads, see Claude Code for marketing workflows. The free trial includes 1,000 free credits for the research-mode, enrichment and qualification steps.
Yes, when it is connected to a company database. Claude Code runs the count with your filters, breaks it down, exports the table and writes the methodology. Without a data source it only searches the web, which returns examples and other people's estimates rather than a count you defined. Market sizing with Claude works best when the definition file is written first.
B2B market research with AI is as reliable as its data source and definition. The model is good at running repeatable queries, catching mismatched labels and writing methods notes. It is not a source of numbers itself. Check reproducibility, known-company recall and additivity before publishing any figure.
They usually define the market differently: a different industry taxonomy, a different unit (firm, establishment or legal entity), a different size floor, or a different location field. Revenue-based reports add another layer of assumptions. Compare definitions before comparing numbers.
Name the data source, the pull date, the filters and the unit in the sentence or caption, for example: "783 U.S.-headquartered companies in the Computer and Network Security industry with 51-200 employees, Landbase data pulled November 3, 2026." Link to a methods note that lists exclusions and limits.
Standard searches (counts, breakdowns and lookalikes) and the first research-mode turn (the query draft and quote) do not use credits. Running the research-mode query uses credits, as do enriching and qualifying. Always read the quoted estimate before confirming.
Tool and strategies modern teams need to help their companies grow.