# Custom API Integration

Custom API integration gives you full control over the data used in the video.\
It’s a flexible, secure option that allows you to power personalization using real-time data from your own servers.

.

<figure><img src="/files/7zGcikNHZNVPWISuJNSa" alt="" width="329"><figcaption><p>Custom API Diagram</p></figcaption></figure>

* Enables fully custom logic and business rules
* Data is fetched directly from your backend and never exposed to Blings
* Supports advanced personalization while keeping the integration lightweight

#### Fetch Data via Custom Code

Use your own code to fetch data from an API, then pass it into the Blings player during initialization.

```js
fetch('https://my-api.example.com/user-data/123')
  .then(response => response.json())
  .then(userData => {
    BlingsPlayer.create({
      // project: {...},
      // settings: {...},
      data: userData
    });
  });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.blings.io/developers/getting-started/how-to-connect-my-data-to-the-sdk/custom-api-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
