Related API reference Fetch Feed by Channel IDs
memes.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Complete guide to fetching and displaying casts from specific Farcaster channels using Neynar SDK. Learn how to retrieve channel feeds, filter content by channel IDs, and build engaging social media applications with real-time Farcaster data.
memes.
// npm i @neynar/nodejs-sdk
import { NeynarAPIClient, Configuration } from "@neynar/nodejs-sdk";
import { FeedType,FilterType } from "@neynar/nodejs-sdk/build/api/index.js";
// make sure to set your NEYNAR_API_KEY .env
// don't have an API key yet? get one at neynar.com
const config = new Configuration({
apiKey: process.env.NEYNAR_API_KEY,
});
const client = new NeynarAPIClient(config);
const client = new NeynarAPIClient(config);
const channelId = "memes";
const filterType = FilterType.ChannelId;
const feed = await client.fetchFeed({
feedType: FeedType.Filter,
filterType,
channelId,
});
console.log(feed);
{
casts: [
{
object: "cast_hydrated",
hash: "0xf17168571d5e403f3b608ea2cc09a0b711d4c4fc",
thread_hash: "0xf17168571d5e403f3b608ea2cc09a0b711d4c4fc",
parent_hash: null,
parent_url: "chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61",
parent_author: [Object ...],
author: [Object ...],
text: "",
timestamp: "2023-11-27T14:40:12.000Z",
embeds: [
[Object ...]
],
reactions: [Object ...],
replies: [Object ...],
mentioned_profiles: []
}, {
object: "cast_hydrated",
hash: "0x344dcd9c7c2671450628aacd0bbb8e29ea2e8809",
thread_hash: "0x344dcd9c7c2671450628aacd0bbb8e29ea2e8809",
parent_hash: null,
parent_url: "chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61",
parent_author: [Object ...],
author: [Object ...],
text: "sorry",
timestamp: "2023-11-27T14:24:32.000Z",
embeds: [
[Object ...]
],
reactions: [Object ...],
replies: [Object ...],
mentioned_profiles: []
}, {
object: "cast_hydrated",
hash: "0x68b94ec2a10ebad8b13e3b673f0db02dd3280f42",
thread_hash: "0x68b94ec2a10ebad8b13e3b673f0db02dd3280f42",
parent_hash: null,
parent_url: "chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61",
parent_author: [Object ...],
author: [Object ...],
text: "man today is such a nice morning",
timestamp: "2023-11-27T13:30:11.000Z",
embeds: [
[Object ...]
],
reactions: [Object ...],
replies: [Object ...],
mentioned_profiles: []
}
],
next: {
cursor: "eyJ0aW1lc3RhbXAiOiIyMDIzLTExLTI3IDEzOjMwOjExLjAwMDAwMDAifQ=="
}
}
const nextFeed = await client.fetchFeed({
feedType: FeedType.Filter,
filterType: FilterType.ChannelId,
channelId,
cursor: feed.next.cursor,
});
Related topics
Trending Feed on Farcaster - Neynar APIHow to fetch Farcaster feed for a given userFetch feed for youFetch trending feedHow to Use the Neynar Feed APIWas this page helpful?