Topics

topics#index - Paginate topics

Parameters

Name Description
older Cursor-based pagination: Only works with ID. Get records older than the provided id. Note: Sort_by is ignored and applied afterwards.
newer Cursor-based pagination: Only works with ID. Get records newer than the provided id. Note: Sort_by is ignored and applied afterwards.
page Offset-based pagination: Get content of given page, starts at 1
per_page Any kind of pagination: define the amount of records sent per call (max 50)
sort_by Sort api response: Valid options: id, created_at, updated_at
order Sort api response: valid parameters are desc and asc
search[trending] Filter parameter: can filter only trending topics
search[follower_id] Filter parameter: can filter topics by follower user id
search[slug] Filter parameter: filter by the slug of the url

Request

Route

GET /v1/topics?older=13&per_page=5

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer your_access_token
Host: api.producthunt.com

Response

Status

200 OK

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Rate-Limit-Limit: 900
X-Rate-Limit-Remaining: 900
X-Rate-Limit-Reset: 900
ETag: "bd8d3f545dfc9e75550f4114d9847178"
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 1105

Body

{
  "topics": [
    {
      "id": 12,
      "name": "Topic 21",
      "slug": "topic-21",
      "created_at": "2017-09-14T06:02:53.327-07:00",
      "description": "",
      "followers_count": 0,
      "posts_count": 0,
      "trending": false,
      "updated_at": "2017-09-14T06:02:53.327-07:00",
      "image": null
    },
    {
      "id": 11,
      "name": "Topic 20",
      "slug": "topic-20",
      "created_at": "2017-09-14T06:02:53.308-07:00",
      "description": "",
      "followers_count": 0,
      "posts_count": 0,
      "trending": false,
      "updated_at": "2017-09-14T06:02:53.308-07:00",
      "image": null
    },
    {
      "id": 10,
      "name": "Topic 19",
      "slug": "topic-19",
      "created_at": "2017-09-14T06:02:53.295-07:00",
      "description": "",
      "followers_count": 0,
      "posts_count": 0,
      "trending": false,
      "updated_at": "2017-09-14T06:02:53.295-07:00",
      "image": null
    },
    {
      "id": 9,
      "name": "Topic 18",
      "slug": "topic-18",
      "created_at": "2017-09-14T06:02:53.283-07:00",
      "description": "",
      "followers_count": 0,
      "posts_count": 0,
      "trending": false,
      "updated_at": "2017-09-14T06:02:53.283-07:00",
      "image": null
    },
    {
      "id": 8,
      "name": "Topic 17",
      "slug": "topic-17",
      "created_at": "2017-09-14T06:02:53.270-07:00",
      "description": "",
      "followers_count": 0,
      "posts_count": 0,
      "trending": false,
      "updated_at": "2017-09-14T06:02:53.270-07:00",
      "image": null
    }
  ]
}