# Bid Adapters

**Overview**

A bid adapter represent an integration with SSP/DSP in one of the following protocols: RTB, Prebid Server, Prebid JS.\
Since every SSP/DSP requires different specific modifications to the mentioned protocols its imperative to have a way to update the UI and the request object in a way that requires as less code interventions as possible.

Using a simple JSON structure a bid adapter can modify the UI to show the required fields for each integration.

### **Prebid Server**

In a Prebid server integration all domains are known endpoints, when choosing prebid server you must enter the valid domain URL

### Prebid JS

In a Prebid JS integration all domains are known endpoints, when choosing prebid server you must enter the valid domain URL.\
Each Prebid JS integration has it's own unique "CPM Field" name, which should be typed as well

### JSON Syntax

Each field consists of 3 object keys

1. **name**: The actual name of the field that will added to the bid request
2. **type**: Can be either "text" or "number"
3. **display**: What will be the field title in the UI&#x20;

Field names that are part of the following predefined list will affect specific fields in the request, other fields will be added to imp\[0].ext field inside the bid request in case of Prebid. \
In the case that EXT params are required on an RTB request, each of the fields names must have a prefix as below:

```json
predefinedImpExt.${your_field_name}
```

1. **prd.impTagId**: imp\[0].tagId
2. **prd.appPublisherId:** request.app.publisher / request.site.publisher
3. **prd.appSiteId**: request.app.id / request.publisher.id

```json
[
    {
        "name": "prd.impTagId",
        "type": "text",
        "display": "Placement ID"
    },
    {
        "name": "context",
        "type": "select",
        "display": "Context",
        "options": [
            {
                "name": "unkown",
                "value": 0
            },
            {
                "name": "Pre-roll",
                "value": 1
            },
            {
                "name": "Mid-roll",
                "value": 2
            },
            {
                "name": "Post-roll",
                "value": 3
            },
            {
                "name": "Outstream",
                "value": 4
            }
        ]
    }
]
```


---

# 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://docs.privateadserver.com/demand/bid-adapters.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.
