Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Search cheat sheet

A search query is an expression made up of a number of selectors. When searching, selectors are matched against each API entity, producing a list of results.

Search results will be filtered by the current visibility settings.

Details of the syntax are currently subject to change.

Crossed out selectors are not yet implemented.

Name selectors

The name selectors are the most simple, comparing against the names of entities.

foo
~foo~

Selects entities whose name matches foo. Selection is case-insensitive, and based on a fuzzy matching algorithm.

'foo'

Selects entities whose name contains the case-sensitive sub-string foo.

"foo"

Selects entities whose name is exactly equal to foo.

/foo/

Selects entities whose name matches the regular expression /foo/.

*

Selects anything.

The name selectors are implemented as string components that match against entity names.

Compound selector

The compound selector divides entity kinds into two categories. Primary entities include classes, enums, and types. Secondary entities include properties, functions, events, callbacks, and enum items.

foo.bar

Selects only secondary entities whose primary name matches foo and secondary name matches bar.

foo.

Selects only primary entities whose name matches foo.

.bar

Selects only secondary entities whose name matches bar.

Each component is a string component. That is, an expression like "foo"./bar/ is valid.

Expressions

Multiple selectors can be combined to form complete logical expressions, with AND, OR, and NOT operators.

foo bar
foo && bar

Selects entities matching selector foo and bar. That is, whitespace (and only whitespace) between two selectors is interpreted as an AND operator. For clarity, the && operator can be used instead.

foo, bar
foo || bar

Selects entities matching selector foo or bar. Either , or || can be used to indicate an OR operator.

!foo

Selects entities that do not match selector foo.

(foo, bar) (!fizz, buzz)

Parentheses can be used to logically group selectors together.

Precedence

Logical operators have the following precedence:

  1. NOT
  2. AND
  3. OR

Field selectors

Field selectors match against particular fields of an entity. They have the form field:value. The field part is case-insensitive. The value part depends on the field, but will usually be a string, number, or bool component.

Kind

The is: selector can be used to narrow down a search to certain entity kinds. Kinds are case-insensitive.

is:class

Selects only class entities.

is:property

Selects only property entities.

is:function

Selects only function entities.

is:event

Selects only event entities.

is:callback

Selects only callback entities.

is:enum

Selects only enum entities.

is:enumitem

Selects only enum item entities.

is:type

Selects only data types.

is:primary

Selects only class, enum, and type entities.

is:secondary

Selects only property, function, event, callback, and enum item entities.

is:member

Selects only property, function, event, and callback entities.

Fields

tag:foo

Selects entities that have tag foo. The tag is case-insensitive, but must otherwise match exactly.

removed:yes

Selects entities that are not present in the current revision of the API (bool).

superclasses:N

Selects class entities where the number of superclasses matches N (number).

subclasses:N

Selects class entities where the number of subclasses matches N (number).

members:N

Selects class entities where the number of members matches N (number).

superclass:foo

Selects class entities with a superclass whose name matches foo (string).

subclass:foo

Selects class entities with a subclass whose name matches foo (string).

memcat:foo

Selects class entities where the memory category matches foo (string).

threadsafety:foo

Selects member entities where the thread safety matches foo (string).

security:foo

Selects function, event, and callback entities where the security matches foo, or property entities where the read or write security matches foo (string).

cansave:yes

Selects property entities that can be serialized (bool).

canload:yes

Matches property entities that can be deserialized (bool).

readsecurity:foo

Selects property entities where the read security matches foo (string).

writesecurity:foo

Selects property entities where the write security matches foo (string).

valuetypecat:foo

Selects property entities where the category of the value type matches foo (string).

valuetypename:foo

Selects property entities where the name of the value type matches foo (string).

category:foo

Selects property entities where the category matches foo (string).

default:foo

Selects property entities where the default value matches foo (number or string).

returns:N

Selects function and callback entities where the number of return values matches N (number).

parameters:N

Selects function, event, and callback entities where the number of parameters matches N (number).

returntypecat:foo

Selects function and callback entities where the category of a return type matches foo (string).

returntypename:foo

Selects function and callback entities where the name of a return type matches foo (string).

returntypeopt:yes

Selects function and callback entities where a return type is optional (bool).

paramtypecat:foo

