Skip to content

Packages  ›  trotsky  ›  StepSearchStarterPacks

StepSearchStarterPacks class

Represents a step for searching starter packs on Bluesky, with support for pagination.

Signature:

typescript
export declare class StepSearchStarterPacks<P, C = null, O extends StepSearchStarterPacksOutput = StepSearchStarterPacksOutput> extends StepStarterPacks<P, C, O>

Extends: StepStarterPacks<P, C, O>

Remarks

Note: The searchStarterPacks API endpoint may not be available on all Bluesky servers. As of November 2025, this API is available in test environments but not yet deployed to the main Bluesky network. When the API is not available, it will throw an XRPCNotSupported error.

Example 1

Search for starter packs and display them:

ts
await Trotsky.init(agent)
  .searchStarterPacks({ q: "typescript" })
  .take(10)
  .each()
  .tap((step) => {
    console.log(`Pack URI: ${step.context.uri}`)
    console.log(`Creator: @${step.context.creator.handle}`)
    console.log(`Members: ${step.context.listItemCount || 0}`)
  })
  .run()

Example 2

Filter starter packs by join count:

ts
await Trotsky.init(agent)
  .searchStarterPacks({ q: "tech" })
  .take(20)
  .each()
  .when((step) => (step?.context?.joinedAllTimeCount || 0) > 100)
  .tap((step) => {
    console.log(`Popular pack: ${step.context.uri}`)
  })
  .run()

Constructors

Constructor

Modifiers

Description

(constructor)(agent, parent, queryParams)

Initializes the StepSearchStarterPacks instance with the given agent, parent, and query parameters.

Properties

Property

Modifiers

Type

Description

_queryParams

StepSearchStarterPacksQueryParams

The initial query parameters for the search.

Methods

Method

Modifiers

Description

applyPagination()

Applies the pagination logic to retrieve starter packs based on the search parameters. Results are stored in the output property.

clone(rest)

Clones the current step and returns a new instance with the same parameters.

queryParams(cursor)

Constructs the query parameters for the current pagination step.