> For the complete documentation index, see [llms.txt](https://docs.relevant-digital.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.relevant-digital.com/technical/integration/javascript-api/javascript-api-overview.md).

# JavaScript API overview

#### Basic Functionality

* [relevantDigital.loadPrebid()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.loadprebid.md) - This is the fundamental function for loading ads with HB Manager. For some customers this will be the *only* function ever used in the API. ***Please read this documentation first*** as it also contains basic examples on usage of HB Manager.

#### Custom configuration of Prebid.JS and Amazon UAM/TAM

* [relevantDigital.addPrebidConfig()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.addprebidconfig.md) - To be used as a replacement for [pbjs.setConfig()](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html) in Prebid.JS.
* [relevantDigital.addAmazonConfig()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.addamazonconfig.md) - To be used as a replacement for **apstag.init()** in the Amazon JS API.

#### Instream video

*Code example and explanations:* [Instream video with HBM and GAM](https://docs.relevant-digital.com/technical/integration/formats-and-channels/instream-video-with-hbm-and-gam.md)

* [relevantDigital.defineVideoSlots()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.definevideoslots.md) - Create **VideoSlot** elements that can be loaded by the normal call to [relevantDigital.loadPrebid()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.loadprebid.md).
* [relevantDigital.loadVideoUrls()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.loadvideourls.md) - Wait for URLs to VAST XML documents loaded by combining [relevantDigital.defineVideoSlots()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.definevideoslots.md) and [relevantDigital.loadPrebid()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.loadprebid.md).
* [relevantDigital.Auction.registerImpressionByAdId()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.auction.registerimpressionbyadid.md) - Manually register an impression. Necessary for headerbid reporting when using Google's **IMA SDK**.

#### Other functionality

* [relevantDigital.destorySlots()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.destroyslots.md) - Function to be used in Single Page Applications (SPA) when navigating between content.
* [relevantDigital.getConfigs()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getconfigs.md) - This function lists the Prebid configurations in the site.
* [relevantDigital.addAuctionCallbacks()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.addauctioncallbacks.md) - Function for setting up *global* callback functions / listeners.
* [relevantDigital.addAdsCallbacks()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.addadscallbacks.md) - Function for getting consistent ad events in an adserver independent way - also while using the *direct rendering* options.
* [relevantDigital.getInstance()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getinstance.md) - Returns the internal root object of the Yield environment.
* [relevantDigital.getAdUnitInstanceByBid()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getadunitinstancebybid.md) - Function for obtaining placement-information such as the ad slot from a Prebid.js bid object.
* [relevantDigital.getBidderHandler()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.getbidderhandler.md) - Returns a "handler" for a bid's bidder. Most importantly it contains the id of the SSP in Yield.
* [relevantDigital.aliasBidder()](https://docs.relevant-digital.com/technical/integration/javascript-api/relevantdigital.aliasbidder.md) - Function to be used as a substitute for [pbjs.aliasBidder()](https://docs.prebid.org/dev-docs/publisher-api-reference/aliasBidder.html) - in very specific situations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.relevant-digital.com/technical/integration/javascript-api/javascript-api-overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
