---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://www.yandex.ru/dev/direct/doc/en/get.md
  - https://www.yandex.ru/dev/direct/doc/ru/get.md
  - href: https://www.yandex.ru/dev/direct/doc/en/get.md
    type: text/markdown
    title: Markdown version
  - href: https://www.yandex.ru/dev/direct/doc/en/llms.txt?revision=r21714029
    rel: describedby
sourcePath: en/start/get.md
title: How to get data via the API — Yandex Direct API
description: How to get data via Yandex Direct API — API structure, standard service methods, getting objects with the get method, and paginated selection.
---
> **Documentation Index:** Fetch the complete configuration index at https://www.yandex.ru/dev/direct/doc/en/llms.txt?revision=r21714029


# Lesson 6. How to get data via the API

In this lesson, you will learn about the API structure and look at some examples of getting data.

Let's remember how objects are linked in the Yandex Direct API (see Lesson 1):

![](_assets/intro_objects_scheme.png){.border-yes}

The API provides a service for each object class: `Campaigns` for managing campaigns, `AdGroups` for managing ad groups, `Ads` for managing ads, and others. You can find the full list of services in the documentation.

The logic of working with the API objects is unified, with all the service methods assigned standard names. A service typically includes the following methods:

- `add`: Adding objects.
- `update`: Changing object parameters.
- `delete`: Deleting objects.
- `get`: Getting objects.

A service can also have other methods. For example, the `Campaigns` service provides the following methods:

![](_assets/get_methods.png){.border-yes}

## How to get objects {#get_get_obj}

Let's look at how you can get campaign parameters using the `get` method.

The `get` method is designed so that you can request only the data you need. For example, for campaigns you can get their IDs and names only, rather than all their parameters. List the names of the parameters you need in the `FieldNames` input parameter.

![](_assets/get_params.png){.border-yes}

Use the `SelectionCriteria` input structure to set criteria for selecting objects. If there are several selection criteria, the server searches for objects fitting all the criteria at once. Some services allow you to specify an empty `SelectionCriteria` structure: in this case, all objects are returned.
