# 43. Query Get "Fields"

Query to get user "Fields" with filters by `labels`, `farmUuid`, `fieldUuid`, `fieldName`. The fields returned in alphabetical order by field name.&#x20;

The field filter works like AND condition, e.g. possible to filter by `farmUuid` and by `fieldUuid` and by `labels` and by `fieldName` in the one query or use just one filter condition or use no condition.&#x20;

Filter by `fieldName` works as `begins_with`.&#x20;

To implement pagination logic, use the query parameter `pageSize`. There are `lastEvaluatedKey` and `totalCount` in response, where `lastEvaluatedKey` refers to the last processed record to match the filter condition and `totalCount` is the total number of records that match the filtering conditions.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
query FilterFields {
  getFields(
    filter: {
      farmUuid: "<placeholder_of_farm_uuid>"
      fieldUuid: "<placeholder_of_field_uuid>"
      labels: [{ name: "name1", value: "value1" }]
      pageSize: 2
      lastEvaluatedKey: {
        SortKey: "<some_key>"
        PartitionKey: "<some_key>"
        TagString: "<some_key>"
      }
      fieldName: "Sample"
    }
  ) {
    fields {
      uuid
      area(unit: HECTARES)
      name
      labels {
        name
        value
      }
      totalCount
    }
    lastEvaluatedKey {
      SortKey
      PartitionKey
      TagString
    }
  }
}

```

{% endcode %}


---

# 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.geopard.tech/geopard-tutorials/api-docs/geopard-api-requests-overview/43.-query-get-fields.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.
