LogoLogo
  • 🚀DeSo Vision
  • 🪙DeSo Tokenomics
    • No Equity, Just Coins and Code
    • Current DESO Supply
    • Initial DESO Distribution
    • DESO Sinks
    • The BMF: Burn-Maximizing Fee Mechanism
    • Designed for the End-Game
  • 🏛️DeSo Governance
  • ⭐DeSo Tutorial (Build Apps)
  • 🖥️Node Architecture Overview
    • Setup a Node & Frontend Locally
    • Making Your First Changes
  • 📅DeSo Roadmap
  • 🔍DeSo Block Explorer
  • 💸DeSo Wallet
  • 💬DeSo Chat Protocol
  • 👽Openfund
  • 👀Focus
  • 🛠️DeSo Tech Stack
  • 🌐DeSo Applications
  • DeSo Blockchain
    • 1️⃣Bare Metal
    • 2️⃣Scaling Roadmap
    • 3️⃣Content Moderation
    • 4️⃣Infinite-State
    • 5️⃣On-Chain Data
    • 6️⃣Smart Services
    • 7️⃣User Security
  • DeSo Features
    • 1️⃣Associations
    • 2️⃣Creator Coins
    • 3️⃣Feeds & Moderation
    • 4️⃣Social NFTs
    • 5️⃣Social Tipping
  • DeSo Identity
    • 1️⃣Identity: Overview
      • Core Concepts
      • Mobile Integration
    • 2️⃣Identity: iFrame API
      • Overview
      • Endpoints
    • 3️⃣Identity: Window API
      • Overview
      • Endpoints
  • DESO FRONTEND
    • 1️⃣Frontend: Get Started
    • 2️⃣Frontend: React Example
  • DESO BACKEND
    • 1️⃣Backend: Config
      • Onboarding
      • Phone Number Verification
      • Global State
      • Admins
      • Web Security
      • Media
        • Images
        • Videos
      • Hot Feed
      • Selling $DESO
        • Wyre - Buy with USD
        • Buy with BTC
        • Buy with ETH
      • Analytics
      • Emails
      • Supply Monitoring
    • 2️⃣Construct: API
      • Social Transactions API
      • NFT Transactions API
      • Financial Transactions API
      • Derived Keys Transaction API
      • DeSo Tokens Transactions API
      • Associations Transactions API
      • Access Groups API
    • 3️⃣Data: API
      • Admin Endpoints
      • Associations Endpoints
      • DeSo Tokens Endpoints
      • Media Endpoints
      • Miner Endpoints
      • Notification Endpoints
      • NFT Endpoints
      • Social Endpoints
      • Referral Endpoints
      • Tutorial Endpoints
      • Meta Data Endpoints
      • Transaction Spending Limits Endpoints
      • User Endpoints
      • Post Endpoints
      • Messages Endpoints
      • Access Group Endpoints
    • 4️⃣Transactions: API
  • DeSo Exchange Listings
    • 1️⃣Exchange Listing: API
  • DeSo Nodes
    • 2️⃣Node: Setup
    • 3️⃣Node: Staying Up-To-Date
    • 4️⃣Node: FAQ
  • DESO VALIDATORS
    • 1️⃣Run a Validator
  • Openfund
    • What is Openfund?
    • Openfund Tokenomics
    • Openfund Governance
    • Algorithmic Trading
      • The DeSo Python SDK
    • The DeSo Python SDK
      • Getting Help from the Community
      • Creating DeSo Testnet Accounts
      • Debugging Tips and Code Walkthrough
      • Write Blockchain Bots with AI
      • Market-Making Bots
      • Social AI Agents
      • AI-Generating Your Code
    • How Do the Advanced AMMs Work?
  • Focus
    • The Crypto Social Network
    • Next-Generation Token Mechanics
      • Launching Your Token
      • How the Order-Book AMMs Work
    • Crypto-Native Monetization
    • Focus Tokenomics
    • The Social Airdrop
    • Decentralizing Social Media
  • Contact And Media
    • ☀️DeSo Website
    • 📑DeSo Blog
    • 💻DeSo Github
    • 💎DeSo Diamond
    • 🐦DeSo Twitter
    • 📺DeSo YouTube
    • 📬Contact US
    • ⚠️Reporting an Account or Post
  • 中文
    • 什么是DeSo? (What is DeSo?)
    • 愿景 (The Vision)
