Many of us want to stay on top of the news on the subjects we love, but we just don’t have the time to follow all the sources. And many of us have to write reports or whitepapers, but research takes up a lot of our time.
A French software company called Newscatcher provides a solution on how to catch the news that matter to you in the form of an API. I created a tutorial on how you can make the most of it for these use cases via the Bubble no-code tool.
— BetaList (@BetaList) May 10, 2020
Keep an eye on your favorite news with Bubble
Before you begin, sign up to Newscatcher and get your API key. The free trial gives you 50 API calls a month. Initially, I tested the API with Postman, which you can also do. Or you can go straight to Bubble and create a new app. To help you stay on top of your favorite topics and content with the two tools, I created a simple video tutorial. You can watch it below.
Retrieving News Data
- Install the API connector plug-in in your new Bubble app.
- Add a new API, name it (e.g. Newscatcher) and add the x-api-key header to “Shared Headers”, with your Newscatcher API key as the value.
- Add a new API call, give it a name (OUR NEWS in my example), and set use as “Data”.
- Enter “https://api.newscatcherapi.com/v2/search” as your API call and set the method to “GET”.
- Add the following parameters and values:
q = <Your keywords for news topics, e.g. API Design>
lang = “en”
countries = <Country code from which you want to receive the news, e.g. US, GB>
6. Initialize the call. You’ll see the API call return the values if it’s successful. Click “Save”.
Building a News Library
- Return to the Design tab in Bubble and create an input on the page. Call it “Keywords”.
- Create a button next to the input and give it a name.
- Create a repeating group on the page and set the type of content to be OUR NEWS’ article. Set the data source to “Get Data from an External API” and the API provider to “Newscatcher – OUR NEWS”. Then set the parameters as shown on the screenshot.
- Add some content to the group via text fields such as “Current Cell’s Our NEWS article’s TITLE”, “Author”, “Excerpt”, “Published Date” etc.
- You can also add an icon with a workflow to navigate to an external website. This should be the link to the article (Current Cell’s Our NEWS article’s link).
- Once you’ve got the data in the group configured to your preferences, add a workflow to the “Generate My News” button. Click “Start/Edit Workflow”.
- Add the first step which is “Make Changes to the Current User”. The parameter changed here is NewsKeywords where you’ll put “add” Input Keywords’ value to it. This is because you might want to keep an eye on several topics, which I will cover in the follow-up video tutorial.
- Add Step 2, which will be “Display list in Repeating Group”. The Repeating Group the one created earlier. The data source will be “Get Data from an External API”, and the parameters should be configured as specified below.
- The last part is to test it out by clicking “Preview”. If configured correctly, you can type your subject of choice into the Input field and see the relevant English-language US-based news when you click the button. As you can see below, I’ve got just that.
The Newscatcher tool is a great way to stay up-to-date with the latest news on your favorite subjects. And with the help of Bubble, you can build a database or a library of the news content retrieved by Newscatcher and use it for your writing or research needs.
YouTube: How to Build a News Content Library in Bubble – Part 1
Photo credit: The feature image is symbolic and has been done by Sue McDonald. The screenshots in the article have been taken by Kate Sukhanova for TechAcute.