curl --request GET \
--url https://app.tryspecter.com/api/v1/searches/companies/{searchId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.tryspecter.com/api/v1/searches/companies/{searchId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.tryspecter.com/api/v1/searches/companies/{searchId}', 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.tryspecter.com/api/v1/searches/companies/{searchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.tryspecter.com/api/v1/searches/companies/{searchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.tryspecter.com/api/v1/searches/companies/{searchId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/searches/companies/{searchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 41012,
"name": "skyboundclin",
"query_id": 152001,
"product_type": "company",
"owner_id": "<string>",
"full_count": 408264,
"is_global": false,
"new_count": 0
}{
"errorCode": "NOT_SUPPORTED_PRODUCT",
"message": "The product \"people\" is not supported by this operation. Only \"companies\" are supported."
}{
"errorCode": "API_KEY_MISSING",
"message": "No API Key was presented on the header X-API-KEY"
}{
"errorCode": "NOT_PERMITTED",
"message": "API key present, but you are not permitted"
}{
"errorCode": "NOT_FOUND",
"message": "Not Found"
}{
"errorCode": "VALIDATION_ERROR",
"message": "Field required (body.name)"
}{
"errorCode": "RATE_LIMITED",
"message": "You have been rate-limited"
}{
"errorCode": "clerk_unavailable",
"message": "Key verification is temporarily unavailable"
}Get company saved search
Returns count-level details for a saved company search: total companies matched and newly added.
Free. This call does not consume credits.
What you need
A company saved-search ID shared with the API; get one from Get all saved searches.
Behaviour
- Returns counts only (no per-company records); fetch the companies with Get company saved search results.
- The counts describe the whole search and take no query parameters. For the subset
added since a moment you choose, read the results with
new_results_after. - The saved search must be shared with the API (via “Share to API”) or be a global search curated by Specter.
- Returns
404if the search doesn’t exist orsearchIdis not a number, and400withNOT_SUPPORTED_PRODUCTif the search belongs to a non-company product.
What you do next
- Pull the companies. Fetch full records with Get company saved search results.
curl --request GET \
--url https://app.tryspecter.com/api/v1/searches/companies/{searchId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.tryspecter.com/api/v1/searches/companies/{searchId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.tryspecter.com/api/v1/searches/companies/{searchId}', 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.tryspecter.com/api/v1/searches/companies/{searchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.tryspecter.com/api/v1/searches/companies/{searchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.tryspecter.com/api/v1/searches/companies/{searchId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/searches/companies/{searchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 41012,
"name": "skyboundclin",
"query_id": 152001,
"product_type": "company",
"owner_id": "<string>",
"full_count": 408264,
"is_global": false,
"new_count": 0
}{
"errorCode": "NOT_SUPPORTED_PRODUCT",
"message": "The product \"people\" is not supported by this operation. Only \"companies\" are supported."
}{
"errorCode": "API_KEY_MISSING",
"message": "No API Key was presented on the header X-API-KEY"
}{
"errorCode": "NOT_PERMITTED",
"message": "API key present, but you are not permitted"
}{
"errorCode": "NOT_FOUND",
"message": "Not Found"
}{
"errorCode": "VALIDATION_ERROR",
"message": "Field required (body.name)"
}{
"errorCode": "RATE_LIMITED",
"message": "You have been rate-limited"
}{
"errorCode": "clerk_unavailable",
"message": "Key verification is temporarily unavailable"
}Authorizations
Path Parameters
The ID of the saved search being requested.
Response
The details of the query for a given search id.
The details of a company saved search, with its count of new companies.
The search id for the search, this should be used to query for results for the search.
41012
Name of the search
"skyboundclin"
The query id that this search is related to, this can be used to query for the search in the address bar.
https://app.tryspecter.com/companies/10
152001
The type of product the search relates to.
"company"
Id of the user who owns the saved search. Only a search owned by an admin of your organization can be deleted through the API.
The total number of companies that are returned by this search.
408264
true when the saved search is a global search curated by Specter and available to all users. false for searches owned by your organization.
false
The number of new companies that have appeared in this search in the most recent month.
0
Was this page helpful?