Skip to main content
v2026.11,858 entries · CC-BY 4.0

Stata search Command: Syntax, Options and Finding Packages

How Stata’s search command works: syntax, the all/local/net options, search vs findit, and how to go from a hit to net install.

Written and maintained by CASRAI Editorial Board

Last updated

Stata’s search command looks up a topic across Stata’s local keyword database (system help, manuals, FAQs, the Stata Journal) and the internet materials reachable through net, then lets you click through to a source or install an addition. This page is for analysts who know a method name but not the command, or who need a community-contributed package, and want to run the search and act on the results.

All syntax below is from the Stata help file for search (StataNow 19 help, read 2026-11-07) and the related net, findit and searchadvice help pages.

What is Stata search and what is it used for in research?

Stata’s help file describes search as a command that “searches a keyword database and the internet for Stata materials related to your query.” In research work it answers two recurring questions: which official command performs a given procedure, and whether a community-contributed addition exists for it. The help file calls search, all “the best way to search for information on a topic across all sources, including the system help, the FAQs at the Stata website, the Stata Journal, and all Stata-related internet sources including community-contributed additions.”

It also knows Stata’s return codes. If a command stops with r(131);, typing search rc 131 returns a longer explanation than the original command printed.

How to open and run search

Stata’s help file gives two entry points: type the command, or use the menu Help > Search…. The general syntax is:

search word [word ...] [, search_options]

Examples taken from the help file:

. search linear regression
. search normal distribution
. search kolmogorov-smirnov equality of distribution test

Capitalization and special characters such as commas and hyphens do not matter.

Step by step: find a command or package with search

  1. Type a short query in English. For example search regression. Stata’s search advice says to use few words, because every added word further restricts the search, and to use nouns rather than “-ing” words (search for median test, not testing medians).
  2. Read the Viewer window. With the default all option the results appear in the Viewer, covering both the keyword database and net materials.
  3. Choose a hit. Entries link to manual sections, FAQs, Stata Journal articles or net packages.
  4. Inspect a package before installing it. Use net describe pkgname, which lists the package-description page (add from(directory_or_url) if the package is not at the current net location).
  5. Install it. net install pkgname installs the ado-files and help files; its options are all, replace, force and from(directory_or_url).
  6. Fetch ancillary files if the package offers them. net get pkgname copies them to the current directory.

By default net installs into the PLUS directory; net set ado dirname changes the install location and net query reports the current settings. To list or remove what you installed, the net help documents ado dir, ado describe, ado update and ado uninstall pkgid.

Search options

Option What it does (per the help file)
all Searches the local keyword database and the net materials. This is the default unless changed with set searchdefault. Results go to the Viewer.
local Searches only Stata’s keyword database. Results go to the Viewer.
net Searches materials available through net. search word, net is equivalent to net search word.
author Searches by author name instead of keywords (local database only; Results window).
entry Searches by entry ID, for example search [R], entry (local database only).
exact Prevents matching on abbreviations; searches both local and net sources; Results window.
faq Limits the search to FAQs posted on the Stata and other select websites.
historical Adds entries of historical interest only, which are hidden by default. The help file classifies an entry as historical if it discusses a feature that later became an official part of Stata.
or Lists an entry if any of the words is associated with it. The default is to require all the words.
manual Limits the search to the Stata Documentation (User’s Guide and reference manuals).
sj Limits the search to Stata Journal entries.

To change the default scope, use set searchdefault {all|local|net}; adding permanently makes the setting persist the next time you start Stata.

search, findit and net search compared

Command Relationship to search
search word Default behavior is all: local keyword database plus net materials.
findit word The help file states that findit is equivalent to search word [word ...], all. The findit help notes that findit has been redundant since Stata 13, because search now behaves this way by default, and that its help file is no longer updated.
net search word Same as search word, net: only the net materials.

So on a current installation, search is the command to learn; findit still appears in older tutorials and runs the same search.

How to read the output

Per the help file, all, local and net searches display in the Viewer window, where entries are clickable. Searches using author, entry, exact, faq, historical, or, manual or sj display in the Results window instead. From a Viewer result you can go to the source or install an addition.

Troubleshooting

  • Too many or no results. The search advice says each extra word narrows the list and that Stata tolerates abbreviation better than misspelling. Use the singular (normal distribution, not normal distributions), American spellings, and plain English rather than computer jargon.
  • Expected a package but only manual entries came back. Make sure the scope includes net materials: run search word, net, or check whether set searchdefault local was set earlier.
  • Older feature missing. Add historical; entries about features that later became official Stata are hidden by default.
  • Installed package misbehaves or is out of date. Use ado describe, ado update or ado uninstall pkgid as documented in the net help.
  • Error code you do not recognise. Run search rc followed by the number.

Frequently asked questions

What is Stata search?

It is the built-in command that searches Stata’s keyword database and net materials for documentation, FAQs, Stata Journal articles and installable community-contributed additions. It is also available as Help > Search….

Is findit the same as search?

Yes. Stata’s help states that findit is equivalent to search word [word ...], all, and that findit has been redundant since Stata 13.

How do I install a package I found with search?

Follow the link in the Viewer, or use net describe pkgname to read the package page and net install pkgname to install it.

How do I search only the manuals or only the Stata Journal?

Add manual or sj as an option, for example search regression, manual.

Related CASRAI pages

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Stata search Command: Syntax, Options and Finding Packages

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →