Skip to main content
GET
/
v2
/
companies
Get all Companies
curl --request GET \
  --url https://api.affinity.co/v2/companies \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 4503599627370496,
      "name": "<string>",
      "domain": "<string>",
      "domains": [
        "<string>"
      ],
      "isGlobal": true,
      "fields": [
        {
          "id": "<string>",
          "name": "<string>",
          "type": "enriched",
          "enrichmentSource": "affinity-data",
          "value": {
            "data": {
              "continent": "North America",
              "country": "United States",
              "streetAddress": "1 Main Street",
              "city": "San Francisco",
              "state": "California"
            },
            "type": "location"
          }
        }
      ]
    }
  ],
  "pagination": {
    "prevUrl": "<string>",
    "nextUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string

Cursor for the next or previous page

Example:

"ICAgICAgYmVmb3JlOjo6Nw"

limit
integer<int32>
default:100

Number of items to include in the page

Required range: 1 <= x <= 100
Example:

100

ids
integer<int64>[]

Company IDs

Required range: 1 <= x <= 9007199254740991
fieldIds
string[]

Field IDs for which to return field data

Example:
["field-1"]
fieldTypes
enum<string>[]

Field Types for which to return field data

Available options:
enriched,
global,
relationship-intelligence

Response

OK

CompanyPaged model

data
Company · object[]
required

A page of Company results

Maximum array length: 100
pagination
Pagination · object
required
Example:
{
  "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
  "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
}