# get category id from article id

**URL:** <https://forum.shopware.com/t/get-category-id-from-article-id/67403>\
**Category:** Programmierung\
**Created:** [3. Juni 2020 um 20:30 UTC](https://forum.shopware.com/t/get-category-id-from-article-id/67403 "2020-06-03T20:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sas05](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@sas05](https://forum.shopware.com/u/sas05)\
**Post date:** [3. Juni 2020 um 20:30 UTC](https://forum.shopware.com/t/get-category-id-from-article-id/67403/1 "2020-06-03T20:30:49Z")

</div>

Hi,

I would like to check my busket item category. I would like to restrict them by category.

if there is a way to check like $sArticle-\>categories()?

or I need to do query?

thanks in advance
