# How to pass predefined custom targeting values in ad request

Create your `AdSterAdLoader` as per the below format

```swift
let loader = AdSterAdLoader()
loader.delegate = self
loader.loadAd(adRequestConfiguration: AdRequestConfiguration(
    placement: "placement_name",
    viewController: self,
    customTargetingValues: ["test": "123"]
))
```

<details>

<summary>Single key with single value</summary>

```swift
customTargetingValues: ["test": "123"]
```

</details>

<details>

<summary>Single key with multiple values</summary>

```swift
customTargetingValues: [
    "city": ["BANGALORE", "PUNE", "MUMBAI"]
]
```

</details>

<details>

<summary>Multiple keys with single value</summary>

```swift
customTargetingValues: [
    "test1": "123",
    "test2": "324"
]
```

</details>

<details>

<summary>Multiple keys with multiple values</summary>

```swift
customTargetingValues: [
    "city": ["BANGALORE", "PUNE", "MUMBAI"],
    "country": ["INDIA", "BHUTAN"]
]
```

</details>


---

# 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://ios-docs.adster.tech/additional-features/how-to-pass-predefined-custom-targeting-values-in-ad-request.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.
