Eventbrite api - I can't get to sort by category_id "music"

97 views Asked by At

I need to add to my eventBriteRestUrl the music category since it is the event I need to target. This is what I have so far:

var eventBriteApiKey = "MYAPIKEYHERE";
var eventBriteUrl = "https://www.eventbriteapi.com/v3/events/search/?token=" + eventBriteApiKey;

var searchUrl = eventBriteUrl + "&location.address=" + city + "&sort_by=date";

How can I add the music category to my URL?

1

There are 1 answers

0
Carolunita On

I found the answer and I want to share it in case someone else comes across the same issue.

By adding &categories=103 to my URL, it now sorts by music events. So my code now looks like this:

var eventBriteUrl = "https://www.eventbriteapi.com/v3/events/search/?token=" + eventBriteApiKey;

var searchUrl = eventBriteUrl + "&location.address=" + city + "&categories=103" + "&sort_by=date";