> ## Documentation Index
> Fetch the complete documentation index at: https://developers.nutshell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a list of accounts

Get all accounts and associated data in your Nutshell instance. Accounts are companies or organizations that you do business with, and are referred to as 'Companies' in the Nutshell UI.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/accounts": {
      "get": {
        "tags": [
          "Accounts (Companies)"
        ],
        "summary": "Get a list of accounts",
        "description": "Get all accounts and associated data in your Nutshell instance. Accounts are companies or organizations that you do business with, and are referred to as 'Companies' in the Nutshell UI.",
        "operationId": "ee7a9535ab7ae30da91d6d9cebe2ed85",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "query for accounts associated with a specific email address",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Used to search all related info on an entity. Returns all entities that are similar to the query term.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "style": "deepObject",
            "explode": true,
            "schema": {
              "description": "Filter the returned accounts based on various criteria. Use /rest/accounts/list/fields to get a full list of valid filter keys.",
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/FilterInput"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort the returned list by a chosen field. Use a '-' before the field name to sort in descending order. ",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "-accountType",
                  "-createdTime",
                  "-industry",
                  "-lastContactedTime",
                  "-name",
                  "-numberOfContacts",
                  "-owner",
                  "-phone",
                  "-postalCode",
                  "-territory",
                  "accountType",
                  "createdTime",
                  "industry",
                  "lastContactedTime",
                  "name",
                  "numberOfContacts",
                  "owner",
                  "phone",
                  "postalCode",
                  "territory"
                ]
              }
            }
          },
          {
            "name": "page[limit]",
            "in": "query",
            "description": "Limit the number of results returned, for pagination.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page[page]",
            "in": "query",
            "description": "Request a specific page of results, for pagination. Used in conjunction with the page[limit] parameter. Indexing is 0-based.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "accounts",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "meta": {
                      "allOf": [
                        {
                          "properties": {
                            "count": {
                              "description": "The number of returned accounts",
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "properties": {
                            "total": {
                              "description": "The total number of accounts in your Nutshell instance",
                              "type": "integer",
                              "format": "int32"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "properties": {
                            "facets": {
                              "description": "Contains an AccountType object, which lists the id and count for each account type in your instance",
                              "properties": {
                                "AccountType": {
                                  "properties": {
                                    "n-accountTypes": {
                                      "description": "The number of accounts with the account type id n-accountTypes, where n is an integer",
                                      "type": "integer",
                                      "format": "int32"
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "$ref": "#/components/schemas/meta"
                        }
                      ]
                    },
                    "accounts": {
                      "description": "An array of returned accounts.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Account"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FilterInput": {
        "description": "The key-value pair for the filter, ex. filter[tags]=1-tags",
        "type": "string"
      },
      "Account": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Peep"
          },
          {
            "$ref": "#/components/schemas/Avatarable"
          },
          {
            "$ref": "#/components/schemas/HtmlLinkable"
          },
          {
            "properties": {
              "href": {
                "type": "string"
              },
              "revenue": {
                "properties": {
                  "amount": {
                    "type": "string",
                    "example": "8675309.00"
                  },
                  "formatted": {
                    "type": "string",
                    "example": "$8,675,309.00"
                  }
                },
                "type": "object"
              },
              "employeeCount": {
                "type": "integer"
              }
            },
            "type": "object"
          }
        ]
      },
      "Peep": {
        "properties": {
          "id": {
            "description": "The API ID of this entity, formatted {integer}-{entityType}",
            "type": "string",
            "example": "3-contacts"
          },
          "name": {
            "description": "The entity's full name.",
            "type": "string",
            "example": "Andy Nutshell"
          },
          "description": {
            "description": "A brief explanation of this entity which appears under their name.",
            "type": "string",
            "example": "CEO / cofounder @ Nutshell. Building growth software, wrangling beagles 🐶"
          },
          "createdTime": {
            "description": "Unix timestamp",
            "type": "integer",
            "format": "int64"
          },
          "deletedTime": {
            "description": "Unix timestamp",
            "type": "integer",
            "format": "int64"
          },
          "emails": {
            "$ref": "#/components/schemas/emails"
          },
          "addresses": {
            "$ref": "#/components/schemas/addresses"
          },
          "phones": {
            "$ref": "#/components/schemas/phones"
          },
          "urls": {
            "$ref": "#/components/schemas/urls"
          }
        },
        "type": "object"
      },
      "emails": {
        "description": "All email addresses associated with an entity.",
        "type": "array",
        "items": {
          "properties": {
            "isPrimary": {
              "description": "If entity has multiple email addresses, which should be used as the primary point of contact.",
              "type": "boolean",
              "example": true
            },
            "name": {
              "description": "A label for the email address, e.g. 'work', 'personal', 'support'.",
              "type": "string",
              "example": "personal"
            },
            "value": {
              "description": "The email address itself.",
              "type": "string",
              "example": "andy@nutshell.com"
            }
          },
          "type": "object"
        }
      },
      "addresses": {
        "description": "All addresses associated with an entity.",
        "type": "array",
        "items": {
          "properties": {
            "isPrimary": {
              "description": "Should this address be used if there are multiple",
              "type": "boolean",
              "example": true
            },
            "name": {
              "description": "A label for the address, e.g. 'work', 'home', 'shipping'.",
              "type": "string",
              "example": "address"
            },
            "value": {
              "description": "The geographic coordinates for the address.",
              "properties": {
                "location": {
                  "properties": {
                    "longitude": {
                      "type": "number",
                      "example": -83.732124
                    },
                    "latitude": {
                      "type": "number",
                      "example": 42.279594
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            },
            "locationAccuracy": {
              "description": "How specific the address is. 8 is an exact street address, 1 is only a country.",
              "type": "string",
              "example": "8"
            },
            "address_1": {
              "description": "Primary street address",
              "type": "string",
              "example": "206 E Huron St"
            },
            "address_2": {
              "description": "Secondary street address, such as a suite or apartment number",
              "type": "string",
              "example": "Suite 200"
            },
            "address_3": {
              "type": "string"
            },
            "city": {
              "description": "City or town",
              "type": "string",
              "example": "Ann Arbor"
            },
            "state": {
              "description": "State or province",
              "type": "string",
              "example": "MI"
            },
            "postalCode": {
              "description": "ZIP or postal code",
              "type": "string",
              "example": "48103"
            },
            "country": {
              "description": "Country code",
              "type": "string",
              "example": "US"
            },
            "timezone": {
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "phones": {
        "type": "array",
        "items": {
          "properties": {
            "isOptedOut": {
              "description": "If this number has opted out of receiving SMS messages",
              "type": "boolean",
              "example": true
            },
            "isPrimary": {
              "description": "Should this phone number be used if there are multiple",
              "type": "boolean",
              "example": true
            },
            "name": {
              "description": "A label for the phone number, e.g. 'work', 'home', 'mobile'.",
              "type": "string",
              "example": "phone"
            },
            "value": {
              "properties": {
                "countryCode": {
                  "description": "Phone number prefix for calling individuals in other countries",
                  "type": "string",
                  "example": "1"
                },
                "number": {
                  "description": "The unformatted phone number with only digits",
                  "type": "string",
                  "example": "7341234567"
                },
                "extension": {
                  "description": "An additional code to reach a specific person or department which share a number",
                  "type": "string",
                  "example": "123"
                },
                "numberFormatted": {
                  "description": "The phone number formatted for human readability",
                  "type": "string",
                  "example": "734-123-4567"
                },
                "E164": {
                  "description": "The phone number formatted for international use; a common programatic standard for working with phone numbers",
                  "type": "string",
                  "example": "+17341234567"
                },
                "countryCodeAndNumber": {
                  "description": "The phone number formatted for human readability with the country code",
                  "type": "string",
                  "example": "+1 734-123-4567"
                }
              },
              "type": "object"
            }
          },
          "type": "object"
        }
      },
      "urls": {
        "type": "array",
        "items": {
          "properties": {
            "isPrimary": {
              "description": "Should this URL be used if there are multiple",
              "type": "boolean",
              "example": true
            },
            "name": {
              "description": "A label for the URL, e.g. 'LinkedIn', 'Facebook', 'personal website'.",
              "type": "string",
              "example": "LinkedIn"
            },
            "value": {
              "description": "The URL itself",
              "type": "string",
              "example": "https://www.linkedin.com"
            }
          },
          "type": "object"
        }
      },
      "Avatarable": {
        "properties": {
          "avatarUrl": {
            "description": "The URL of the entity's avatar image.",
            "type": "string",
            "example": "https://app.nutshell.com/avatars/contacts/1006/{path}"
          },
          "initials": {
            "description": "The initials of the entity, used as a fallback for the avatar image.",
            "type": "string",
            "example": "AF"
          }
        },
        "type": "object"
      },
      "HtmlLinkable": {
        "description": "Adds an htmlUrl string attribute that represents a URL of an HTML representation of the\nresponse model.",
        "properties": {
          "htmlUrl": {
            "description": "The link to the entity within the app.",
            "type": "string",
            "example": "https://app.nutshell.com/lead/1006"
          },
          "htmlUrlPath": {
            "description": "The path to the entity within the app.",
            "type": "string",
            "example": "/lead/1006"
          }
        },
        "type": "object"
      },
      "meta": {
        "description": "Information about the Nutshell instance making the request",
        "properties": {
          "instanceId": {
            "description": "The Nutshell instance ID",
            "type": "string",
            "example": "12345"
          },
          "siteId": {
            "description": "Site ID for WebFX customers",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Accounts (Companies)",
      "description": "Accounts (Companies)"
    }
  ]
}
```