Home

Classroom Transcript: Widgets vs. the API

The following is the transcript of our “Widgets vs. the API” Localist Lesson.

In this Localist Lesson, we’ll be breaking down when and how you should use Widgets or the API to curate your Localist events for promotional efforts.

Curation Tools

Widgets and the API enable admins and users to create events once in Localist then curate and publish them on other web pages. Both tools are publicly accessible. Widgets are generated by using the public Localist Widget Builder in just a few clicks, whereas events are pulled via the API with standard HTTP calls.

Tech Specs

Widgets. Once you’ve set your criteria in the Widget Builder, you will generate an embed code. This will produce fully formatted HTML based off of one of the three Localist provided templates, or a custom template of your design. This means no extra work will be required on your part at this time — just generate the embed code and place it on any webpage!

The API. In comparison, The API returns raw JSON data that is not styled or formatted. This means your team will be responsible for styling the presentation and building an application that can ingest and parse the JSON data.

In short, Widgets are a quick, non-technical solution, whereas the API is a more involved process that requires advanced technical knowledge.

Data

Widgets. When it comes to what you can do with Widget data, you can only display the data on other web pages. Widgets are also cached to load extremely quickly, which means the data is not instantaneously updated. Lastly, the querying parameters are “what you see, is what you get” in the Widget Builder.

The API. This data can also be used for displaying data on another page, but unlike Widgets, the API data can also be integrated into another system, such as an email marketing tool. Since the API is designed to provide impeccably up-to-date data, this can mean slower load times. Finally, the Localist API provides every piece of event data and it can be manipulated with extremely customized querying.

The Ultimate Question

So, what does all of this mean? There is one question you can ask yourself to immediately identify which tool is best suited for your needs:

“Am I looking to integrate Localist content into another system’s internal interface?” If the answer is yes, then use the API, if no – use Widgets. It’s as simple as that!