Following on from our introduction to AJAX, here’s an example which uses the XMLHttpRequest API to initialize an AJAX request.
AJAX Example
Have a look at the following basic structure:
...
If you’re trying to show the response on your website, you should be able to make an AJAX request to that API and display the response on your landing/website pages. If instead you’re trying to show the response within the HubSpot UI, that isn’t possible. The only way to make the items returned by that API accessible within the HubSpot UI would be to create a HubDB table and push the items into that table. Then, you could create website pages and request the items from the HubDB table. Here’s some documentation on HubDB: