Cirtensis Documentation

Federated Search

The federated search feature was added to provide individual control over the
ability to search your stream and personal content.

Previously this was a site security setting made by the site admin.

Implementation Details

Search results are available either via the web or via ActivityPub endpoints. There are two endpoints available. The first is at []/search and searches the entire site. The second is an individual channel search at []/search/[username] . This only searches an individual channel.

Access is controlled by a permission named 'search_stream'. Only viewers possessing both 'view_stream' and 'search_stream' permission can search your channel content. This permission can be assigned individually, or automatically by the channel Permission Role and the personal Roles app.

The site search is an aggregate of all channels that allow the viewer to search their content. The search results may include protected or private content which is permitted to be seen by the viewer. If the viewer cannot be determined, only public content is returned.

The search permission is available to federated protocols via an attribute 'canSearch' in the actor record. This consists of an id or array consisting of the actor ids of those who are permitted to search content. Usually this will be an access list or the ActivityPub 'followers' collection. It may also contain individual actor ids or the ActivityPub "public inbox" identifier if public searching is allowed. An empty entry means nobody can search the channel.


The channel search URL is provided in the ActivityPub and Nomad actor records in the optional 'endpoints' section. The names used are 'nomad:searchContent' and 'nomad:searchTags'. These endpoints will be essentially a template, containing a bracket pair {} which is then substituted with the desired search text. This URL provides results for both HTML and ActivityPub/ActivityStreams/Nomad/Zot6 requests.

