API reference / Account insights
Who viewed your profile (live)
Written and maintained by The ProspectAPIs team
GET/v1/insights/profile-views
GET /v1/insights/profile-views is the ProspectAPIs operation readProfileViews, in the Account insights group of the REST API. Who viewed your profile, where the network shows them (a hidden viewer is listed as anonymous), plus the view count. $0.01 per read. Acts on your own connected account. Billed per call once the messaging-read family is live; while it is not yet on sale the call is free (GET /pricing reports messaging_reads.available). While GET /pricing does not list this route in messaging_reads.available_routes it answers 503 temporarily_unavailable and nothing is charged. Cost: Launching soon. Send your API key as a Bearer token in the Authorization header.
The quickstart shows this call in context, next to the first requests most integrations make.
Parameters
This operation takes no path or query parameters.
Responses
| Status | Meaning |
|---|---|
| 200 | The view count and the viewers shown, read fresh, with coverage. |
| 400 | The request was invalid (e.g. a bad filter or input); nothing was charged. |
| 401 | The API key is missing or invalid. |
| 402 | Out of credits. The body carries top_up_url; nothing was charged. |
| 409 | No account is connected. Connect one with POST /v1/accounts/session, then retry. |
| 429 | Too many requests; retry after the window. |
| 503 | This read is temporarily unavailable. Nothing was charged. |
Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.
200 response fields
The view count and the viewers shown, read fresh, with coverage. The body is a PeopleReadResult.
| Field | Type | Description |
|---|---|---|
| data required | object | The read result. For search, posts, engagers and followers this is { items, page }; for a profile it is the profile object. |
| coverage required | object | How complete the source was. |
| coverage.filled | integer | |
| coverage.of | integer |
| Header | Meaning |
|---|---|
| RateLimit-Limit | Requests this API key may make per minute. |
| RateLimit-Remaining | Requests left in the current one-minute window. |
| RateLimit-Reset | Seconds until the current window resets. |
Code samples
Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.
curl https://api.prospectapis.com/v1/insights/profile-views \
-H "Authorization: Bearer $PROSPECTAPIS_KEY"const res = await fetch("https://api.prospectapis.com/v1/insights/profile-views", {
headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);import os, requests
res = requests.get(
"https://api.prospectapis.com/v1/insights/profile-views",
headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)Billing
Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.
Related
Previous operation: Read a person's skills (live). Next operation: Your social selling index (live). Every operation, grouped by area, is on the API reference index.
Create a free account to get a key, then run the samples above with your own values.
Was this page helpful?