Localist API

For terms of use, concepts and resources, Localist’s master API documentation can be found here: http://www.localist.com/doc/api

In this article you’ll find:

  • Basic Rules
  • Building an API Call
  • Filtering
  • Converting API results into a CSV


Basic Rules

Localist’s API is read-only and publicly accessible.

Calls will pull 10 items per page by default, but can be increased to up to 100 per page (this is well-above industry standard).

The maximum date range that the API call pull from is 370 days from today or the start date you specify.

If a start date is not specified, then the API will default to only pulling event data from today.


Building an API Call

All API calls must start with http://your.custom.domain/api/2/

Events: http://your.custom.domain/api/2/events

Places: http://your.custom.domain/api/2/places

Groups: http:/your.custom.domain/api/2/groups


Filtering

  • http://your.custom.domain/api/2/events?type=38570 (swap out events for places or groups)
  • To find the type, navigate via Content > Filters > Event Type (or other category) > Select the filter and theID is displayed in the URL of the filter’s edit page.

Paging: http://your.custom.domain/api/2/events?type=38570&pp=100&page=1

  • This will pull 100 results per page so to access the next 100 you would change the 1 in page=1 to 2, etc.

Date Range:

  • Start and End date: http://your.custom.domain/api/2/events?type=38570&pp=100&page=1& start=2014-10-01&end=2014-11-01
  • Today + number of future days: http://your.custom.domain/api/2/events?days=90 (the maximum is 370 days).

Match All

  • If you’d like to pull events that only include both filters you are specifying in your call add &match=all to the end: http://calendar.ecu.edu/api/2/events?type=27748&type=20195&match=all

Note: When building a call,? separates the path from the parameters and& separates parameters. For example, ? should only be placed after /events? or /places? or /groups? while & is used in between &start= or &end=, etc.


Converting API results into a CSV

1. Build an API call.
2. Enter the API call in your search bar and you will see the data populate.
3. Open http://konklone.io/json/ in another tab.
4. Copy and paste all data that is on the API results page and paste that information in the first box on http://konklone.io/json/.
5. Once pasted, the information will be added to the second box in a table format.
6. Select “download the entire CSV” and in this CSV you will have all available data for the first 100 results.