Topics

topics#index - sort by created_at

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?sort_by=created_at&order=asc

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

Body

{
  "topics" : [
    {
      "id" : 52,
      "name" : "Topic 61",
      "slug" : "topic-61",
      "created_at" : "2017-09-09T06:02:54.573-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-09-14T06:02:54.582-07:00",
      "image" : null
    },
    {
      "id" : 51,
      "name" : "Topic 60",
      "slug" : "topic-60",
      "created_at" : "2017-09-11T06:02:54.562-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-09-14T06:02:54.569-07:00",
      "image" : null
    },
    {
      "id" : 50,
      "name" : "Topic 59",
      "slug" : "topic-59",
      "created_at" : "2017-09-12T06:02:54.549-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-09-14T06:02:54.557-07:00",
      "image" : null
    }
  ]
}