Skip to main content
GET
Search for casts

Searching Casts

You can search for casts using keywords and operators in the search query.

Node.js SDK

๐Ÿ”— SDK Method: searchCasts Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Headers

x-neynar-experimental
boolean
default:false

Enables experimental features including filtering based on the Neynar score. See docs for more details.

Query Parameters

q
string
required

Query string to search for casts. Supported operators:

Example:

"star (wars | trek) \"space battle\" after:2024-05-04"

mode
enum<string>

Choices are:

  • literal - Searches for the words in the query string (default)
  • semantic - Searches for the meaning of the query string
  • hybrid - Combines both literal and semantic results
Available options:
literal,
semantic,
hybrid
Example:

"literal"

sort_type
enum<string>

Choices are:

  • desc_chron - All casts sorted by time in a descending order (default)
  • chron - All casts sorted by time in ascending order
  • algorithmic - Casts sorted by engagement and time
Available options:
desc_chron,
chron,
algorithmic
Example:

"desc_chron"

author_fid
integer

Fid of the user whose casts you want to search

Required range: x >= 1
viewer_fid
integer

Providing this will return search results that respects this user's mutes and blocks and includes viewer_context.

Required range: x >= 1
parent_url
string

Parent URL of the casts you want to search

channel_id
string

Channel ID of the casts you want to search

limit
integer<int32>
default:25

Number of results to fetch

Required range: 1 <= x <= 100
Example:

25

cursor
string

Pagination cursor

Response

Success

result
object
required