Searching in Observable
NotebooksFinding notebooks on Observable can be done using the search option available at the top of every page. With search, you can find your own private notebooks as well as any user’s public notebooks.
You can use the basic search:
- Case-insensitive
- Implied AND
- Wildcards
- Boolean logic
- Specific user or team
- Attributes in the query.
Or, you can go to https://observablehq.com/search to use the expanded search options.
Basic examples
Search queries can be entered on any page and are not scoped in any way. Here are some examples:
Searching for Hello
matches notebooks with hello
, HELLO
, or even HeLlO
, anywhere in the notebook’s cells or title. The match is case-insensitive and words will be matched based on their English stem, so talking
will match talk
, for example. If you enclose the search term in double quotes (e.g. “Hello”), then it will not match different variations.
Searching for talk
matches notebooks with talk
, talking
, talks
, or talked
.
Searching for “talked” (within quotation marks) matches only notebooks with talked
.
Searching for Hello, world
matches notebooks that have both the words hello
and world
in them, but the words don’t have to be in order or next to each other. When multiple words are entered in search, there is an implied AND between them.
Searching for Hello*
matches notebooks that have the words hello
or hellojello
and any other notebook with a word that starts with hello
. A search term with a *
appended to it implies a prefix match. The *
can only appear at the end of the word, not at the beginning or somewhere in the middle. hex*
will match hex
, hexbin
, hexagon
, hexadecimal
.
Phrases
Words inside of quotes (single or double) match notebooks where those words appear consecutively. These are phrase searches.
Searching for “hello world” matches notebooks where “hello” and “world” appear consecutively. As noted above, search terms inside of quotes must match more closely than unquoted ones. Because punctuation is generally ignored, this will also match hello.world
or hello/world
.
Searching for d3.create
will similarly match notebooks where d3
and create
appear consecutively. Hyphens and slashes work similarly, so you could get the same results using “d3 create”, d3-create
, or d3/create
.
Boolean operators
Search terms can be combined using AND
, OR
, and NOT
operators which can be written using all-caps, or as the symbols &
, |
, and -
.
Searching for hello & world
matches notebooks with both the terms hello
and world
. AND
is the default behavior when multiple terms are specified together, so this is the same as just hello world
. This can also be written as hello AND world
.
Searching for hello | world
matches notebooks with either hello
or world
in them. This could also be written as hello OR world
.
Searching for hello -world
matches notebooks containing the word hello
that do not also contain the word world
. This could also be written as hello & -world
.
Boolean operators can be combined and grouped using parentheses. This example matches notebooks that either contain both hello
and world
, or contain both goodnight
and moon
.
Users and teams
Users on Observable have a user name and a display name. The user name looks like “@mbostock” and is part of the URL path to public notebooks. The display name is part of the user’s profile and is typically the user’s full name. Both the user name and display name can be searched for.
Searching for a user name matches notebooks for which the name (@mbostock
above) is either an author or current owner. (The author and owner of a notebook is usually the same, but can be different if the notebook was transferred into or out of a team or collaborated on with multiple users at some point).
Teams also have user names, and can be searched for in the same way. The query above would match all notebooks that are owned by the @observablehq
team.
Searching for “Fozzie Bear” matches notebooks that contain the words “Fozzie Bear” and all of the notebooks created or owned by the user with the display name “Fozzie Bear”. Note that this example uses quotes around the words, which means that they have to appear consecutively in either the body of the notebook or in the user’s display name. Punctuation is ignored, so “Bear Fozzie” would match notebooks that have citations like “Bear, Fozzie”.
Attributes
Attributes are query terms that look like attribute:value
where attribute
is one of a set of defined attributes of a notebook.
Searching for owner:@mbostock
matches notebooks for which @mbostock
is either the creator or current owner. The owner:
part of the query makes this an attribute search.
This query above matches notebooks with the words Enigma
and machine
in the title. Because the words are quoted, they must appear consecutively in the title; this would not match a notebook with the title “Enigma was a machine”, for example.
You can restrict a search to the notebooks in a single collection using the collection
attribute.
In the search query above, the result will include notebooks containing the word “hello” that are also in your collection named “my-favorites”. The collection name can be either the short name that appears in the browser Url when you navigate to the collection, as in this example, or can be the full name displayed on the page, but if there are spaces in the full name, then the name needs to be in quotes.
If you want the search results to include all of the notebooks in a collection, and also include all the notebooks in any nested collections, use the collections
attribute, like this:
If the collection you want to specify belongs to a team, or it is a public collection of a different user, you can specify the owner’s name like this:
Here are the attributes that can be searched for:
Attribute | Description |
---|---|
author:name | Alias for `creator`, matches the user or display name of the notebook’s author |
author:@name | Alias for `creator`, matches the username of the notebook’s author |
collection:my-favorites | Matches notebooks that are in one of the user’s collections |
collection:@name/their-favorites | Matches notebooks that are in one of @name’s collections |
creator:name | Matches notebooks where the initial creator’s user name or display name is `name` |
creator:@name | Matches notebooks where the user name is `@name` |
owner:name | Matches the user or display name of the notebook’s current owner |
owner:@name | Matches only the user name of the notebook’s current owner |
share:private | Matches notebooks that are not public or unlisted and have not been shared |
share:shared | Matches notebooks that are not public or unlisted and have been shared with an individual |
share:team | Matches notebooks that are not public or unlisted and have been shared with a team |
team:name | Matches notebooks that are owned by the team with the specified user or display name |
team:@name | Matches notebooks that are owned by the team with the specified username |
title:word | Matches notebooks with the given `word` in their title |
is:public | Matches notebooks that are public (includes published notebooks) |
is:private | Matches notebooks that are not public or unlisted |
is:team | Matches notebooks that are owned by a team |
is:unlisted | Matches notebooks that are public unlisted (includes published unlisted) |
is:user | Matches notebooks that are owned by a user (not a team) |
Older search attributes that still work, but apply only to notebooks created under the legacy publishing model:
Attribute | Description |
---|---|
is:published | Matches notebooks that are published |
is:linkshared | Matches notebooks that are link-shared |
Expanded search filters
When you get an initial set of search results, there is a link at the bottom of the results that would take you to the main search page, which includes additional search options.
The expanded search filters appear alongside the search results.
You can then narrow your search by creator, by team, and by title.
If you have access to a Pro or Enterprise workspace, you can use even more search filters: