# Steps

Use the `stepsCounter` query to obtain the total number of steps logged by the user for the specified date range.

### Required Arguments

<table data-header-hidden><thead><tr><th></th><th width="219"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Description</td></tr><tr><td><code>start</code></td><td>Date!</td><td>The start date when the steps will be counted. Use the format: <code>YYYY-MM-DD</code></td></tr><tr><td><code>end</code></td><td>Date!</td><td>The end date when the steps will be counted. Use the format: <code>YYYY-MM-DD</code></td></tr><tr><td><code>first</code></td><td>Int</td><td>Retrieves the first results from the list.</td></tr><tr><td><code>after</code></td><td>String</td><td> It takes the <em>cursor type</em> and retrieves results after that position.</td></tr><tr><td><code>id</code></td><td>ID</td><td>Id of desired tracking record.</td></tr></tbody></table>

### Available Fields

|             |           |                                                          |
| ----------- | --------- | -------------------------------------------------------- |
| Field Name  | Type      | Description                                              |
| `dailyGoal` | Int!      | Daily steps goal.                                        |
| `distance`  | Float!    | Distance travelled from steps                            |
| `steps`     | Int!      | Total steps                                              |
| `datetime`  | DateTime! | Date the user logged their steps `YYYY-MM-DDT hh:mm:ssZ` |
| `id`        | ID!       | Id of the record.                                        |
| `source`    | String!   | Source of input, **default** is set to **suggestic**.    |

### Example

{% tabs %}
{% tab title="Request" %}

```graphql
query{
  stepsCounter(start:20220831 end:20220901){
   dailyGoal
   distance
    edges{
      node{
        steps
        source
        datetime
        id
      }
    }
    
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "stepsCounter": {
      "dailyGoal": 1,
      "distance": 6.4,
      "edges": [
        {
          "node": {
            "steps": 8000,
            "source": "Suggestic",
            "datetime": "2022-09-01T00:00:00+00:00"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
