Search

Search a world's elements by the words in their text

Changed on

Every element of the world whose name or text fields (description and the type's other prose fields, such as a Character's background; not supertype, subtype or image_url) hold every word of q as a whole word, ignoring case: ore does not find more, and copper mine needs both words somewhere in the element. No stemming. A guest key searches only what it may read.

get/api/v2/search

Request

  • Base URL: https://www.onlyworlds.com
  • URL: https://www.onlyworlds.com/api/v2/search
  • Auth: one of:
    • API key in header API-Key
    • API key in header API-Key and API key in header API-Pin

Query parameters

qstring required

The words to find, 2 to 200 characters once trimmed. A word is a run of letters, digits or underscores; anything else separates words.

type'ability' | 'collective' | 'character' | 'construct' | 'creature' | 'event' | 'family' | 'institution' | 'language' | 'law' | 'location' | 'map' | 'marker' | 'narrative' | 'object' | 'phenomenon' | 'pin' | 'relation' | 'species' | 'title' | 'trait' | 'zone'

Search one type only. An unknown type is a 422.

limitinteger

How many results at most; clamped to 1-200. A non-integer is a 422.

asstring

View as (the owner's keys only: a key with no member): read as another reader would. A membership id of this world (a person, an agent seat or a player seat) reads as that member's own key, its own creations included; a Character id reads as a guest of that Character with no membership (what it knows, the roster, nothing counted as its own); public reads everything that is not hidden. A hidden element is the plain 404, never a 410. An unknown value is a 422 (param as); a member key sending it is a 403 view_as_owner_only. Writes, /changes, /members, /me, the world and the files routes do not take it (422).

Response

The matching elements, name matches first.

querystring required

q as searched (trimmed).

countinteger required

How many results came back.

truncatedboolean required

True when more elements matched than limit let through. There are no further pages: narrow q or type, or raise limit.

Changes

    • warning

      added the new character_taken enum value to the / response property for the response status

    • warning

      added the new character_taken enum value to the / response property for the response status

    • warning

      added the new character_taken enum value to the / response property for the response status

    • warning

      added the new character_taken enum value to the / response property for the response status

    • warning

      added the new character_taken enum value to the / response property for the response status

    • warning

      added the new world_full enum value to the / response property for the response status

    • warning

      added the new world_full enum value to the / response property for the response status

    • warning

      added the new world_full enum value to the / response property for the response status

    • warning

      added the new world_full enum value to the / response property for the response status

    • warning

      added the new world_full enum value to the / response property for the response status