List Companies
curl --request GET \
--url https://app.cometly.com/public-api/v1/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cometly.com/public-api/v1/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cometly.com/public-api/v1/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cometly.com/public-api/v1/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cometly.com/public-api/v1/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.cometly.com/public-api/v1/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cometly.com/public-api/v1/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{}
],
"path": "<string>",
"per_page": 123,
"next_cursor": {},
"next_page_url": {},
"prev_cursor": {},
"prev_page_url": {},
"message": "<string>"
}Companies
List Companies
Retrieve a paginated list of companies with optional date filtering
GET
/
public-api
/
v1
/
companies
List Companies
curl --request GET \
--url https://app.cometly.com/public-api/v1/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cometly.com/public-api/v1/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cometly.com/public-api/v1/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cometly.com/public-api/v1/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cometly.com/public-api/v1/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.cometly.com/public-api/v1/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cometly.com/public-api/v1/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{}
],
"path": "<string>",
"per_page": 123,
"next_cursor": {},
"next_page_url": {},
"prev_cursor": {},
"prev_page_url": {},
"message": "<string>"
}Overview
This endpoint allows you to retrieve a list of companies from Cometly. Results are cursor-paginated for efficient data retrieval and ordered by creation date (newest first).Query Parameters
Optional Parameters
integer
default:"200"
Number of companies to return per page. Minimum: 1, Maximum: 5000
string
Pagination cursor from a previous response. Use this to fetch the next page of results.
string
Filter companies created on or after this date. Format:
YYYY-MM-DD HH:MM:SS. The timestamp is interpreted in your space’s timezone.
Example: 2024-01-01 00:00:00string
Filter companies created on or before this date. Format:
YYYY-MM-DD HH:MM:SS. Must be after start_date. The timestamp is interpreted in your space’s timezone.
Example: 2024-01-31 23:59:59Response
Success Response
The response follows Laravel’s cursor pagination structure:array
Array of company objects. Each company includes:
id(integer): The unique identifier of the companydomain(string | null): The domain associated with this company.nullif the company was created from a customer-supplied external ID with no associated email domain, or if its domain claim was later released via Update Company.external_id(string | null): The customer-supplied external ID associated with this company (your own account/company identifier).nullif the company was created from an email domain alone, or if its external ID claim was later released via Update Company.
string
The base URL path for the endpoint
integer
Number of items per page
string | null
Cursor for the next page of results.
null if there are no more pages.string | null
Full URL for the next page of results.
null if there are no more pages.string | null
Cursor for the previous page of results.
null if on the first page.string | null
Full URL for the previous page of results.
null if on the first page.Error Response
string
Error description explaining what went wrong
Example Requests
# Basic request without filters
curl -G "https://app.cometly.com/public-api/v1/companies" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
# Request with date filtering
curl -G "https://app.cometly.com/public-api/v1/companies" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data-urlencode "start_date=2024-01-01 00:00:00" \
--data-urlencode "end_date=2024-01-31 23:59:59" \
-d "per_page=100"
# Pagination request using cursor
curl -G "https://app.cometly.com/public-api/v1/companies" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d "cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNSAxMj..."
// Basic request without filters
const response = await fetch('https://app.cometly.com/public-api/v1/companies', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
});
const data = await response.json();
// Request with date filtering
const params = new URLSearchParams({
start_date: '2024-01-01 00:00:00',
end_date: '2024-01-31 23:59:59',
per_page: '100'
});
const filteredResponse = await fetch(`https://app.cometly.com/public-api/v1/companies?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
});
const filteredData = await filteredResponse.json();
// Pagination using cursor from previous response
if (filteredData.next_cursor) {
const nextParams = new URLSearchParams({
cursor: filteredData.next_cursor
});
const nextPage = await fetch(`https://app.cometly.com/public-api/v1/companies?${nextParams}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
});
}
<?php
// Basic request without filters
$baseUrl = 'https://app.cometly.com/public-api/v1/companies';
$headers = [
'Authorization: Bearer YOUR_API_KEY',
'Accept: application/json',
'Content-Type: application/json'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
// Request with date filtering
$params = http_build_query([
'start_date' => '2024-01-01 00:00:00',
'end_date' => '2024-01-31 23:59:59',
'per_page' => 100
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl . '?' . $params);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
// Pagination using cursor
if (!empty($data['next_cursor'])) {
$nextParams = http_build_query([
'cursor' => $data['next_cursor']
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl . '?' . $nextParams);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$nextResponse = curl_exec($ch);
curl_close($ch);
}
?>
import requests
# Basic request without filters
base_url = 'https://app.cometly.com/public-api/v1/companies'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.get(base_url, headers=headers)
data = response.json()
# Request with date filtering
params = {
'start_date': '2024-01-01 00:00:00',
'end_date': '2024-01-31 23:59:59',
'per_page': 100
}
response = requests.get(base_url, headers=headers, params=params)
data = response.json()
# Pagination using cursor from previous response
if data.get('next_cursor'):
next_params = {
'cursor': data['next_cursor']
}
next_response = requests.get(base_url, headers=headers, params=next_params)
next_data = next_response.json()
Status Codes
| Status Code | Description |
|---|---|
| 200 | Companies successfully retrieved |
| 401 | Missing or invalid API key |
| 403 | API key doesn’t have permission or subscription is inactive |
| 422 | Invalid parameters provided (check error message for details) |
| 429 | Too many requests - rate limit exceeded. See Rate Limiting |
Notes
- Rate Limit: This endpoint has a limit of 15 requests per minute per Space. See Rate Limiting for details.
- Results are ordered by creation date in descending order (newest first)
- Cursor pagination is used for efficient traversal of large result sets
- Date filtering is optional. When omitted, all companies are returned.
- Dates are provided in your space’s configured timezone and converted to UTC for querying
- Only company
id,domain, andexternal_idfields are returned in the response —nameis not included in the list view; use Get Company to retrieve it