---
title: "Get all posts"
method: GET
path: "/social-media/posts"
tags: ["📸 Social Media"]
---

# Get all posts

`GET /social-media/posts`

The API endpoint allows users to fetch all posts posted by themselves or other users within the social media application.

By accessing this endpoint, users can retrieve a collection of posts containing relevant information.

## Query parameters

- `page` string
- `limit` string

## Response `200`

Get all posts

- object
  - `data` object
    - `hasNextPage` boolean
    - `hasPrevPage` boolean
    - `limit` number
    - `nextPage` number
    - `page` number
    - `posts` object[]
      - `__v` number
      - `_id` string
      - `author` object
        - `__v` number
        - `_id` string
        - `account` object
          - `_id` string
          - `avatar` object
            - `_id` string
            - `localPath` string
            - `url` string
          - `email` string
          - `username` string
        - `bio` string
        - `countryCode` string
        - `coverImage` object
          - `_id` string
          - `localPath` string
          - `url` string
        - `createdAt` string
        - `dob` string
        - `firstName` string
        - `lastName` string
        - `location` string
        - `owner` string
        - `phoneNumber` string
        - `updatedAt` string
      - `comments` number
      - `content` string
      - `createdAt` string
      - `images` object[]
        - `_id` string
        - `localPath` string
        - `url` string
      - `isBookmarked` boolean
      - `isLiked` boolean
      - `likes` number
      - `tags` string[]
      - `updatedAt` string
    - `prevPage` unknown
    - `serialNumberStartFrom` number
    - `totalPages` number
    - `totalPosts` number
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/revisions/a9f3a290e4dc/schema)
