example-data.com
Menu
Browse docs and collections

comments

comments

Page 50 of 63.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/comments?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/comments?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/comments.d.ts https://example-data.com/types/comments.d.ts
import type { Comment, ListEnvelope } from "./types/comments";

const res = await fetch(
  "https://example-data.com/api/v1/comments?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Comment>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/comments",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 1177,
      "userId": 247,
      "targetType": "post",
      "targetId": 103,
      "body": "Aperte voluptate cogito voluptate ipsam beatae decimus fugiat vergo. Utpote sed auctor. Catena consequatur teres auctus denique approbo corpus coma acer venio.",
      "isEdited": false,
      "createdAt": "2024-09-30T08:28:47.600Z",
      "updatedAt": "2024-09-30T08:28:47.600Z"
    },
    {
      "id": 1178,
      "userId": 90,
      "targetType": "post",
      "targetId": 250,
      "body": "Ut subito benigne fugiat aedificium admitto patria. Tutis coniecto civis viridis advenio accusamus comes congregatio apud. Culpa charisma voluptatem vacuus.",
      "isEdited": false,
      "createdAt": "2025-02-15T00:51:38.463Z",
      "updatedAt": "2025-02-15T00:51:38.463Z"
    },
    {
      "id": 1179,
      "userId": 214,
      "targetType": "post",
      "targetId": 163,
      "body": "Ciminatio taedium odio architecto cena decretum universe tener vulgo amo. Textilis distinctio ipsum strenuus spiritus quaerat unde libero. Cupiditas optio minus creta mollitia aestas ratione corrumpo magni subito. Calamitas conforto deripio taceo abeo soluta cras pel.",
      "isEdited": false,
      "createdAt": "2025-01-01T19:51:20.767Z",
      "updatedAt": "2025-01-01T19:51:20.767Z"
    }
  ],
  "meta": {
    "page": 50,
    "limit": 24,
    "total": 1500,
    "totalPages": 63
  },
  "links": {
    "self": "/api/v1/comments?page=50&limit=24",
    "first": "/api/v1/comments?page=1&limit=24",
    "last": "/api/v1/comments?page=63&limit=24",
    "next": "/api/v1/comments?page=51&limit=24",
    "prev": "/api/v1/comments?page=49&limit=24"
  }
}