---
title: Load Survey from SurveyJS Demo Service
product: Survey Creator
description: Learn how to load survey JSON schemas from SurveyJS Demo Service. View a free demo example for JavaScript to learn more.
framework: jQuery
source: https://surveyjs.io/survey-creator/examples/load-survey-json-from-service/jquery
index: https://surveyjs.io/survey-creator/examples/overview.md
---

# Load Survey from SurveyJS Demo Service (jQuery)

## Files

### `public/index.html`

```html
<link href="https://fonts.googleapis.com/css?family=Open%20Sans:400,600&display=swap" rel="stylesheet">
<!-- Uncomment the following lines to enable Ace Editor in the JSON Editor tab -->
<!-- 
<script src="https://unpkg.com/ace-builds/src-min-noconflict/ace.js"></script>
<script src="https://unpkg.com/ace-builds/src-min-noconflict/ext-searchbox.js"></script>
<script src="https://unpkg.com/ace-builds/src-min-noconflict/theme-clouds_midnight.js"></script>
-->

<div id="surveyCreatorContainer" style="position: absolute; height: 100%; width: 100%"></div>
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/service.js`

```js
export function loadSurvey(creator, surveyId) {
    const surveyServiceUrl = "https://api.surveyjs.io/public/v1/Survey";
    fetch(surveyServiceUrl + "/getSurvey?surveyId=" + surveyId)
        .then(response => {
            if (response.ok) {
                return response.json();
            }
            throw new Error("Could not load the survey JSON schema");
        })
        .then(data => {
            creator.JSON = data;
        })
        .catch(error => console.log(error));
}
```

### `src/index.js`

```js
import { SurveyCreator } from "survey-creator-js";
import "survey-core/survey.i18n";
import "survey-creator-core/survey-creator-core.i18n";
import { loadSurvey } from "./service";
import "survey-core/survey-core.css";
import "survey-creator-core/survey-creator-core.css";
import "./index.css";

import SurveyTheme from "survey-core/themes";
import { registerCreatorTheme } from "survey-creator-core";

registerCreatorTheme(SurveyTheme); // Add predefined Survey Creator UI themes

const creator = new SurveyCreator();
loadSurvey(creator, "d5220f76-4802-40cf-ad67-61d7e55608e5");
creator.render("surveyCreatorContainer");
```

### `package.json`

```json
{
  "dependencies": {
    "jquery": "latest",
    "survey-core": "latest",
    "survey-js-ui": "latest",
    "survey-creator-core": "latest",
    "survey-creator-js": "latest"
  },
  "devDependencies": {
    "react-scripts": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/survey-creator/examples/load-survey-json-from-service/angular.md)
- [React](https://surveyjs.io/survey-creator/examples/load-survey-json-from-service/reactjs.md)
- [Vue 3](https://surveyjs.io/survey-creator/examples/load-survey-json-from-service/vue3js.md)
- [Vanilla JS](https://surveyjs.io/survey-creator/examples/load-survey-json-from-service/vanillajs.md)
