Documentation / API / campaigns_dashboard
campaigns_dashboard
POSThttps://api.oppalerts.com/v1/campaigns/dashboard
Campaign dashboard data: the opportunities counted each day on each index, the PageRank of every organization host month by month, and the index links found over time.
What it does
The tool reads the dashboard of one campaign. campaign is required. The answer has three parts:
opportunities: the active opportunities of the campaign, with the number found each day in the News Index (news) and in the Prospect Index (prospects). Each count includes status flags.news_partialandprospects_partialaretruewhen more than 15,000 pages matched the saved opportunity on that day: that count then comes from only part of the matches, and the real number can be higher.news_not_countedandprospects_not_countedaretruewhen that count stopped with an error, for example when the search took more than 10 seconds: the count is then 0, but no count was taken.news_not_counted_yetandprospects_not_counted_yetaretruewhen no count is stored for that index on that day: the count is then 0. A day with no stored count on both indexes is not incounts.dateslists the days of the counts.counts_rebuild: the state of rebuilding the missing and outdated daily counts, which campaigns_rebuild_counts starts. One daily count is one saved opportunity on one index on one day, for the active saved opportunities and the 14 days of the last daily run.stateisnone,waiting,running, orstopped(the last count stopped because of an error; campaigns_rebuild_counts starts it again).started_atis the time when counting was requested or began, empty whenstateisnone.counts_writtenis the number of daily counts that are stored,counts_expectedis the number that a complete set has, andcounts_missingis the number that is not stored.organizations_changed_atis the time when the organizations changed after the counts were taken, empty when the counts match the organizations.counts_to_recountis the number of stored daily counts of a brand search that were taken before that time, 0 whenorganizations_changed_atis empty.pr: the PageRank of each organization host, month by month, asdomain,host, andwww.pr_availableisfalsewhen the PageRank could not be read. The other parts are still returned.links: the links found over time to each organization, fornewsand forprospects. Each day haslinks_to_date, the links found up to that day, andlinks_that_day, the links found that day.
This tool has its own daily count, and it needs a campaign of your account. It is not an index search, so it is not part of the shared count of the news_ and prospects_ tools. account_calls_left shows the calls that are left today.
Authentication
Send a token in the Authorization: Bearer header. Authentication and Limits explains the tokens.
Parameters
campaignint, required, 1 to 4294967295- The campaign id, from campaigns_list. It must be a campaign of your account.
Strict Rules
- A field that is not in the list above is refused. The answer is HTTP 400 with the error code
bad_param. The error names the field: "<field> is not a field of this tool." The old name of a renamed field is refused in the same way. - A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, or a value that is not in its list. A required field that you do not send is refused too. The tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error has only its own sentence.
Example
Request
curl -X POST https://api.oppalerts.com/v1/campaigns/dashboard \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"campaign": 3}'
Response
The full sample answer.
{
"dates": [
"2026-08-29",
"2026-08-30",
"2026-08-31"
],
"opportunities": [
{
"id": 12,
"label": "Media kits naming boutique hotels",
"counts": {
"2026-08-30": {
"news": 17,
"news_partial": false,
"news_not_counted": false,
"news_not_counted_yet": false,
"prospects": 4,
"prospects_partial": false,
"prospects_not_counted": false,
"prospects_not_counted_yet": false
},
"2026-08-31": {
"news": 9,
"news_partial": false,
"news_not_counted": false,
"news_not_counted_yet": false,
"prospects": 6,
"prospects_partial": false,
"prospects_not_counted": false,
"prospects_not_counted_yet": false
}
}
}
],
"counts_rebuild": {
"state": "running",
"started_at": "2026-08-31T10:02:11Z",
"counts_written": 18,
"counts_expected": 28,
"organizations_changed_at": "2026-08-30T21:40:03Z",
"counts_missing": 10,
"counts_to_recount": 0
},
"pr_available": true,
"pr": {
"example-hotels.com": {
"2026-07": {
"domain": 57,
"host": 31,
"www": 55
},
"2026-08": {
"domain": 58,
"host": 31,
"www": 56
}
}
},
"links": {
"news": {
"example-hotels.com": {
"2026-08-30": {
"links_to_date": 412,
"links_that_day": 3
},
"2026-08-31": {
"links_to_date": 415,
"links_that_day": 3
}
}
},
"prospects": {
"example-hotels.com": {
"2026-08-31": {
"links_to_date": 8120,
"links_that_day": 12
}
}
}
}
}
Errors
bad_param(HTTP 400): a field is not a field of this tool, a required field is not sent, or a value has the wrong type or is out of its range. The error names the field.no_campaign(HTTP 404): the campaign is not a campaign of your account.db_error(HTTP 500): the data could not be read. The sentence says which data. Try again in a few minutes.daily_limit(HTTP 429): the account has used all its calls for this tool today. account_calls_left shows when the count resets.
This tool has its own daily count. A call through the API or MCP uses one call from this count. A web app page reading the same data does not count. It is not an index search, so it does not use the shared count of the news_ and prospects_ tools, and the error one_at_a_time does not apply to it.
Same tool in MCP
The MCP tool is campaigns_dashboard. Read the MCP page.