Example ActivityPub actor record with 'canSearch' attribute and search endpoints
    "@context": [
            "nomad": "",
            "toot": "",
            "litepub": "",
            "sm": "",
            "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
            "oauthRegistrationEndpoint": "litepub:oauthRegistrationEndpoint",
            "sensitive": "as:sensitive",
            "movedTo": "as:movedTo",
            "alsoKnownAs": "as:alsoKnownAs",
            "EmojiReact": "as:EmojiReact",
            "discoverable": "toot:discoverable",
            "wall": "sm:wall",
            "capabilities": "litepub:capabilities",
            "acceptsJoins": "litepub:acceptsJoins",
            "Hashtag": "as:Hashtag",
            "canReply": "toot:canReply",
            "approval": "toot:approval",
            "isContainedConversation": "nomad:isContainedConversation",
            "conversation": "nomad:conversation",
            "commentPolicy": "nomad:commentPolicy",
            "eventRepeat": "nomad:eventRepeat",
            "emojiReaction": "nomad:emojiReaction",
            "expires": "nomad:expires",
            "directMessage": "nomad:directMessage",
            "Category": "nomad:Category",
            "replyTo": "nomad:replyTo",
            "copiedTo": "nomad:copiedTo",
            "canSearch": "nomad:canSearch",
            "searchContent": "nomad:searchContent",
            "searchTags": "nomad:searchTags"
    "type": "Person",
    "id": "",
    "preferredUsername": "mike",
    "name": "Mike Macgirvin",
    "updated": "2023-07-07T09:24:00Z",
    "icon": {
        "type": "Image",
        "mediaType": "image/jpeg",
        "updated": "2022-11-25T22:10:44Z",
        "url": "",
        "height": 300,
        "width": 300
    "url": "",
    "location": {
        "type": "Place",
        "name": "Bugger All, Australia"
    "tag": [
            "type": "Note",
            "name": "Protocol",
            "content": "zot6"
            "type": "Note",
            "name": "Protocol",
            "content": "nomad"
            "type": "Note",
            "name": "Protocol",
            "content": "activitypub"
    "inbox": "",
    "outbox": "",
    "followers": "",
    "following": "",
    "wall": "",
    "endpoints": {
        "sharedInbox": "",
        "oauthRegistrationEndpoint": "",
        "oauthAuthorizationEndpoint": "",
        "oauthTokenEndpoint": "",
        "searchContent": "{}",
        "searchTags": "{}"
    "discoverable": true,
    "canSearch": "",
    "publicKey": {
        "id": "",
        "owner": "",
        "signatureAlgorithm": "",
        "publicKeyPem": "-----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----
    "manuallyApprovesFollowers": true,
    "image": {
        "type": "Image",
        "mediaType": "image/jpeg",
        "url": ""
    "summary": "Farmer in Bugger All, Australia. Plays a mean guitar, upside down and backwards. Systems integration, software development, and robot repair.",
    "attachment": [
            "type": "Note",
            "name": "birthday",
            "content": "0000-00-00"
    "signature": {
        "type": "RsaSignature2017",
        "nonce": "8f848b54a05750904e60fa7a770f130c6ec9c19b9c5a29bdd2ebd83e4e679575",
        "creator": "",
        "created": "2023-08-29T20:37:56Z",
        "signatureValue": "PcNuQ7sZ5qHk1UIi0UsBlHdm4AolT6iEnVWfGmi292Is7A2vFVEMutmWb7y/OUy9b0kLq9o2ScAMbv3vkmKQcyWmk/qez0koMWoHmsxMcYWJE7rxnZWrulMSomRO0qNGgX+D2TsLRsGd5kktC/PgRbqD4OKzvV9jTgGnGaEqb1CYTQp9X/w66zG/jV+y94NTIe60iG8xVsLtLZRw/Y+LCu06BKfvDajQit9WSNVZVnqCub8IR63SxFtyWNZuolGpzjVW7z3C86Tj3Sv89lonf5XtR6JEUniFHZokbL4Ie23fbK4IKVAu5AriBYlMK2hMcpxKxFfHgOjav7B9yxze4QV10LjxGHZUklgzJwQUBX92RmZIpu5Cdsw94kNLnq1Xy5b6Xyam8TiPBOgEnUiZ74zDi3e9WKqxvTp2dsgC3g+sCCSQ5u6388nLzhREQWEwAlvhQ5p3M1gpg6P0S9HFA9syVjP0g2tlE3jK1RfUY/1sIp7awb0GdstN5iVF8BHDmd+uYaTZxfKw/cZ+Wa6IOVlAD0wSZnlvsms/DvPeMOcn7Pd+TxiJm4flSqFdkEDABc5WTFikHDw6O3KZTbhyeXKLyWNxTch/kwCo+6Fi6S3Wj38IkP7spuuw+VFxetIo3n44oGXzu4YuBII3ZbUG/Kp9V+OVHP5t+hs4qTWhvMQ="

A similar record is provided for the site and is located at the site or domain root. It is identical, except that the site search presents an aggregated search, and can also be separately controlled by a site security option "Block Public Search".

If a channel has federated search enabled, an entry is provided in the author action drop down attached to every post/comment. This performs an HTML search of the provided endpoint(s).


Search endpoint discovery is also provided by Opensearch. The opensearch definition is provided in webfinger for either a channel or for the site (identified by the actor record for the site/domain root).

Example webfinger entry at domain root:
        "rel": "",
        "type": "application/opensearchdescription+xml",
        "href": "",
        "title": ""

Example webfinger entry for an individual actor:
        "rel": "",
        "type": "application/opensearchdescription+xml",
        "href": "",
        "title": ""

This links to the following opensearch document:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="">
    <Description>Search Zap|</Description>
    <Image height="64" width="64" type="image/png"></Image>
    <Url type="text/html" template="{searchTerms}"/>
    <Url type="application/ld+json; profile=""" template="{searchTerms}"/>

The second Url in the example is a pointer to the ActivityPub enabled endpoint. A similar document is provided for the site search. Since an HTML Url is provided, these searches will be available as a browser search engine from many browsers and are also available to any opensearch enabled service. These services will only search public content (if public searches are permitted) as there is currently no mechanism for opensearch to determine the identity of the viewer. There are plans to integrate this with OpenWebAuth, so this restriction is temporary. [Edit: this was done.]

The opensearch links are also provided as links in the actor's channel page. Both the channel search and the site search are listed.
<link rel="search" href="" type="application/opensearchdescription+xml" title="Search zap (" />
<link rel="search" href="" type="application/opensearchdescription+xml" title="" />