Selects function, event, and callback entities where the category of a parameter type matches foo (string).

paramtypename:foo

Selects function, event, and callback entities where the name of a parameter type matches foo (string).

paramtypeopt:yes

Selects function, event, and callback entities where a parameter is optional. (bool).

paramname:foo

Selects function, event, and callback entities where the name of a parameter matches foo (string).

paramdefault:foo

Selects property entities where the default value of a parameter matches foo (number or string).

enumitems:N

Selects enum entities where the number of enum items matches N (number).

itemvalue:N

Selects enum item entities where the item value matches N (number).

legacynames:N

Selects enum item entities where the number of legacy names matches N (number).

legacyname:foo

Selects enum item entities where a legacy name matches foo (string).

typecat:foo

Selects type entities where the category matches foo (string).

primary:foo

Selects entities where the primary name matches foo (string).

secondary:foo

Selects secondary entities where the secondary name matches foo (string).

List selector

List selectors cause the values of entity fields to be selected instead of the entities themselves.

List selectors are excluded from the logic of the expression. They do not determine whether entities match or do not match, but instead alter how the search results are displayed.

foo:

Lists aggregated values corresponding to field foo for entities matching the rest of the query. That is, while the field selector foo:value will select entities where field foo matches value, the list selector foo: will select all possible values of field foo.

*:

Lists all possible fields for entities matching the rest of the query. Each result can be used as the field part of a field selector. That is, if *: returns foo, then foo: will return all values of field foo, and foo:value will match specific values.

The score of each value result is the sum of scores of the aggregated entity results for that value.

If the remaining query is empty (that is, the entire query is just list selectors), then all entities are selected.

Result selectors

Result selectors are used to control search results. They have the form /name:value. The entire selector is case-insensitive.

Result selectors are excluded from the logic of the expression. They do not determine whether entities match or do not match, but instead alter how the search results are displayed.

/limit:N

Sets the maximum number of results that will be displayed to N, which must be a positive integer. Defaults to 50.

/sort:field

: Sorts search results according to value field. Values are case-insensitive. Defaults to /sort:score. The following values are valid:

  • score: Sort by score. Defaults to descending.
  • name: Sort by entity name. Defaults to ascending.
  • random: Shuffle the results randomly.
/sort:field<

Force field to sort ascending.

/sort:field>

Force field to sort descending.

/go:location

If included, when the search is submitted (when the enter key is pressed) the page will redirect to the page at location corresponding to the first search result. Locations are case-insensitive. The following locations are valid:

  • here: Redirects to the page on this website (default).
  • docs: Redirects to the corresponding Creator Hub documentation page.
  • git: Redirects to the corresponding file in the creator-docs Git repository.

Components

These are not selectors themselves, but form components of more specific selectors.

String

Compares against string-like values.

text
~text~

Matches text against strings using a fuzzy-matching algorithm. Case-insensitive.

'text'

Matches strings that contain text as a sub-string. Case-sensitive.

"text"

Matches strings that are exactly equal to text. Case-sensitive.

/text/

Matches strings that match the regular expression /text/. The syntax is expected match a JavaScript RegExp literal. The only difference is that every / character embedded within the regular expression must be escaped with a \ character. That is, while the expression /[^/]/ may be valid in JavaScript, as a selector, it must be escaped as /[^\/]/. The i, m, s, u, and v flags are allowed.

Also includes the anything component.

The sub-string and exact-string selectors use \ for escaping certain characters. The following escape sequences are transformed:

Other instances of \ are interpreted as-is.

Number

Compares against numeric values.

N

Matches numbers that are equal to N.

<N

Matches numbers that are less than N.

<=N

Matches numbers that are less than or equal to N.

>N

Matches numbers that are greater than N.

>=N

Matches numbers that are greater than or equal to N.

N..M

Matches numbers that are greater than or equal to N and less than or equal to M.

Also includes the anything component.

Bool

Compares against boolean values.

0
no
false
n
f

Matches values that are false.

1
yes
true
y
t

Matches values that are true.

Also includes the anything component.

Anything

*

Matches anything. Included by the string, number, and bool components.

Whitespace

Whitespace between selectors can contain any unicode space characters, including newlines. Whitespace may also contain comments:

#{comment}#

Indicates an arbitrary block-comment. Is considered whitespace.

Settings