Lum0x SDK
  • Lum0x-sdk
    • Getting started
    • Examples
      • Case 1 : Find my Fan
      • Case 2: Fetch user's Moxie earning
      • Case 3: Raffle events among the filtered casts
      • How to Deploy a Project with Vercel
    • FarcasterUser
      • Search for Usernames
      • Fetch users based on FIDs
      • Fetch power user objects
      • Fetches users based on Eth or Sol addresses
      • Lookup a user by custody-address
      • Retrieve all channels that a given fid follows
      • Get User Information by username
      • Get Recent Users
    • FarcasterCast
      • Retrieve cast for a given hash or Warpcast URL
      • Retrieve casts for a given user
      • Gets information about an array of casts
      • Retrieve the conversation for a given cast
      • Get Recent Casts
    • FarcasterFeed
      • Retrieve casts based on filters
      • Retrieve trending casts
    • FarcasterReaction
      • Fetches reactions for a given user
      • Fetches reactions for a given cast
    • FarcasterFollowers
      • Retrieve followers for a given user
      • Retrieve relevant followers for a given user
      • Retrieve a list of users followed by a user
    • FarcasterStorage
      • Fetches storage allocations for a given user
      • Fetches storage usage for a given user
    • FarcasterFname
      • Check if a given fname is available
    • FarcasterMute
      • Get fids that a user has muted
    • FarcasterChannel
      • Retrieve all channels with their details
      • Search for channels based on id or name
      • (Bulk) Retrieve channels by id or parent_url
      • Retrieve channel details by id or parent_url
      • Retrieve followers for a given channel
      • Get channels that a user is active in
      • Check If User Follows Channel
      • Retrieve trending channels based on activity
    • FarcasterNotification
      • Retrieve notifications for a given user
    • FarcasterMoxie
      • Retrieve Moxie earning status
      • Retrieve FarScore and FarRank
      • Retrieve Moxie airdrop claim status
      • Retrieve Moxie earning details for cast.
      • Retrieve Moxie earning details for reply.
      • Retrieve Moxie earning details for cast by fid.
      • Retrieve Moxie earning details for reply by fid.
      • Retrieve Moxie earning details from channel cast.
Powered by GitBook
On this page
  • Overview
  • Parameters
  • Usage
  • Response
  • Field Description
  1. Lum0x-sdk
  2. FarcasterFeed

Retrieve trending casts

farcasterFeed.getTrendingFeed

Overview

Retrieve trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only.

Parameters

name
type
required
Note

limit

number

false

default: 25, max: 100

cursor

string

false

ex) eyJwYWdlIjoyfQ==

viewer_fid

number

false

ex) 3

time_window

string

false

"1h", "6h", "12h", "24h" or "7d"

channel_id

string

false

ex) "lum0x"

provider

string

false

"neynar" or "openrank"

Usage

let res = await Lum0x.farcasterFeed.getTrendingFeed({
    limit: 3,
    time_window: "1h"
});
console.log(JSON.stringify(res, null, 2));

Response

{
  "casts": [
    {
      "object": "cast",
      "hash": "0x2458f799ff5efa7a04f990c6b852a0ab96a1b965",
      "thread_hash": "0x2458f799ff5efa7a04f990c6b852a0ab96a1b965",
      "parent_hash": null,
      "parent_url": null,
      "root_parent_url": null,
      "parent_author": {
        "fid": null
      },
      "author": {
        "object": "user",
        "fid": 347,
        "custody_address": "0xb4f195e9a982c2ba58988cb2132557378e9e6b08",
        "username": "greg",
        "display_name": "Greg",
        "pfp_url": "https://i.seadn.io/gae/YsASemS2qwPJK2yI9fmN8HX1-DeIDy9EQxX4KsRk9rkniwn9A7xUyMu_vKR75Oxrs8QAKfIjqdmf6Aw9A9fsehJHWSz2LiNpnV_TPQ?w=500&auto=format",
        "profile": {
          "bio": {
            "text": "I like baking /goodbread and building apps on web3 protocols. DevRel @ ENS Labs. gregskril.com"
          }
        },
        "follower_count": 446828,
        "following_count": 793,
        "verifications": [
          "0x179a862703a4adfb29896552df9e307980d19285"
        ],
        "verified_addresses": {
          "eth_addresses": [
            "0x179a862703a4adfb29896552df9e307980d19285"
          ],
          "sol_addresses": []
        },
        "active_status": "inactive",
        "power_badge": true
      },
      "text": "love to see friends win",
      "timestamp": "2024-08-22T04:39:33.000Z",
      "embeds": [],
      "reactions": {
        "likes_count": 26,
        "recasts_count": 4,
        "likes": [
          {
            "fid": 274563,
            "fname": "0xgiwa"
          },
          {
            "fid": 460843,
            "fname": "warisali"
          },
          {
            "fid": 814404,
            "fname": "sandyd"
          },
          {
            "fid": 1606,
            "fname": "samantha"
          },
          {
            "fid": 613796,
            "fname": "gikbbfdhv"
          }
        ],
        "recasts": [
          {
            "fid": 274563,
            "fname": "0xgiwa"
          },
          {
            "fid": 1407,
            "fname": "thisiszinger.eth"
          },
          {
            "fid": 511655,
            "fname": "bryhmo"
          },
          {
            "fid": 275519,
            "fname": "ayush1939"
          }
        ]
      },
      "replies": {
        "count": 11
      },
      "channel": null,
      "mentioned_profiles": []
    },
    {
      "object": "cast",
      "hash": "0x55ef027a8d97b06ac8432851fa0f9967cf2cfc30",
      "thread_hash": "0x55ef027a8d97b06ac8432851fa0f9967cf2cfc30",
      "parent_hash": null,
      "parent_url": "https://warpcast.com/~/channel/red",
      "root_parent_url": "https://warpcast.com/~/channel/red",
      "parent_author": {
        "fid": null
      },
      "author": {
        "object": "user",
        "fid": 4923,
        "custody_address": "0xb6452061188bf3f456aabfa46b648773779e6961",
        "username": "antimofm",
        "display_name": "antimo 🎩",
        "pfp_url": "https://i.imgur.com/t4LDaI8.jpg",
        "profile": {
          "bio": {
            "text": "when in doubt, wear /red"
          }
        },
        "follower_count": 110249,
        "following_count": 1223,
        "verifications": [
          "0xfa922ce609fed47950e3f48662c9651d42ada194",
          "0xfa922ce609fed47950e3f48662c9651d42ada194"
        ],
        "verified_addresses": {
          "eth_addresses": [
            "0xfa922ce609fed47950e3f48662c9651d42ada194",
            "0xfa922ce609fed47950e3f48662c9651d42ada194"
          ],
          "sol_addresses": []
        },
        "active_status": "inactive",
        "power_badge": true
      },
      "text": "Website live",
      "timestamp": "2024-08-22T04:54:25.000Z",
      "embeds": [
        {
          "url": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/744e8731-ae8d-4caa-d5e3-353622d4c600/original",
          "metadata": {
            "content_type": "image/gif",
            "content_length": "1115290",
            "_status": "RESOLVED",
            "image": {
              "width_px": 1108,
              "height_px": 738
            }
          }
        }
      ],
      "reactions": {
        "likes_count": 13,
        "recasts_count": 4,
        "likes": [
          {
            "fid": 354760,
            "fname": "skineo01"
          },
          {
            "fid": 511666,
            "fname": "izzykid"
          },
          {
            "fid": 6622,
            "fname": "frdysk.eth"
          },
          {
            "fid": 482953,
            "fname": "kel66.eth"
          },
          {
            "fid": 489795,
            "fname": "pearl-cgi"
          }
        ],
        "recasts": [
          {
            "fid": 482953,
            "fname": "kel66.eth"
          },
          {
            "fid": 446697,
            "fname": "leeknowlton.eth"
          },
          {
            "fid": 378285,
            "fname": "anco"
          },
          {
            "fid": 471309,
            "fname": "traguy.eth"
          }
        ]
      },
      "replies": {
        "count": 10
      },
      "channel": {
        "object": "channel_dehydrated",
        "id": "red",
        "name": "red",
        "image_url": "https://i.imgur.com/V9jjSe5.jpg"
      },
      "mentioned_profiles": []
    },
    {
      "object": "cast",
      "hash": "0x33444424adaa881efe0b81daffb985ac57882176",
      "thread_hash": "0x33444424adaa881efe0b81daffb985ac57882176",
      "parent_hash": null,
      "parent_url": "https://onchainsummer.xyz",
      "root_parent_url": "https://onchainsummer.xyz",
      "parent_author": {
        "fid": null
      },
      "author": {
        "object": "user",
        "fid": 250874,
        "custody_address": "0x22dc39497db5263e92bc17595236ef4e68355e46",
        "username": "meguce",
        "display_name": "meguce",
        "pfp_url": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/f567a5cd-4e44-4263-b7c7-7a3bd06a9500/original",
        "profile": {
          "bio": {
            "text": "Head of /replyke\n\n|| Haberdasher || Researcher || CA || FA "
          }
        },
        "follower_count": 17333,
        "following_count": 928,
        "verifications": [
          "0x4adc2c01991f4e69b5b2ab67330933a51ce475ec",
          "0x005d6f6cb632349be399523259feb4cd4bff6049"
        ],
        "verified_addresses": {
          "eth_addresses": [
            "0x4adc2c01991f4e69b5b2ab67330933a51ce475ec",
            "0x005d6f6cb632349be399523259feb4cd4bff6049"
          ],
          "sol_addresses": []
        },
        "active_status": "inactive",
        "power_badge": false
      },
      "text": "Based morning 🔵 \n\nHigher together ↑\n\n/replyke tohether fam ily",
      "timestamp": "2024-08-22T04:33:46.000Z",
      "embeds": [
        {
          "url": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/14aab49b-35fa-4a82-923a-755a5438e600/original",
          "metadata": {
            "content_type": "image/jpeg",
            "content_length": "26109",
            "_status": "RESOLVED",
            "image": {
              "width_px": 1074,
              "height_px": 515
            }
          }
        }
      ],
      "reactions": {
        "likes_count": 22,
        "recasts_count": 9,
        "likes": [
          {
            "fid": 266782,
            "fname": "atnsarts"
          },
          {
            "fid": 408777,
            "fname": "angelus.eth"
          },
          {
            "fid": 435501,
            "fname": "khentoysarad"
          },
          {
            "fid": 606671,
            "fname": "riyad077"
          },
          {
            "fid": 528182,
            "fname": "shadheen1064"
          }
        ],
        "recasts": [
          {
            "fid": 408777,
            "fname": "angelus.eth"
          },
          {
            "fid": 414004,
            "fname": "divon20"
          },
          {
            "fid": 482953,
            "fname": "kel66.eth"
          },
          {
            "fid": 460229,
            "fname": "abss"
          },
          {
            "fid": 535208,
            "fname": "k3llogs"
          }
        ]
      },
      "replies": {
        "count": 19
      },
      "channel": {
        "object": "channel_dehydrated",
        "id": "base",
        "name": "Base",
        "image_url": "https://warpcast.com/~/channel-images/base.png"
      },
      "mentioned_profiles": []
    }
  ],
  "next": {
    "cursor": "eyJ0aW1lc3RhbXAiOiIyMDI0LTA4LTIyIDA0OjMzOjQ2LjAwMDAwMDAiLCJwb2ludHMiOiIxMiJ9"
  }
}
해시
작성자
텍스트
타임스탬프
좋아요 수
리캐스트 수
댓글 수
채널

0x2458f799ff5efa7a04f990c6b852a0ab96a1b965

love to see friends win

2024-08-22T04:39:33.000Z

26

4

11

-

0x55ef027a8d97b06ac8432851fa0f9967cf2cfc30

Website live

2024-08-22T04:54:25.000Z

13

4

10

0x33444424adaa881efe0b81daffb985ac57882176

Based morning 🔵 \n\nHigher together ↑\n\n/replyke tohether fam ily

2024-08-22T04:33:46.000Z

22

9

19

Field Description

  • Hash: The unique identifier of the cast (post).

  • Author: Information about the user who created the cast (user ID, username, profile image, etc.).

  • Text: The content of the cast.

  • Timestamp: The date and time when the cast was created.

  • Likes Count: The number of likes the cast has received.

  • Recasts Count: The number of times the cast has been recast.

  • Reactions: Information related to likes and recasts (who liked or recast the cast, etc.).

  • Replies: The number of replies to the cast.

  • Channel: Information about the channel the cast belongs to (channel name, channel image, etc.).

PreviousRetrieve casts based on filtersNextFarcasterReaction

Last updated 9 months ago

Greg ()

antimo 🎩 ()

meguce ()

프로필
프로필
프로필
red
Base