latitude longitude city country in response of search events | Search on based on city/country

340 views
Skip to first unread message

aneela....@gmail.com

unread,
Jun 24, 2017, 12:11:11 PM6/24/17
to Eventbrite API
Hi all,

I'm hitting the following API endpoint

https://www.eventbriteapi.com/v3/events/search/?token=OAuthToken&location.address=UK&sort_by=distance


Hi,

I have two problems:

1) I want to search the events based on particular city or country like London or UK. How can i achieve that?

2) I want to see the latitude/longitude info in the response of all events. Because i want to merge the response with my own list of events and sort them all based on distance. Please help me with that.

Thanks

Barrett Cook

unread,
Jun 26, 2017, 5:13:35 PM6/26/17
to Eventbrite API
1) Try using the location.address and location.within parameters on /events/search. Or you can use a viewport to specify a bounding box for the area you'd like to search.

aneela saleem

unread,
Jun 28, 2017, 6:26:54 AM6/28/17
to Eventbrite API
Hi Barrett,

Thanks for replying. I want to see all the events in Pakistan and i'm hitting the following endpoint:


It also shows the events from India i.e.,

{ "name": { "text": "DomainX™ 2017 Conference, New Delhi", "html": "DomainX™ 2017 Conference, New Delhi" }, "description": { "text": "Since inception in 2014, DomainX™ has been a dedicated annual domain name conference with multiple yearly events across the globe to network, spread awareness and educate public about domain names and the industry.\nOn 5th August, at DomainX. ", "html": "<P>Since inception in 2014, DomainX™ has been a dedicated annual domain name conference with multiple yearly events across the globe to network, spread awareness and educate public about domain names and the industry.</P>\n<P><P>With record-breaking participation at previous editions of DomainX™, there is no better opportunity for budding domain name owners, investors and entrepreneurs to connect and learn from experts.</P>\nFor Speakers &amp; Agenda details, please visit <A HREF=\"http://www.domainxevents.com/newdelhi/\" TARGET=\"_blank\" REL=\"noreferrer noopener nofollow noopener noreferrer nofollow\">www.domainxevents.com/newdelhi</A></P>\n<P><EM>Terms: Tickets are non-refundable &amp; non-transferable. </EM></P>" }, "id": "32650946861", "url": "https://www.eventbrite.com/e/domainxtm-2017-conference-new-delhi-tickets-32650946861?aff=ebapi", "vanity_url": "https://domainx17.eventbrite.com", "start": { "timezone": "Asia/Kolkata", "local": "2017-08-05T10:00:00", "utc": "2017-08-05T04:30:00Z" }, "end": { "timezone": "Asia/Kolkata", "local": "2017-08-05T18:00:00", "utc": "2017-08-05T12:30:00Z" }, "created": "2017-03-08T12:05:11Z", "changed": "2017-06-23T11:03:05Z", "capacity": 300, "capacity_is_custom": true, "status": "live", "currency": "USD", "listed": true, "shareable": true, "online_event": false, "tx_time_limit": 480, "hide_start_date": false, "hide_end_date": false, "locale": "en_US", "is_locked": false, "privacy_setting": "unlocked", "is_series": false, "is_series_parent": false, "is_reserved_seating": false, "source": "create_2.0", "is_free": false, "version": "3.0.0", "logo_id": "29172568", "organizer_id": "6746731831", "venue_id": "18676037", "category_id": "101", "subcategory_id": "1999", "format_id": "1", "resource_uri": "https://www.eventbriteapi.com/v3/events/32650946861/", "logo": { "crop_mask": { "top_left": { "x": 0, "y": 0 }, "width": 1024, "height": 512 }, "original": { "url": "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F29172568%2F105474288707%2F1%2Foriginal.jpg?s=c344a4b547fcdd9a1fa598cf7d79ba84", "width": 1024, "height": 512 }, "id": "29172568", "url": "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F29172568%2F105474288707%2F1%2Foriginal.jpg?h=200&w=450&rect=0%2C0%2C1024%2C512&s=40e78c17421c59f093215093b5549ce6", "aspect_ratio": "2", "edge_color": null, "edge_color_set": true }, "venue": { "address": { "address_1": null, "address_2": null, "city": "New Delhi", "region": "DL", "postal_code": null, "country": "IN", "latitude": "28.6139391", "longitude": "77.20902120000005", "localized_address_display": "New Delhi, DL", "localized_area_display": "New Delhi, DL", "localized_multi_line_address_display": [ "New Delhi, DL" ] }, "resource_uri": "https://www.eventbriteapi.com/v3/venues/18676037/", "id": "18676037", "name": "New Delhi", "latitude": "28.6139391", "longitude": "77.20902120000005" } }

Please help.

Barrett Cook

unread,
Jun 28, 2017, 5:11:26 PM6/28/17
to Eventbrite API
Looks like those are the same results are returned by the regular search, not just over the API: https://www.eventbrite.com/d/pakistan/events/

Unfortunately, country boundaries are difficult. The search team is aware of this problem. Currently, the way search currently works is one-of:
  1. Search for an address (in this case: "Pakistan") which returns a lat/lon for the center location. We then expand by radius to include more events.
or

In the future, we hope to support Geo Shapes for more accurate definitions of country boundaries. For now, it might be easier to piece together the list by conducting a search surrounding major cities: https://www.eventbriteapi.com/v3/events/search/?location.address=karachi&token=TOKEN&expand=venue

Hope that helps.

Finbar Gillen

unread,
Aug 21, 2017, 10:25:52 AM8/21/17
to Eventbrite API
Hi Barrett,

I have been using your info above to get information on events within certain areas. I have a few queries:

1. Is it possible to limit the amount of fields you get back from one of these searches?

2. Is there a library to look up category ids, subcategory ids etc?

I am looking to bring location of events into a Geographical Information Systems for analysis.

Regards
Finbar

Barrett Cook

unread,
Aug 21, 2017, 1:28:34 PM8/21/17
to Eventbrite API
1. Unfortunately, not at this time.

2. For category ids, checkout the docs here: https://www.eventbrite.com/developer/v3/endpoints/categories/

Finbar Gillen

unread,
Aug 22, 2017, 5:27:13 AM8/22/17
to Eventbrite API
Barrett,

Thanks for the quick response. I am using the link below to spit out events, the only thing missing is the latitude and longitude points for each event. 

Is there a way to get these?

https://www.eventbriteapi.com/v3/events/search/?location.address=kilkenny&token=MyToken

Regards
Finbar

Hernán Cussi

unread,
Aug 24, 2017, 2:10:39 PM8/24/17
to Eventbrite API
Reply all
Reply to author
Forward
0 new messages