> 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()](/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()](/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()](/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](/technical/integration/formats-and-channels/instream-video-with-hbm-and-gam.md)

* [relevantDigital.defineVideoSlots()](/technical/integration/javascript-api/relevantdigital.definevideoslots.md) - Create **VideoSlot** elements that can be loaded by the normal call to [relevantDigital.loadPrebid()](/technical/integration/javascript-api/relevantdigital.loadprebid.md).
* [relevantDigital.loadVideoUrls()](/technical/integration/javascript-api/relevantdigital.loadvideourls.md) - Wait for URLs to VAST XML documents loaded by combining [relevantDigital.defineVideoSlots()](/technical/integration/javascript-api/relevantdigital.definevideoslots.md) and [relevantDigital.loadPrebid()](/technical/integration/javascript-api/relevantdigital.loadprebid.md).
* [relevantDigital.Auction.registerImpressionByAdId()](/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()](/technical/integration/javascript-api/relevantdigital.destroyslots.md) - Function to be used in Single Page Applications (SPA) when navigating between content.
* [relevantDigital.getConfigs()](/technical/integration/javascript-api/relevantdigital.getconfigs.md) - This function lists the Prebid configurations in the site.
* [relevantDigital.addAuctionCallbacks()](/technical/integration/javascript-api/relevantdigital.addauctioncallbacks.md) - Function for setting up *global* callback functions / listeners.
* [relevantDigital.addAdsCallbacks()](/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()](/technical/integration/javascript-api/relevantdigital.getinstance.md) - Returns the internal root object of the Yield environment.
* [relevantDigital.getAdUnitInstanceByBid()](/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()](/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()](/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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
