Topics

topics#index - Filter by slug

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?search[slug]=topic-46

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

Body

{
  "topics" : [
    {
      "id" : 37,
      "name" : "Topic 46",
      "slug" : "topic-46",
      "created_at" : "2017-09-14T06:02:54.030-07:00",
      "description" : "",
      "followers_count" : 0,
      "posts_count" : 0,
      "trending" : false,
      "updated_at" : "2017-09-14T06:02:54.030-07:00",
      "image" : null
    }
  ]
}