Jump to content

Displaying dynamic content from an API call

Recommended Posts

Site URL: http://www.nycrentdeals.com/

I built a React app for a website that displays real estate listings. The data for these listings is stored in a SQL database and the React app handles the heavy lifting of querying this database and displaying the results on the frontend to the site visitor.

I'm considering switching to a more easy-to-use frontend service like Squarespace but I'm having trouble understanding if I can still use my database with Squarespace. Ideally when a visitor comes to my Squarespace site the site will query the database for the latest listings and display them. I can expose the data through a RESTful API if that's what it takes, but I can't find any Squarespace documentation explaining how to serve up the variable listings on the frontend. Is this possible? Links / resources greatly appreciated!

Thanks,

Alex

Link to comment
  • 4 weeks later...
  • Replies 2
  • Views 2.3k
  • Created
  • Last Reply
  • 2 months later...

Though is possible to serve up your variable listings using an API call to an external resource (other than the approved set), there are some limitations that may be non-starters in achieving your goal.

One issue: there does not seem to be any way to store an API key / auth info on Squarespace securely, and presumably this is why there is no documentation about how how to call non-approved resources from Squarespace.  

It seems to me that unless the resource you're calling can risk API key exposure, for example calling a free API with no real risk of a call limit overrun, Squarespace isn't currently built to handle such moves.  

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.