Welcome to Genhike Sports

GET /api/v1/{model}

Source app/api/ApiController.php@44492cfc3aef Parameters and errors scanned from contentList() Rendered at 2026-11-23 20:58:55
Method
GET
Path
/api/v1/{model}
Auth
Token required (Authorization: Bearer, X-Api-Key or ?key=)
Handler
ApiController::contentList()
Routing
Model code plus one path segment maps to contentList(); the token must also be allowed to read that model
Description
Content list (paging, category, tag, keyword, sorting, flags)

Parameters

The parameter set, types and defaults are scanned out of the endpoint source. A ✓ next to Required means the exact source line that rejects the missing value is still present in the method body, which the reconciler re-checks every run.

Parameter Type Required Default Notes Origin / evidence
category string no '' Category id or slug. A category that belongs to another model returns 404 rather than an empty list Request::str
flag string no '' Flag filter: top, recommend or hot; any other value is ignored Request::str
keyword string no '' Keyword filter over the model searchable fields (same semantics as /search in and mode) Request::str
lang string no zh Language code (zh / en). Defaults to the site default language; a token language allow-list still applies resolveLang()
order string no '' Sort allow-list: newest (default), hot by views, sort by sort order. Any other value is ignored Request::str
page int no 1 Page number, starting at 1; values below 1 are clamped to 1 pageParams()
per_page int no 12 Items per page. When omitted (or <=0) the site list page size is used, capped by api_page_max pageParams() [min(api_page_max=50, list page size)]
tag string no '' Tag slug; only content carrying that tag is returned Request::str

Response sample

not captured yet Run php cli/build-manual.php --capture; the reconciler reports a missing sample as a failure.

Error codes

Code Meaning Scope
400 Unknown language Parameter validation
401 Invalid API token
403 This token may not access that model
403 This token may not access that language Authorization
404 Endpoint not found
404 Category not found Parameter validation
404 Unknown content model
405 Read-only API: GET is the only supported method
429 Too many requests, please retry later
500 Internal server error
503 The open API is not enabled on this site

Example call

The URL is built from the registry path plus real parameters from this site; replace the token with your own.

curl -sS \
  -H 'Authorization: Bearer ' \
  -H 'Accept: application/json' \
  'https://www.genhikesports.com/api/v1/{model}'
Placeholder Value on this site
{model} news
{slug} heng-air-6-3-launch

Common scenarios

  • Home or category listings: paginate and filter by category; the body is never included, so responses stay small
    /api/v1/{model}?category={slug}&per_page=10&order=newest
  • Popular content: order=hot sorts by views
    /api/v1/{model}?order=hot&per_page=5

← /api/v1/search · /api/v1/{model}/{id|slug} → · All endpoints

Send an Enquiry