Retrieve a specific search
curl --request GET \
--url https://app.pipecorn.com/api/v2/searches/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.pipecorn.com/api/v2/searches/{id}"
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.pipecorn.com/api/v2/searches/{id}', 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.pipecorn.com/api/v2/searches/{id}",
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.pipecorn.com/api/v2/searches/{id}"
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.pipecorn.com/api/v2/searches/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/searches/{id}")
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{
"search": {
"uuid": "6f1c2b8e-3d4a-4f5b-9c6d-7e8f9a0b1c2d",
"name": "Heads of Sales - France",
"status": "finished",
"results_ready": true
},
"leads": [],
"pagination": {
"page": 1,
"per_page": 100,
"total_count": 0,
"has_more": false
}
}Searches
Retrieve the details of a Search
Returns a specific search and, once it is finished, one page of its leads. While the search is still running the response holds only search (with results_ready: false), without leads or pagination. This endpoint is exempt from the per-plan rate limit so you can poll it.
GET
/
searches
/
{id}
Retrieve a specific search
curl --request GET \
--url https://app.pipecorn.com/api/v2/searches/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.pipecorn.com/api/v2/searches/{id}"
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.pipecorn.com/api/v2/searches/{id}', 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.pipecorn.com/api/v2/searches/{id}",
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.pipecorn.com/api/v2/searches/{id}"
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.pipecorn.com/api/v2/searches/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/searches/{id}")
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{
"search": {
"uuid": "6f1c2b8e-3d4a-4f5b-9c6d-7e8f9a0b1c2d",
"name": "Heads of Sales - France",
"status": "finished",
"results_ready": true
},
"leads": [],
"pagination": {
"page": 1,
"per_page": 100,
"total_count": 0,
"has_more": false
}
}Search Status
The search object includes astatus field that indicates the current state of the search operation. The possible status values are:
Active Statuses
not_started: The search has been created but has not yet begun processingongoing: The search is currently being processed and generating resultsfinished: The search has completed successfully and all results are available
Error Statuses
rate_limited: The search was interrupted due to rate limiting constraintsunauthorized: The search failed due to authentication issuesforbidden: The search failed due to insufficient permissionsnot_found: LinkedIn could not find the search or one of its resourcesinternal_server_error: LinkedIn failed while serving the searcherror: The search encountered an error during processing
finished, its leads are available and ready to be retrieved. For searches with error statuses, you may need to retry the search or check your API credentials and permissions.
Pagination
Leads are paginated:per_page defaults to 100 (at most 500). A finished search always returns a pagination object (page, per_page, total_count, has_more, and next_cursor while more pages follow; page is absent when you paginate by cursor). Pass pagination.next_cursor back as cursor to get the next page without skipping or repeating rows, or request the next page; stop when pagination.has_more is false. See Pagination. While the search is still running, the response holds only search (with results_ready: false), without leads or pagination.Query Parameters
Was this page helpful?