---
title: "Get a list of companies"
description: "GET /companies — Returns the account's companies, sorted by name."
canonical_url: https://developer.onepagecrm.com/api/reference/companies/get-companies/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/companies/get-companies/
---

`GET /companies`

Returns the account's companies, sorted by name.

Resource: [Companies](https://developer.onepagecrm.com/api/reference/companies/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl "https://app.onepagecrm.com/api/v3/companies" \
  -u $user_id:$api_key
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Query parameters

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | Search companies by name |
| `phone` | string | Search companies by phone number |
| `letter` | string | Return company whose name begins with specified letter |
| `sort_by` | string | Specify field by which to order the results (use in conjunction with `order`) |
| `order` | string | Specify the order (ascending or descending) of the sort of the results (use in conjunction with `sort_by`) |
| `page` | integer | Page number. Starts from 1. Default is 1. |
| `per_page` | integer | Number of records to return. Maximum 100 allowed. Default is 10. |

## Responses

### 200

OK

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "companies": [
      {
        "company": {
          "id": "5aba31e99007ba0f570c92ac",
          "image": "data:image/png;base64,iVBORw...",
          "name": "Crockett & Tubbs Security",
          "description": "For all your security needs",
          "phone": "(912) 644-1771",
          "photo_url": "https://example.com/someimage.png",
          "url": "https://{foo.bar}",
          "address": {
            "address": "Unit 5, Business Innovation Centre",
            "city": "Upper Newcastle",
            "state": "Galway",
            "zip_code": "H91 Y0T0",
            "country_code": "IE"
          },
          "company_fields": [
            {}
          ],
          "syncing_status": true,
          "synced_status_id": "5aaa9b039007ba08c9ebaf0a",
          "syncing_tags": true,
          "synced_tags": [
            "Java",
            "Android",
            "iOS"
          ],
          "contacts_count": 3,
          "won_deals_count": 5,
          "total_won_amount": 999.99,
          "pending_deals_count": 1,
          "total_pending_amount": 99.99,
          "contacts": [
            {}
          ],
          "pending_deals": [
            {}
          ],
          "created_at": "2018-05-16T11:52:09Z",
          "modified_at": "2018-05-16T11:52:09Z"
        }
      }
    ],
    "total_count": 1,
    "page": 1,
    "per_page": 10,
    "max_page": 1
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
- [Pagination](https://developer.onepagecrm.com/api/pagination/)
- [Sorting & time filters](https://developer.onepagecrm.com/api/sorting/)
