Skip to main content
GET
method
/posts
path

Query Parameters

Below are the query parameters available for customizing the response:
id
string | undefined
Unique identifier for filtering specific post(s).
Search term for filtering posts.
boardId
string
Filter posts by the board they are associated with.
statusId
string | undefined
Filter posts based on their status.
postedById
string | undefined
Filter posts by the user who posted them.
sortBy
top | latest
default:"latest"
Sort posts by ‘top’ or ‘latest’.
limit
1-100
default:"10"
Number of posts retrieved per request.
page
1-n
default:"1"
Pagination sequence number.
// Replace API_KEY with your api key
curl --location 'https://api.supahub.com/api/v1/posts?limit=10&page=1' \
--header 'Authorization: Bearer API_KEY'
const myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer API_KEY"); // Replace API_KEY with your api key

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow",
};

fetch("https://api.supahub.com/api/v1/posts?limit=10&page=1", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
const axios = require("axios");

let config = {
  method: "get",
  maxBodyLength: Infinity,
  url: "https://api.supahub.com/api/v1/posts?limit=10&page=1",
  headers: {
    Authorization: "Bearer API_KEY", // Replace API_KEY with your api key
  },
};

async function makeRequest() {
  try {
    const response = await axios.request(config);
    console.log(JSON.stringify(response.data));
  } catch (error) {
    console.log(error);
  }
}

makeRequest();
import requests

url = "https://api.supahub.com/api/v1/posts?limit=10&page=1"

headers = {
  'Authorization': 'Bearer API_KEY' # Replace API_KEY with your key.
}

response = requests.request("GET", url, headers=headers)

print(response.text)