Skip to content

Top 4

GET /api/public/:username/top4

Returns user top picks grouped by category.

ParamTypeRequiredDescription
usernamestringyesInteris username to resolve

None.

{
"categories": [
{
"id": 1,
"key": "cinema",
"supported": true,
"items": [
{
"slot": 1,
"mediaType": "movie",
"mediaSource": "tmdb",
"mediaSourceId": "550",
"entityId": 123,
"tmdbId": 550,
"title": "Fight Club",
"posterPath": "/a.jpg",
"releaseYear": 1999
}
]
},
{
"id": 2,
"key": "serial",
"supported": true,
"items": []
}
]
}
  • Categories are currently fixed to cinema (id: 1) and serial (id: 2).
  • items are sorted by slot.
  • entityId and tmdbId can be null for unresolved/non-TMDB records.
  • Existing users still receive categories.
  • A category with no picks returns items: [].
  • 404 when username does not exist.
  • 429 when the public rate limit is exceeded.
  • 500 for unexpected server errors.
const res = await fetch(`https://api.interis.gorkemkaryol.dev/api/public/your_username/top4`);
if (!res.ok) throw new Error(`Top4 failed: ${res.status}`);
const data = await res.json();
const cinema = data.categories.find((category) => category.key === 'cinema');
console.log(cinema?.items ?? []);
Terminal window
curl "https://api.interis.gorkemkaryol.dev/api/public/your_username/top4"
function toTopPickSections(response) {
return response.categories.map((category) => ({
key: category.key,
heading: category.key === 'cinema' ? 'Top 4 Films' : 'Top 4 Series',
items: category.items,
}));
}

Next: Recent endpoint