Making data publicly accessible via API without high WU

Hi all,

If you need to make some data from your app publicly accessible to a high volume of requests, one way to do it is host a file with a static page containing a formatted JSON response.

An easy way to do this and be able to periodically update the data is by using CloudFlare pages. This will look at a specified Github repo and if changes are made, automatically update it, then presenting your data super fast and free across Cloudflare’s network.

Then with Make.com, or via Github API, you can periodically update the data in this file.

Remember this means the data is entirely public, so its only useful for very specific applications, but it can save a ton of WUs if its data which can be both completely public and doesnt need to be constantly up to date.

Hope this helps someone :slight_smile:

3 Likes

@despega - potentially helpful re your API post?

Could you do this all inside of Bubble by creating a page and putting the JSON onto the page and then have a api call that request text return and use that url?

1 Like

Unfortunately not, bubble do have that option for you to store a file in the directory, which works but unfortunately it’s static.

You could theoretically host the file anywhere you want though, this is just one way I’ve found works pretty smoothly and is all free :slightly_smiling_face:

1 Like

I believe the Return data workflow allows using JSON, you can do a search for the file and return its content while securing it with privacy rules

1 Like

Response type JSON
Return data as Plain Text

1 Like

Yep, you definitely can do that, this is a method for high volume use cases for example where sites want to integrate with your data and pull it on page load.

When you have lots of those, you can be getting many thousands of calls per hour etc so even the most basic API response from bubble will start costing a bit in terms of WU.

Your above example is perfect for other use cases though to lower WU costs where you still want to enforce API keys.

1 Like

For more advanced integrations, consider using Xano. They offer caching and allow you to add search filters and connect to Bubble in real-time when needed.

2 Likes

Hi @Oliver-wholegraintech , could you please elaborate more on what exactly should we do to take advantage of your suggestion? It is not very clear to me exactly what to do.

Sure, which element are you stuck on specifically?

No idea how to use cloudflare pages, or Github repo properly.

This also not clear how to do.

Also, not clear what exactly do we need to do in Bubble.

I understand that creating a detailed explanation with example might be a lot of effort. So, I was just checking. I would understand if you are not able to find time out to create that.