example-data.com
Menu
Browse docs and collections

comments

comments

Page 48 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": 1129,
      "userId": 115,
      "targetType": "post",
      "targetId": 357,
      "body": "Ultio ciminatio spes vulnus ulterius aperiam. Taedium adulatio cado molestiae aspernatur stipes apto peior copia. Attero despecto corroboro delibero cotidie accusator accusator bonus.",
      "isEdited": false,
      "createdAt": "2025-01-21T05:53:06.308Z",
      "updatedAt": "2025-01-21T05:53:06.308Z"
    },
    {
      "id": 1130,
      "userId": 168,
      "targetType": "post",
      "targetId": 388,
      "body": "Cresco bestia abeo via dicta decet. Officia contego cohors cubicularis substantia. Capto totam caterva corrumpo depopulo patria. Tyrannus conculco demum.",
      "isEdited": false,
      "createdAt": "2024-12-12T19:57:51.485Z",
      "updatedAt": "2024-12-12T19:57:51.485Z"
    },
    {
      "id": 1131,
      "userId": 176,
      "targetType": "post",
      "targetId": 116,
      "body": "Abundans centum peccatus dignissimos convoco aut patrocinor vestrum. Vinculum adnuo cetera temeritas tremo stabilis. Adsum enim villa derelinquo carmen alias tollo ventito enim.",
      "isEdited": false,
      "createdAt": "2025-01-09T04:30:51.356Z",
      "updatedAt": "2025-01-09T04:30:51.356Z"
    }
  ],
  "meta": {
    "page": 48,
    "limit": 24,
    "total": 1500,
    "totalPages": 63
  },
  "links": {
    "self": "/api/v1/comments?page=48&limit=24",
    "first": "/api/v1/comments?page=1&limit=24",
    "last": "/api/v1/comments?page=63&limit=24",
    "next": "/api/v1/comments?page=49&limit=24",
    "prev": "/api/v1/comments?page=47&limit=24"
  }
}