---
title: "FieldSpec"
description: "one field of an extraction: its name, how it is found (a CSS selector, an XPath, a regular expression, a JSON path), the attribute read, its type, whether many, and nested fields"
section: concepts
address: /concepts/fieldspec
contract: 0476e35e6e275db5
---

# FieldSpec

one field of an extraction: its name, how it is found (a CSS selector, an XPath, a regular expression, a JSON path), the attribute read, its type, whether many, and nested fields

[figure: FieldSpec is a value at none scope. The drawing shows its fields and the objects that they point at.]

| property | value |
|---|---|
| kind | value |
| scope | none |
| key | none |
| store | none |
| family | sources |



## Fields


| field | type | required | note |
|---|---|---|---|
| `name` | `text` | yes |  |
| `selector_kind` | `one of css \| xpath \| regex \| json path` | yes |  |
| `selector` | `text` | yes |  |
| `attribute` | `text` | no | text by default; for a pattern, where it runs: the visible text by default, address (the page's own address), nodes (the text nodes joined by a bar) or html (the page's markup, or the item's inside a list, so an identity kept in a data attribute or a link is read the same way on every surface) |
| `type` | `text` | yes | a type of the register |
| `many` | `bool` | yes |  |
| `fields` | [FieldSpec](/concepts/fieldspec) | no | nested |



## Routes that use it
No route takes or returns FieldSpec directly. The record holds it, and the objects that point at it reach it.
