> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wanderersguide.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Search across all content

> Two modes:



## OpenAPI

````yaml POST /search-data
openapi: 3.1.0
info:
  title: Wanderer's Guide API
  description: >-
    Public HTTP API for Wanderer's Guide, the Pathfinder 2e character builder.
    Every endpoint is a Supabase Edge Function reached via `POST
    /functions/v1/<name>`. All responses follow the
    [JSend](https://github.com/omniti-labs/jsend) convention: `{ status:
    'success' | 'fail' | 'error', data?, message? }`.
  version: 1.0.0
  contact:
    name: Wanderer's Guide Discord
    url: https://discord.com/invite/FxsFZVvedr
  license:
    name: MIT
    url: https://github.com/wanderers-guide/wanderers-guide/blob/main/LICENSE
servers:
  - url: https://api.wanderersguide.app/functions/v1
    description: Production
  - url: '{supabaseUrl}/functions/v1'
    description: Self-hosted Supabase
    variables:
      supabaseUrl:
        default: http://127.0.0.1:54321
        description: Base URL of your Supabase instance, including scheme and port.
security:
  - apiKeyAuth: []
tags:
  - name: Content
    description: 'Pathfinder 2e content: spells, items, feats, ancestries, classes, etc.'
  - name: Characters
    description: Player characters.
  - name: Campaigns
    description: Campaigns and encounters.
  - name: GM
    description: 'Game-master tools: group management, access codes.'
  - name: Users
    description: Public user profiles, account management, Patreon integration.
  - name: Search
    description: Full-text and advanced search across content.
  - name: Files
    description: User-uploaded portrait and background images.
  - name: Integrations
    description: Vector DB and Discord webhooks.
paths:
  /search-data:
    post:
      tags:
        - Search
      summary: Search across all content
      description: >-
        Two modes:

        - **Simple**: set `text` (>= 2 chars). Runs a websearch full-text query
        against every content table, capped at 20 hits each. Best for
        spotlight-style search.

        - **Advanced**: set `is_advanced: true` plus a `type` and any of the
        per-type filters. Returns matching rows in the corresponding bucket
        only.


        All responses include all twelve content buckets, even if empty.
      operationId: searchData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: Simple-mode search text.
                is_advanced:
                  type: boolean
                type:
                  $ref: '#/components/schemas/ContentType'
                content_sources:
                  type: array
                  items:
                    type: integer
                name:
                  type: string
                description:
                  type: string
                rarity:
                  $ref: '#/components/schemas/Rarity'
                availability:
                  $ref: '#/components/schemas/Availability'
                traits:
                  type: array
                  items:
                    type: integer
                size:
                  $ref: '#/components/schemas/Size'
                cost:
                  type: string
                trigger:
                  type: string
                requirements:
                  type: string
                level_min:
                  type: integer
                level_max:
                  type: integer
                rank_min:
                  type: integer
                rank_max:
                  type: integer
                cast:
                  type: string
                traditions:
                  type: array
                  items:
                    type: string
                defense:
                  type: string
                range:
                  type: string
                area:
                  type: string
                targets:
                  type: string
                duration:
                  type: string
                spell_type:
                  type: string
                  enum:
                    - FOCUS
                    - RITUAL
                    - NORMAL
                actions:
                  $ref: '#/components/schemas/ActionCost'
                prerequisites:
                  type: array
                  items:
                    type: string
                frequency:
                  type: string
                access:
                  type: string
                special:
                  type: string
                ab_type:
                  $ref: '#/components/schemas/AbilityBlockType'
                bulk:
                  type: string
                group:
                  $ref: '#/components/schemas/ItemGroup'
                hands:
                  type: string
                craft_requirements:
                  type: string
                usage:
                  type: string
      responses:
        '200':
          description: JSend success with the SearchResults envelope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/SearchResults'
components:
  schemas:
    ContentType:
      type: string
      enum:
        - trait
        - item
        - spell
        - class
        - archetype
        - versatile-heritage
        - class-archetype
        - ability-block
        - creature
        - ancestry
        - background
        - language
        - content-source
    Rarity:
      type: string
      enum:
        - COMMON
        - UNCOMMON
        - RARE
        - UNIQUE
    Availability:
      type: string
      enum:
        - STANDARD
        - LIMITED
        - RESTRICTED
    Size:
      type: string
      enum:
        - TINY
        - SMALL
        - MEDIUM
        - LARGE
        - HUGE
        - GARGANTUAN
    ActionCost:
      type:
        - string
        - 'null'
      enum:
        - ONE-ACTION
        - TWO-ACTIONS
        - THREE-ACTIONS
        - REACTION
        - FREE-ACTION
        - ONE-TO-TWO-ACTIONS
        - ONE-TO-THREE-ACTIONS
        - TWO-TO-THREE-ACTIONS
        - null
    AbilityBlockType:
      type: string
      enum:
        - action
        - feat
        - physical-feature
        - sense
        - class-feature
        - heritage
        - mode
    ItemGroup:
      type: string
      enum:
        - GENERAL
        - WEAPON
        - ARMOR
        - SHIELD
        - RUNE
        - UPGRADE
        - MATERIAL
    SearchResults:
      type: object
      required:
        - ability_blocks
        - ancestries
        - archetypes
        - backgrounds
        - classes
        - creatures
        - items
        - languages
        - spells
        - traits
        - versatile_heritages
        - class_archetypes
      properties:
        ability_blocks:
          type: array
          items:
            $ref: '#/components/schemas/AbilityBlock'
        ancestries:
          type: array
          items:
            $ref: '#/components/schemas/Ancestry'
        archetypes:
          type: array
          items:
            $ref: '#/components/schemas/Archetype'
        backgrounds:
          type: array
          items:
            $ref: '#/components/schemas/Background'
        classes:
          type: array
          items:
            $ref: '#/components/schemas/Class'
        creatures:
          type: array
          items:
            $ref: '#/components/schemas/Creature'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
        languages:
          type: array
          items:
            $ref: '#/components/schemas/Language'
        spells:
          type: array
          items:
            $ref: '#/components/schemas/Spell'
        traits:
          type: array
          items:
            $ref: '#/components/schemas/Trait'
        versatile_heritages:
          type: array
          items:
            $ref: '#/components/schemas/VersatileHeritage'
        class_archetypes:
          type: array
          items:
            $ref: '#/components/schemas/ClassArchetype'
    AbilityBlock:
      type: object
      required:
        - name
        - rarity
        - description
        - type
        - content_source_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        name:
          type: string
        actions:
          $ref: '#/components/schemas/ActionCost'
        level:
          type: integer
        rarity:
          $ref: '#/components/schemas/Rarity'
        availability:
          $ref: '#/components/schemas/Availability'
        prerequisites:
          type: array
          items:
            type: string
        frequency:
          type: string
        cost:
          type: string
        trigger:
          type: string
        requirements:
          type: string
        access:
          type: string
        description:
          type: string
        special:
          type: string
        type:
          $ref: '#/components/schemas/AbilityBlockType'
        meta_data:
          type: object
          additionalProperties: true
        traits:
          type: array
          items:
            type: integer
        content_source_id:
          type: integer
        version:
          type: string
    Ancestry:
      type: object
      required:
        - name
        - rarity
        - description
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        trait_id:
          type: integer
        artwork_url:
          type: string
        content_source_id:
          type: integer
        version:
          type: string
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
    Archetype:
      type: object
      required:
        - name
        - rarity
        - description
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        trait_id:
          type: integer
        artwork_url:
          type: string
        content_source_id:
          type: integer
        version:
          type: string
        dedication_feat_id:
          type: integer
    Background:
      type: object
      required:
        - name
        - rarity
        - description
        - operations
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        content_source_id:
          type: integer
        version:
          type: string
    Class:
      type: object
      required:
        - name
        - rarity
        - description
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        skill_training_base:
          type: integer
        trait_id:
          type: integer
        artwork_url:
          type: string
        content_source_id:
          type: integer
        version:
          type: string
    Creature:
      type: object
      required:
        - name
        - level
        - rarity
        - details
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        level:
          type: integer
        rarity:
          $ref: '#/components/schemas/Rarity'
        traits:
          type: array
          items:
            type: integer
        details:
          type: object
          properties:
            image_url:
              type: string
            background_image_url:
              type: string
            description:
              type: string
            adjustment:
              type: string
              enum:
                - ELITE
                - WEAK
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        abilities_base:
          type: array
          items:
            $ref: '#/components/schemas/AbilityBlock'
        abilities_added:
          type: array
          items:
            type: integer
        inventory:
          type: object
          additionalProperties: true
        spells:
          type: object
          additionalProperties: true
        meta_data:
          type: object
          additionalProperties: true
        content_source_id:
          type: integer
        deprecated:
          type: boolean
        version:
          type: string
    Item:
      type: object
      required:
        - name
        - level
        - rarity
        - description
        - group
        - size
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        price:
          type: object
          properties:
            cp:
              type: integer
            sp:
              type: integer
            gp:
              type: integer
            pp:
              type: integer
        bulk:
          type: string
        level:
          type: integer
        rarity:
          $ref: '#/components/schemas/Rarity'
        availability:
          $ref: '#/components/schemas/Availability'
        traits:
          type: array
          items:
            type: integer
        description:
          type: string
        group:
          $ref: '#/components/schemas/ItemGroup'
        hands:
          type: string
        size:
          $ref: '#/components/schemas/Size'
        craft_requirements:
          type: string
        usage:
          type: string
        meta_data:
          type: object
          additionalProperties: true
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        content_source_id:
          type: integer
        version:
          type: string
    Language:
      type: object
      required:
        - name
        - description
        - content_source_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        speakers:
          type: string
        script:
          type: string
        description:
          type: string
        content_source_id:
          type: integer
        rarity:
          $ref: '#/components/schemas/Rarity'
        availability:
          $ref: '#/components/schemas/Availability'
    Spell:
      type: object
      required:
        - name
        - rank
        - traditions
        - rarity
        - description
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rank:
          type: integer
          minimum: 0
          maximum: 10
        traditions:
          type: array
          items:
            type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        availability:
          $ref: '#/components/schemas/Availability'
        cast:
          type: string
        traits:
          type: array
          items:
            type: integer
        defense:
          type: string
        cost:
          type: string
        trigger:
          type: string
        requirements:
          type: string
        range:
          type: string
        area:
          type: string
        targets:
          type: string
        duration:
          type: string
        description:
          type: string
        heightened:
          type: object
          additionalProperties: true
        meta_data:
          type: object
          additionalProperties: true
        content_source_id:
          type: integer
        version:
          type: string
    Trait:
      type: object
      required:
        - name
        - content_source_id
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        content_source_id:
          type: integer
        meta_data:
          type: object
          properties:
            important:
              type: boolean
            creature_trait:
              type: boolean
            unselectable:
              type: boolean
            class_trait:
              type: boolean
            ancestry_trait:
              type: boolean
            archetype_trait:
              type: boolean
            versatile_heritage_trait:
              type: boolean
    VersatileHeritage:
      type: object
      required:
        - name
        - rarity
        - description
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        trait_id:
          type: integer
        artwork_url:
          type: string
        content_source_id:
          type: integer
        version:
          type: string
        heritage_id:
          type: integer
    ClassArchetype:
      type: object
      required:
        - name
        - rarity
        - description
        - class_id
        - content_source_id
        - version
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        class_id:
          type: integer
        archetype_id:
          type: integer
        name:
          type: string
        rarity:
          $ref: '#/components/schemas/Rarity'
        description:
          type: string
        artwork_url:
          type: string
        operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        feature_adjustments:
          type: array
          items:
            type: object
            properties:
              fa_id:
                type: string
              type:
                type: string
                enum:
                  - ADD
                  - REPLACE
                  - REMOVE
              prev_id:
                type: integer
              data:
                $ref: '#/components/schemas/AbilityBlock'
        override_skill_training_base:
          type:
            - integer
            - 'null'
        override_class_operations:
          type: boolean
        content_source_id:
          type: integer
        deprecated:
          type: boolean
        version:
          type: string
    Operation:
      description: >-
        An entry in the operations engine. See the Content Model guide. Shape
        varies by `type`; treated as opaque JSON by the API.
      type: object
      additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key (UUID, 36 chars)
      description: >-
        API key created in your Wanderer's Guide account settings. Send as
        `Authorization: Bearer <key>`. Used for direct API access from external
        tools and scripts.

````