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

# Search games and mods

> What players search: the public games and mods `GET /projects` lists, best match first, the same for everyone. A word counts for the best place a project has it: its name, then the game a mod is for, who made it, its genre, its summary, then its description. Words are stemmed (`zombies` finds zombie), the last word also matches as the start of one, and a word that matches nothing is taken for the closest one Patch has, so `terarria` finds Terraria. An exact name or handle comes first, and players order those that match about as well. `kind`, `category` and `host_game` (comma-separated) keep projects with any of those; with several `host_game`s, projects for all of them come first, then those for fewer, each group best match first. Results stop after 500 and can shift between pages, as with any ranking. `doors=true` also answers how many games and how many mods match, whatever's filtered, and with no `kind`, answers for the first of those with anything. PC games (`pc_game`) are games: they count and show with the games door's browser games. Results leave out `description`. Limited by address, or by account when signed in. A query is logged to tune ranking, with no account or address, and without what looks personal (product/design/api.md); `x-patch-search-log: off` skips that, and `x-patch-search-replaces` names the search this one takes the place of while someone types. Blocks are found with `GET /repos/search`.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/search
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /projects/search:
    get:
      tags:
        - Projects
      summary: Search games and mods
      description: >-
        What players search: the public games and mods `GET /projects` lists,
        best match first, the same for everyone. A word counts for the best
        place a project has it: its name, then the game a mod is for, who made
        it, its genre, its summary, then its description. Words are stemmed
        (`zombies` finds zombie), the last word also matches as the start of
        one, and a word that matches nothing is taken for the closest one Patch
        has, so `terarria` finds Terraria. An exact name or handle comes first,
        and players order those that match about as well. `kind`, `category` and
        `host_game` (comma-separated) keep projects with any of those; with
        several `host_game`s, projects for all of them come first, then those
        for fewer, each group best match first. Results stop after 500 and can
        shift between pages, as with any ranking. `doors=true` also answers how
        many games and how many mods match, whatever's filtered, and with no
        `kind`, answers for the first of those with anything. PC games
        (`pc_game`) are games: they count and show with the games door's browser
        games. Results leave out `description`. Limited by address, or by
        account when signed in. A query is logged to tune ranking, with no
        account or address, and without what looks personal
        (product/design/api.md); `x-patch-search-log: off` skips that, and
        `x-patch-search-replaces` names the search this one takes the place of
        while someone types. Blocks are found with `GET /repos/search`.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
            example: zombie survival
          required: true
          name: q
          in: query
        - schema:
            type: string
            maxLength: 200
            example: web_game,mod
          required: false
          name: kind
          in: query
        - schema:
            type: string
            maxLength: 400
            example: survival,shooter
          required: false
          name: category
          in: query
        - schema:
            type: string
            maxLength: 400
            example: minecraft-java,hollow-knight
          required: false
          name: host_game
          in: query
        - schema:
            type: string
            enum:
              - 'true'
            description: >-
              Also answer with `doors`, for Discover: `games` are browser games,
              `mods` mods.
          required: false
          description: >-
            Also answer with `doors`, for Discover: `games` are browser games,
            `mods` mods.
          name: doors
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          required: false
          name: limit
          in: query
        - schema:
            type: string
            maxLength: 500
            description: The next_cursor from the previous page
          required: false
          description: The next_cursor from the previous page
          name: cursor
          in: query
      responses:
        '200':
          description: Best first
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Project'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                  search_id:
                    type: string
                    format: uuid
                    description: >-
                      Identifies this search. Pass it on to POST
                      /projects/search/{search_id}/open when one of its results
                      is opened.
                  doors:
                    type: object
                    properties:
                      current:
                        type:
                          - string
                          - 'null'
                        enum:
                          - games
                          - mods
                          - null
                        description: >-
                          The door `data` is behind; null when `kind` asks for
                          kinds behind both doors.
                      games:
                        type: integer
                      mods:
                        type: integer
                        description: >-
                          How many each door holds for this query, whatever else
                          is filtered, at most 500 in all.
                    required:
                      - current
                      - games
                      - mods
                required:
                  - data
                  - next_cursor
                  - search_id
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests: wait as long as `Retry-After` says
            (`retry_after_s` in `details`), then retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Project:
      type: object
      properties:
        id:
          type: string
          format: uuid
        owner:
          type: string
        owner_image:
          type:
            - string
            - 'null'
          description: >-
            The owner's picture, or null to show the figure grown from their
            handle
        slug:
          type: string
        handle:
          type: string
          example: patch/demo-mod
        name:
          type: string
        summary:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        kind:
          type:
            - string
            - 'null'
          enum:
            - web_game
            - pc_game
            - mod
            - block
            - asset
            - null
          description: Derived from the latest published release
        categories:
          type: array
          items:
            type: string
            enum:
              - action
              - adventure
              - racing
              - rpg
              - sandbox
              - shooter
              - simulation
              - strategy
              - survival
              - models
              - characters
              - surfaces
              - 2d
              - audio
              - fire-smoke
              - water
              - sky-weather
              - magic
              - combat-hits
              - nature-life
              - screen-looks
              - physics-destruction
              - terrain-plants
              - characters-animals
              - combat-abilities
              - building-painting
              - vehicles
              - workflows
              - blender
              - mcp-servers
              - importers
              - cli-plugins
              - skills
          description: 'What it is, for browsing: up to five'
        status:
          type: string
          enum:
            - active
            - archived
            - removed
        cover_url:
          type:
            - string
            - 'null'
        cover_levels:
          $ref: '#/components/schemas/MediaLevels'
        tall_cover_url:
          type:
            - string
            - 'null'
          description: >-
            Its tall 2:3 cover, for where games stand as tall tiles; null when
            it has none.
        tall_cover_levels:
          $ref: '#/components/schemas/MediaLevels'
        hover_clip_url:
          type:
            - string
            - 'null'
          description: >-
            A few seconds of play its cards fade into while pointed at; null
            when it has none. Play one of `hover_clip_levels`, not this.
        hover_clip_levels:
          $ref: '#/components/schemas/MediaLevels'
        min_players:
          type:
            - integer
            - 'null'
        max_players:
          type:
            - integer
            - 'null'
        source_visibility:
          type: string
          enum:
            - open_source
            - source_private
          description: >-
            What its repo's visibility means for its code: open_source for an
            open repo, where anyone can read and fork it. source_private for a
            closed source or private one, where only its org reads it, and
            Patch's review reads what it releases.
        code_license:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9][A-Za-z0-9.+-]*$
          example: MIT
          description: License of the code; defaults to MIT
        art_license:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9][A-Za-z0-9.+-]*$
          example: MIT
          description: License of original art and other assets; defaults to CC-BY-4.0
        links:
          type: object
          properties:
            discord:
              type: string
              maxLength: 300
              example: https://discord.gg/patch
            x:
              type: string
              maxLength: 300
              example: https://x.com/patchgg
            telegram:
              type: string
              maxLength: 300
              example: https://t.me/patchgg
            youtube:
              type: string
              maxLength: 300
              example: https://youtube.com/@patchgg
            twitch:
              type: string
              maxLength: 300
              example: https://twitch.tv/patchgg
            github:
              type: string
              maxLength: 300
              example: https://github.com/patchgg/demo-mod
        original_creator:
          $ref: '#/components/schemas/OriginalCreator'
        viewer_claim:
          $ref: '#/components/schemas/ViewerClaim'
        host_games:
          type: array
          items:
            type: object
            properties:
              slug:
                type: string
              name:
                type: string
              role:
                type: string
                enum:
                  - host
                  - companion
                  - related
                description: >-
                  host: the game it plays in. companion: another game it needs
                  on the player's PC. related: a game it's only related to.
              cover_url:
                type:
                  - string
                  - 'null'
                description: The game's own cover art, if Patch has it
              store_urls:
                type: array
                items:
                  type: string
                description: >-
                  Where to get it, in order, as on the host game: the first is
                  its top store, the one shown where there's room for only one.
            required:
              - slug
              - name
              - role
              - cover_url
              - store_urls
        latest_release:
          type:
            - object
            - 'null'
          properties:
            version:
              type: string
            channel:
              type: string
            published_at:
              type:
                - string
                - 'null'
            trust_tier:
              type: string
              enum:
                - sandboxed
                - game_files_only
                - runs_code
              description: >-
                What the release can do on the player's PC, worked out from its
                recipe and files: runs sandboxed in Patch, changes game files
                only, or runs code. Drives review.
            block:
              type:
                - object
                - 'null'
              additionalProperties: {}
              description: >-
                For a block's live demo, its recipe's block section with the
                controls' defaults filled in: the controls, presets and triggers
                its page draws (https://patch.gg/schemas/recipe/v1.json). Null
                for anything else.
          required:
            - version
            - channel
            - published_at
            - trust_tier
            - block
        team_release:
          type:
            - object
            - 'null'
          properties:
            version:
              type: string
            channel:
              type: string
            published_at:
              type:
                - string
                - 'null'
            served:
              type: boolean
              description: >-
                Whether it's what the game host serves. False for a private
                release of a game with a public one, which stays on the public
                one, for its team too.
          required:
            - version
            - channel
            - published_at
            - served
          description: >-
            Only for those who manage the project: its newest published release
            on any channel. `urls` go to what the game host serves, which is
            this one unless a public one exists. `latest_release` is what
            everyone else gets.
        urls:
          $ref: '#/components/schemas/ProjectUrls'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - owner
        - owner_image
        - slug
        - handle
        - name
        - summary
        - description
        - kind
        - categories
        - status
        - cover_url
        - cover_levels
        - tall_cover_url
        - tall_cover_levels
        - hover_clip_url
        - hover_clip_levels
        - min_players
        - max_players
        - source_visibility
        - code_license
        - art_license
        - links
        - original_creator
        - host_games
        - latest_release
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
    MediaLevels:
      type: array
      items:
        type: object
        properties:
          width:
            type: integer
          url:
            type: string
        required:
          - width
          - url
      description: >-
        Smaller copies of a picture (WebP) or a clip (MP4, H.264, without
        sound), smallest first, each at its own address that never changes. Show
        the smallest that's sharp where it goes. Empty for animated pictures,
        for flat art and short clips with no smaller copy, and for media from
        before Patch made copies until theirs are made: then use the file
        itself.
    OriginalCreator:
      type:
        - object
        - 'null'
      properties:
        name:
          type: string
        github_login:
          type:
            - string
            - 'null'
          description: >-
            Their GitHub login when Patch has one, for a link to their GitHub
            profile
        claimed:
          type: boolean
          description: >-
            Whether they've claimed it: once they have, it's on their own
            account
        claimable:
          type: boolean
          description: >-
            Patch knows their GitHub account and they haven't claimed it: signed
            in with that account, claiming moves it to them at once
      required:
        - name
        - github_login
        - claimed
        - claimable
      description: >-
        Who first made it, when that's someone other than whoever published it
        on Patch: they can claim it (`POST /projects/{owner}/{slug}/claim`).
        Null when its owner made it. Everyone else who worked on it is credited
        in its releases' recipes.
    ViewerClaim:
      type: object
      properties:
        can_claim:
          type: boolean
          description: >-
            It has an original creator who hasn't claimed it, and the viewer
            isn't in its org
        github_linked:
          type: boolean
          description: Whether the viewer's Patch account has a GitHub account linked
        github_login:
          type:
            - string
            - 'null'
          description: The viewer's linked GitHub login, when Patch knows it
        github_matches:
          type: boolean
          description: >-
            Their GitHub account is the original creator's, so claiming moves it
            to them at once. Otherwise a claim waits for Patch's staff.
        pending:
          type: boolean
          description: They've asked, and staff haven't answered yet
      required:
        - can_claim
        - github_linked
        - github_login
        - github_matches
        - pending
      description: >-
        For someone signed in, on single-project responses: whether they can
        claim it, and how. Left out for anyone else.
    ProjectUrls:
      type: object
      properties:
        page:
          type: string
          description: Its game page on Patch
        play:
          type:
            - string
            - 'null'
          description: Where it plays on Patch, while a browser game version is live
        game:
          type:
            - string
            - 'null'
          description: >-
            The live browser game, or block's demo, on the game host, its own
            origin (https://<site>-<env>.patchusercontent.com/). Null where
            there's no game host.
      required:
        - page
        - play
        - game
      description: Where it is on Patch. On single-project responses, not in lists.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.