Slack.Web.Search (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Searches for messages and files matching a query.

Searches for files matching a query.

Searches for messages matching a query.

Functions

all(query, optional_params \\ %{})

Searches for messages and files matching a query.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • query - Search query. May contains booleans, etc. ex: pickleface

Optional Params

  • count -
  • highlight - Pass a value of true to enable query highlight markers (see below). ex: true
  • page -
  • sort - Return matches sorted by either score or timestamp. ex: timestamp
  • sort_dir - Change sort direction to ascending (asc) or descending (desc). ex: asc
  • team_id - encoded team id to search in, required if org token is used

Errors the API can return:

  • no_query - No query was provided.

See the Common Errors guide for errors returned by every Web API method.

files(query, optional_params \\ %{})

Searches for files matching a query.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • query - Search query. ex: pickleface

Optional Params

  • count -
  • highlight - Pass a value of true to enable query highlight markers (see below). ex: true
  • page -
  • sort - Return matches sorted by either score or timestamp. ex: timestamp
  • sort_dir - Change sort direction to ascending (asc) or descending (desc). ex: asc
  • team_id - encoded team id to search in, required if org token is used

Errors the API can return:

  • no_query - No query was provided.

See the Common Errors guide for errors returned by every Web API method.

messages(query, optional_params \\ %{})

Searches for messages matching a query.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • query - Search query. ex: pickleface

Optional Params

  • count - Pass the number of results you want per "page". Maximum of 100.
  • cursor - Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results
  • highlight - Pass a value of true to enable query highlight markers (see below). ex: true
  • page -
  • sort - Return matches sorted by either score or timestamp. ex: timestamp
  • sort_dir - Change sort direction to ascending (asc) or descending (desc). ex: asc
  • team_id - encoded team id to search in, required if org token is used

Errors the API can return:

  • no_query - No query was provided.

See the Common Errors guide for errors returned by every Web API method.