Powered by GitBook
On this page
  • Get Posts Stateless
  • Get Single Post
  • Get Posts For Public Key
  • Get Hot Feed
  • Get Diamonded Posts
  • Get Likes For Post
  • Get Diamonds For Post
  • Get Reposts For Post
  • Get Quote Reposts For Post

Was this helpful?

  1. DESO BACKEND
  2. Data: API

Post Endpoints

Description of endpoints used to get data related to posts on the DeSo blockchain

PreviousUser EndpointsNextMessages Endpoints

Last updated 2 years ago

Was this helpful?

Please make sure you've read Data: API so you are familiar with the following types referenced in this documentation:

Get Posts Stateless

POST /api/v0/get-posts-stateless

Get Posts Stateless returns an array of posts based on the request body. This endpoint is used to fetch posts for many different kinds of feeds.

To fetch the global feed, set GetPostsForGlobalWhitelist to true

To fetch the following feed for a user, set GetPostsforFollowFeed to true

To fetch the admin view of posts ordered by creator coin price, set GetPostsByDeSo to true and provide a value for PostsByDESOMinutesLookback

Endpoint implementation in .

Example usages in frontend: - Make request to - Use Get Posts Stateless to get the - Use Get Posts Stateless to - Use Get Posts Stateless to - Use Get Posts Stateless to

Request Body

Name
Type
Description

GetPostsForFollowFeed

Boolean

If true, get posts from creators that the reader follows

OrderBy

String

Order the posts by certain attributes

NumToFetch*

int

Maximum Number of posts to return

ReaderPublicKeyBase58Check

String

Public key of the reader

PostHashHex

String

Start paginated look-up of posts after this post hash

GetPostsForGlobalWhitelist

Boolean

If true, get posts for the global feed - these are posts that have been manually selected for the global feed

PostContent

String

Filters out posts that do not match the text provided in PostContent (case-insensitive)

StartTstampSecs

uint64

deprecated

FetchSubcomments

Boolean

If true, fetches comments on comments of each post. Note: not implemented for the following feed

GetPostsByDESO

Boolean

Get posts from the creators with the highest DESO locked within a certain timeframe

GetPostsByClout

Boolean

deprecated - use GetPostsByDESO instead

MediaRequired

Boolean

If true, filter out posts that do not have images or video in them

PostsByDESOMinutesLookback

uint64

If GetPostsByDESO is true, get all posts within PostsByDESOMinutesLookback, order them by the creator's DESO locked, and take the top NumToFetch posts. Must be 60 or less

AddGlobalFeedBool

Boolean

If set to true, then the posts in the response will contain a boolean about whether they're in the global feed

