# String extractor

If you want to extract a value based on a tag name you can create your own string extractor.

You just need to implement[ this interface](https://github.com/alexisvisco/kcd/blob/master/pkg/extractor/extractors.go#L8):&#x20;

```go
type Strings interface {
	Extract(req *http.Request, res http.ResponseWriter, valueOfTag string) ([]string, error)
	
	Tag() string // the tag is for instance query, path or watever you want. 
	             // Then in your inputs structures you can use `watever:"something"`
}
```

Then before declaring your routes add your interface implementation to the list of StringsExtractors in the config.&#x20;

Like that:

```go
kcd.Config.StringsExtractors = append(kcd.Config.StringsExtractors, YourExtractor{})
```
