> For the complete documentation index, see [llms.txt](https://docs.goodfit.io/goodfit-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goodfit.io/goodfit-docs/apis/dataset-api/companies.md).

# Companies

## GET /dataset/companies/{domain}

> Get a company by domain

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/companies/{domain}":{"get":{"operationId":"dataset:getCompany","summary":"Get a company by domain","tags":["Companies"],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Primary domain, without scheme or path","type":"string","minLength":1}},{"name":"data_points","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"fieldNames of the data points to return, from the data points list. The identifying data points always come back. Omit for every data point; [\"*\"] also means every one; [] means only the identifying data points","anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"string","minLength":1,"maxLength":200}]}}],"responses":{"200":{"description":"Get a company by domain","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"company":{"type":"object","properties":{"__company_id":{"type":"string"},"__added_at":{"type":"string"},"__updated_at":{"type":"string"}},"required":["__company_id","__added_at","__updated_at"],"additionalProperties":{}}},"required":["company"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No company in your dataset has this domain","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["NOT_FOUND"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## GET /dataset/companies

> List companies

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/companies":{"get":{"operationId":"dataset:listCompanies","summary":"List companies","tags":["Companies"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Rows per page, 1 to 1000","default":100,"type":"integer","minimum":1,"maximum":1000}},{"name":"iterator","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Opaque cursor from a previous response. Omit for the first page","type":"string","minLength":1}},{"name":"updated_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Only rows updated on or after this date","type":"string","minLength":1}},{"name":"added_since","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Only rows added on or after this date","type":"string","minLength":1}},{"name":"segment_id","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"Only companies currently in this segment","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"data_points","in":"query","required":false,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"fieldNames of the data points to return, from the data points list. The identifying data points always come back. Omit for every data point; [\"*\"] also means every one; [] means only the identifying data points","anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"string","minLength":1,"maxLength":200}]}}],"responses":{"200":{"description":"List companies","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"companies":{"type":"array","items":{"type":"object","properties":{"__company_id":{"type":"string"},"__added_at":{"type":"string"},"__updated_at":{"type":"string"}},"required":["__company_id","__added_at","__updated_at"],"additionalProperties":{}}},"totalCompanies":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextIterator":{"description":"Pass as `iterator` to fetch the next page. Null on the last page","anyOf":[{"type":"string"},{"type":"null"}]},"hasMoreResults":{"type":"boolean"}},"required":["companies","totalCompanies","nextIterator","hasMoreResults"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No segment in your account has this segment_id","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["NOT_FOUND"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## GET /dataset/companies/fields

> List company data points

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/companies/fields":{"get":{"operationId":"dataset:listCompanyFields","summary":"List company data points","tags":["Companies"],"responses":{"200":{"description":"List company data points","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"fieldName":{"description":"Name to use in filters and in the response body","type":"string"},"displayName":{"description":"The name shown in the Goodfit app","type":"string"},"fieldType":{"type":"string","enum":["String","Picklist","Number","Percentage","Currency","Date","Boolean","Multipicklist","Array","Integer"]},"operators":{"description":"Operators accepted for this data point in POST /companies/search","type":"array","items":{"description":"Comparison applied to the data point","type":"string","enum":["exists","notExists","stringEqualOneOf","stringNotEqualOneOf","stringContainsOneOf","stringNotContainsOneOf","equalTo","notEqualTo","gt","gte","lt","lte","between","booleanTrue","booleanFalse","booleanFalseOrNull","arrayContainsAnyOf","arrayNotContainsAnyOf","arrayContainsAnySubstring","arrayNotContainsAnySubstring","arrayLengthGt","arrayLengthGte","arrayLengthLt","arrayLengthLte","dateEqual","dateNotEqual","dateSince","dateBefore","dateBetween","dateSinceRelative","dateBeforeRelative"]}},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isIntel":{"description":"Whether this is intel: a data point answering a higher-level question, e.g. \"Sells to enterprises?\"","type":"boolean"}},"required":["fieldName","displayName","fieldType","operators","description","isIntel"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## POST /dataset/companies/search

> Search companies

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/companies/search":{"post":{"operationId":"dataset:searchCompanies","summary":"Search companies","tags":["Companies"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filters":{"description":"Filter group over the data points listed by GET /companies/fields"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":1000},"iterator":{"type":"string"},"data_points":{"description":"fieldNames of the data points to return, from the data points list. The identifying data points always come back. Omit for every data point; [\"*\"] also means every one; [] means only the identifying data points","anyOf":[{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"string","minLength":1,"maxLength":200}]}},"required":["filters"]}}}},"responses":{"200":{"description":"Search companies","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"companies":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"totalCompanies":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextIterator":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMoreResults":{"type":"boolean"}},"required":["companies","totalCompanies","nextIterator","hasMoreResults"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```
