# Screener Fields

`GET` `/v1/screener/fields`

Return the catalogue of every metric the screener understands so you can build filters dynamically and validate inputs. Each field includes its id (used in filter, sort and columns), a human-readable label, its category (security, market, technicals, financials, valuation, margins, growth, dividends), its value kind (number, percent, price, dollar, marketcap, volume, enum, text, date) and whether it is filterable and sortable. The response also lists the operators each kind accepts and the columns always returned by the screener.

## Use cases

- Rendering a metric picker or filter builder UI from live metadata
- Validating metric ids and operators before issuing a screen
- Discovering the full set of available fundamental and technical fields
- Keeping integrations in sync as new metrics are added

## Output parameters

| Name | Type | Description |
| --- | --- | --- |
| `fields` | array | Every available metric. |
| `fields[].id` | string | Metric id used in filter, sort and columns. |
| `fields[].label` | string | Human-readable name. |
| `fields[].category` | string | Grouping: security, market, technicals, financials, valuation, margins, growth, dividends. |
| `fields[].kind` | string | Value kind: number, percent, price, dollar, marketcap, volume, enum, text or date. |
| `fields[].filterable` | boolean | Whether the metric can be used in a filter. |
| `fields[].sortable` | boolean | Whether the metric can be used to sort. |
| `count` | integer | Number of fields. |
| `operators` | object | Operators accepted per kind: numeric, categorical, text. |
| `default_columns` | array | Columns always returned by the screener. |

## Example response

```json
{
  "fields": [
    {
      "id": "marketCap",
      "label": "Market cap",
      "category": "market",
      "kind": "marketcap",
      "filterable": true,
      "sortable": true
    },
    {
      "id": "peRatio",
      "label": "P/E ratio",
      "category": "valuation",
      "kind": "number",
      "filterable": true,
      "sortable": true
    },
    {
      "id": "sector",
      "label": "Sector",
      "category": "security",
      "kind": "enum",
      "filterable": true,
      "sortable": true
    },
    {
      "id": "revenueGrowthYoy",
      "label": "Revenue growth YoY",
      "category": "growth",
      "kind": "percent",
      "filterable": true,
      "sortable": true
    }
  ],
  "count": 85,
  "operators": {
    "numeric": [
      "above",
      "above_or_equal",
      "below",
      "below_or_equal",
      "between",
      "equal",
      "outside"
    ],
    "categorical": [
      "equal"
    ],
    "text": [
      "contains",
      "equal"
    ]
  },
  "default_columns": [
    "ticker",
    "company",
    "sector",
    "industry",
    "country",
    "exchange",
    "price",
    "changeAbs",
    "changePct",
    "volume",
    "usdVolume",
    "marketCap"
  ]
}
```

## Examples

### cURL

```bash
curl "https://api.vantafin.com/v1/screener/fields?apiKey=$VANTAFIN_API_KEY"
```

### Python

```python
from vantafin import RESTClient

client = RESTClient("vf-live-your_api_key")

result = client.screener_fields()

print(result)
```

### JavaScript

```javascript
import { RestClient } from "vantafin";

const client = new RestClient("vf-live-your_api_key");

const result = await client.screenerFields();

console.log(result);
```

### Go

```go
package main

import (
	"fmt"
	"log"

	"github.com/vantafin/vantafin-go"
)

func main() {
	client := vantafin.NewClient("vf-live-your_api_key")

	result, err := client.ScreenerFields()
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(result)
}
```

### Java

```java
import com.vantafin.RestClient;

public class Example {
    public static void main(String[] args) throws Exception {
        RestClient client = new RestClient("vf-live-your_api_key");

        Object result = client.screenerFields();

        System.out.println(result);
    }
}
```

### Ruby

```ruby
require "vantafin"

client = Vantafin::RestClient.new("vf-live-your_api_key")

result = client.screener_fields

pp result
```
