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: "804dcf4f1ef89294859218da5f2fe09f"
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 1105

Body

{
  "topics" : [
    {
      "id" : 12,
      "name" : "Topic 14",
      "slug" : "topic-14",
      "created_at" : "2017-07-13T13:32:14.334-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-07-13T13:32:14.334-07:00",
      "image" : null
    },
    {
      "id" : 11,
      "name" : "Topic 13",
      "slug" : "topic-13",
      "created_at" : "2017-07-13T13:32:14.322-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-07-13T13:32:14.322-07:00",
      "image" : null
    },
    {
      "id" : 10,
      "name" : "Topic 12",
      "slug" : "topic-12",
      "created_at" : "2017-07-13T13:32:14.309-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-07-13T13:32:14.309-07:00",
      "image" : null
    },
    {
      "id" : 9,
      "name" : "Topic 11",
      "slug" : "topic-11",
      "created_at" : "2017-07-13T13:32:14.296-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-07-13T13:32:14.296-07:00",
      "image" : null
    },
    {
      "id" : 8,
      "name" : "Topic 10",
      "slug" : "topic-10",
      "created_at" : "2017-07-13T13:32:14.281-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-07-13T13:32:14.281-07:00",
      "image" : null
    }
  ]
}