---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ads.yandex.com/helpcenter/en/easy/integration/flutter/advanced-settings/targeting.md
  - https://ads.yandex.com/helpcenter/ru/easy/integration/flutter/advanced-settings/targeting.md
  - https://ads.yandex.com/helpcenter/zh/easy/integration/flutter/advanced-settings/targeting.md
  - href: en/easy/integration/flutter/advanced-settings/targeting.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/en/llms.txt

# Ad targeting

Targeting is used to set precise parameters so that users can see ads that are more relevant to them. Below is an example aligned with the current Yandex Mobile Ads SDK API.

For all ad formats, use `AdRequest` with optional `AdTargeting`.

## Targeting example (Dart) {#examples}

```dart
var adRequest = AdRequest(
  adUnitId: 'your_block_id',
  targeting: AdTargeting(
    age: 20,
    contextQuery: 'context-query',
    contextTags: ['context-tag'],
    gender: 'female',
    location: const AdLocation(latitude: 55.734202, longitude: 37.588063, accuracy: 0.1),
  ),
);
```

Pass `adRequest` to `loadAd` (or the banner constructor) as shown in the format guides.

#|
||

**Parameter**

|

**Description**

||
||

`age`

|

The user's age as a number (for example, `14`, `18`).

||
||

`gender`

|

The user's gender: `male` or `female`.

||
||

`location`

|

The user's location as detected by your app.

To use location data, obtain the user's consent and call `YandexAds.setLocationTracking(true)` in the SDK.

||
||

`contextQuery`

|

The user's search query in the app.

||
||

`contextTags`

|

Keywords from the page the user was viewing.

||
|#
