# Can Builder JSON models be used as Data Sources in Pages?

**URL:** <https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661>\
**Category:** Technical Questions\
**Created:** [May 25, 2021, 5:01pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661 "2021-05-25T17:01:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jballo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jballo](https://forum.builder.io/u/jballo)\
**Post date:** [May 25, 2021, 5:01pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/1 "2021-05-25T17:01:50Z")

</div>

I added a JSON data model in Builder, to explore whether I can use that as a data source on other pages I build in the Pages feature of Builder.

Is there an easy way to link that model as a data source? In the data source feature, I know I can fetch any URL, but I wonder if there’s a more direct way to bring in Builder data sources. Plus, I’m unsure of whether I should just write out the URL including the API key in it - I want this to both the page and the JSON data model to be private. I’m not sure if it’s secure to just put a private API key in the URL for a data source.

---

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [May 26, 2021, 5:29pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/2 "2021-05-26T17:29:38Z")

</div>

Hi @jballo 👋 Thanks for reaching out!

At this time there isn’t an easy way to link the model as a data source but this is a great feature request and I’ll pass it onto our team! For now we would recommend using a URL.

Can you clarify what you mean by you want both the page and the JSON data model to be private? If you generated a private API key, you shouldn’t include this but public APIs are safe to do so.

---

<div class="post-metadata">

**Author:** ![jballo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jballo](https://forum.builder.io/u/jballo)\
**Post date:** [May 26, 2021, 5:41pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/3 "2021-05-26T17:41:56Z")

</div>

Our use case is that some of the content for a site we’re working on is in a members-only section - for that part of the site, we would create some content where both pages and data we would enter in the JSON content model would all be private-only.

---

<div class="post-metadata">

**Author:** ![jballo](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jballo](https://forum.builder.io/u/jballo)\
**Post date:** [May 26, 2021, 5:43pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/4 "2021-05-26T17:43:50Z")

</div>

Does the API key used in a Data Source ever get exposed to the front end? For now, we would serve this page from a server-side render, so the use of a private API key to fetch the initial page would be fine.

For the data sources that a page uses, I’m not clear on whether these are exposed. I’m guessing that it’s possible that Builder only returns rendered HTML, so there isn’t a risk of exposure, or perhaps it can come through somehow?

---

<div class="post-metadata">

**Author:** ![anon30523337](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon30523337](https://forum.builder.io/u/anon30523337)\
**Post date:** [May 27, 2021, 6:43pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/5 "2021-05-27T18:43:34Z")

</div>

Hi @jballo, when you add something as a data source or in the custom JS section of a content entry it becomes part of the data object for that content. Depending on how you’ve integrated Builder, you’re either loading that data object via our APIs or via one of our SDKs.

If you want to make sure this content isn’t public, then you need to ensure that you’re not making the API request or loading content via the SDKs unless the user has permission to see it.

Also if you are rendering content server-side and not making any additional Builder API requests or loading the SDK, then we’re not doing anything that would load the full data object. The end user would just see the rendered HTML. Does that make sense?

---

<div class="post-metadata">

**Author:** ![anon30523337](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon30523337](https://forum.builder.io/u/anon30523337)\
**Post date:** [May 27, 2021, 6:46pm UTC](https://forum.builder.io/t/can-builder-json-models-be-used-as-data-sources-in-pages/661/6 "2021-05-27T18:46:52Z")

</div>

There are a couple of ways of connecting different Builder models with custom inputs:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/1X/de081512cde32e6842e65c22e01aeab9c739bf19.png)

You can reference an entry from a different model and pass that full content reference to the second content entry. with a Reference input.

Alternatively, you can use the Model input and reference certain fields from another model.