{
  "PostsFound": [<PostEntryResponse>, <PostEntryResponse>], // Array of PostEntryResponses that were found for the provided request body.
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Single Post

POST /api/v0/get-single-post

Gets a single post, optionally including parents and children. This endpoint is used to display a thread view of a post.

Request Body

Name
Type
Description

PostHashHex*

String

Hex of Post Hash to fetch

FetchParents

Boolean

if true, fetch all parents of this post, up to 100 parents.

CommentOffset

uint32

Offset at which to begin result set of comments returned. Defaults to 0

CommentLimit*

uint32

number of comments to return, starting at CommentOffset

ReaderPublicKeyBase58Check

String

public key of the user reading this single post

AddGlobalFeedBool

Boolean

if set to true, then the posts in the response will contain a boolean indicating if they're in the global feed

{
 "PostFound": <PostEntryResponse>, // A single PostEntryResponse that optionally contains all children and parent of itself.
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Posts For Public Key

POST /api/v0/get-posts-for-public-key

Get posts created by a public key or username. This endpoint is used to populate the posts on a user's profile page.

Request Body

Name
Type
Description

PublicKeyBase58Check

String

Public key of the user whose posts we will fetch Only required if Username is not provided

Username

String

Username of the user whose posts we will fetch Only required if PublicKeyBase58Check is not provided

ReaderPublicKeyBase58Check

String

public key of the user reading the posts

LastPostHashHex

String

Hex of the Post Hash that ended the previous page of results

NumToFetch*

uint64

Number of posts to fetch

MediaRequired

Boolean

if true, only return posts that have images, videos, or embed video URLs.

{
  "Posts": [<PostEntryResponse>, <PostEntryResponse>], // Array of PostEntryResponses representing a page of results for posts created by the provided public key.
  "LastPostHashHex": "21285bd8c0ed74125cd82a65a74606d8fcb84e309f58bb44b6cb0b76489897b5", //Hex of the last Post Hash in the array of Posts above.  
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Hot Feed

POST /api/v0/get-hot-feed

Get Hot Feed returns a page of Posts that are currently "hot". A post's hotness is determined by the time since the post was created and the number of likes, diamonds, comments, reposts, and quote reposts.

Request Body

Name
Type
Description

ReaderPublicKeyBase58Check

String

public key of the user reading the posts

SeenPosts

String[]

A list of posts that have already been seen by the reader

ResponseLimit

uint64

Number of posts to fetch

{
  "HotFeedPage": [<PostEntryResponse>, <PostEntryResponse>,...] // Array of PostEntryResponses that represent the next page of the hot feed for the reader
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Diamonded Posts

POST /api/v0/get-diamonded-posts

Get all posts on which sender sent diamonds to the receiver. Posts are sorted by the number of diamonds given from the sender to the receiver and then by timestamp.

Request Body

Name
Type
Description

ReceiverPublicKeyBase58Check

String

Public key of the user who received diamonds from sender Only required if ReceiverUsername is not provided

ReceiverUsername

String

Username of the user who received diamonds from sender Only required if ReceiverPublicKeyBase58Check is not provided

SenderPublicKeyBase58Check

String

Public key of the user who sent diamonds to the receiver Only required if SenderUsername is not provided

SenderUsername

String

Username of the user who sent diamonds to the receiver Only required if SenderPublicKeyBase58Check is not provided

ReaderPublicKeyBase58Check

String

public key of the user reading the posts

StartPostHashHex

String

Hex of the first Post Hash to include in this page of results

NumToFetch*

uint64

Number of posts to fetch

MediaRequired

Boolean

if true, only return posts that have images, videos, or embed video URLs.

{
  "DiamondedPosts": [<PostEntryResponse>, <PostEntryResponse>] // Array of PostEntryResponses. Each post is a post created by the receiver AND received diamonds from the sender. The DiamondsFromSender attribute is populated in each PostEntryResponse. Posts are ordered by DiamondsFromSender and then by timestamp.
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Likes For Post

POST /api/v0/get-likes-for-post

Get Profiles of users who liked a given post.

Request Body

Name
Type
Description

PostHashHex*

String

Hex of Post hash for which we want to retrieve likes

Offset*

uint32

Position at which to return this page of results

Limit*

uint32

Number of profiles to return in this page of results

ReaderPublicKeyBase58Check

String

Public key of the reader

{
  "Likers": [<ProfileEntryResponse>, <ProfileEntryResponse>] // ProfileEntryResponses for users who liked this post.
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Diamonds For Post

POST /api/v0/get-diamonds-for-post

Get Profiles and number of diamonds for users who gave diamonds to a given post

Request Body

Name
Type
Description

PostHashHex*

String

Hex of Post hash for which we want to retrieve profiles and diamonds

Offset*

uint32

Position at which to return this page of results

Limit*

uint32

Number of profiles to return in this page of results

ReaderPublicKeyBase58Check

String

Public key of the reader

{
  "DiamondSenders": [
    { 
      "DiamondSenderProfile": <ProfileEntryResponse>, // Profile of the user who gave diamonds to this post
      "DiamondLevel":  2 // Number of diamonds this user gave to this post
    }
  ]
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Reposts For Post

POST /api/v0/get-reposts-for-post

Get Profiles of users who reposted (without a quote) a given post

Request Body

Name
Type
Description

PostHashHex*

String

Hex of Post hash for which we want to retrieve reposters

Offset*

uint32

Position at which to return this page of results

Limit*

uint32

Number of profiles to return in this page of results

ReaderPublicKeyBase58Check

String

Public key of the reader

{
  "Reposters": [<ProfileEntryResponse>, <ProfileEntryResponse>] // Profiles of users who reposted (without a quote) this post.
}

...coming soon! See comments in sample response for descriptions for now.

{
    // Response
}

Get Quote Reposts For Post

POST /api/v0/get-quote-reposts-for-post

Get profiles of users who quote reposted a given post and the content of the quote repost

Endpoint implementation in backend.

Request Body

Name
Type
Description

PostHashHex*

String

Hex of Post hash for which we want to retrieve quote reposters

Offset*

uint32

Position at which to return this page of results

Limit*

uint32

Number of profiles to return in this page of results

ReaderPublicKeyBase58Check

String

Public key of the reader

{
  "QuoteReposts": [<PostEntryResponse>, <PostEntryResponse>] // Post that quote reposted this quote. Each PostEntryResponse will have a ProfileEntryResponse in it.
}

...coming soon! See comments in sample response for descriptions for now.{

  "QuoteReposts": [<PostEntryResponse>, <PostEntryResponse>] // Post that quote reposted this quote. Each PostEntryResponse will have a ProfileEntryResponse in it.
}{
  "QuoteReposts": [<PostEntryResponse>, <PostEntryResponse>] // Post that quote reposted this quote. Each PostEntryResponse will have a ProfileEntryResponse in it.
}{
  "QuoteReposts": [<PostEntryResponse>, <PostEntryResponse>] // Post that quote reposted this quote. Each PostEntryResponse will have a ProfileEntryResponse in it.
}{
  "QuoteReposts": [<PostEntryResponse>, <PostEntryResponse>] // Post that quote reposted this quote. Each PostEntryResponse will have a ProfileEntryResponse in it.
}
{
    // Response
}

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetSinglePost to of a post

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetPostsForPublicKey to

Endpoint implementation in .

Example usages in 's frontend: - Make request to - Use GetHotFeed to

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetDiamondedPosts to . Example on

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetLikesForPosts to

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetDiamondsForPosts to and how many diamonds the user gave

Endpoint implementation in .

Example usages in frontend: - Make request to - Use GetRepostsForPosts to

Example usages in frontend: - Make request to - Use GetQuoteRepostsForPost to and what the quote said

3️⃣
backend
Get Single Post
get a thread view
backend
Get Posts For Public Key
get posts to display on a user's profile
backend
diamondapp.com
Get Hot Feed
get posts to display to the user in the Hot Feed tab
backend
Get Diamonded Posts
get posts in which a specific user received diamonds from another specific user
node.deso.org
backend
Get Likes For Post
show all users who have liked a po
backend
Get Diamonds For Post
show all users who have diamonded a post
backend
Get Reposts For Post
show all users who have reposted a post
Get Quote Reposts For Post
show all users who have quoted reposted a post
backend
Get Posts Stateless
global feed
get the following feed for a user
get posts ordered by time for an admin to curate the global feed
get posts from user's with the high coin prices in the last hour
ProfileEntryResponse
PostEntryResponse
BalanceEntryResponse
NFTEntryResponse
NFTCollectionResponse