Search code examples
phpapiparentcategoriesfoursquare

Get parent category of a given venue


I'm a bit new to this API, and was wondering if someone could help me for the request to get the parent category of a given venue. For instance, I request a venue that is categories as a 'bar', its parent category is 'nightlife spot'.


Solution

  • I am not sure the API can give you that directly (or in other words, there is no /category/id/parent endpoint or something similar)

    What you can do, is get all the categories, build the tree and then you can get the parent by yourself.

    To get the categories tree use the /venue/categories endpoint.