Use the Insights API's Company News Agents Count endpoint to retrieve the number of news available per category for a specific company.
Endpoint
GET https://api.insideview.com/api/v1/insights/company/{companyId}/agents/count
Request
HTTP Headers
Header Name | Type | Required | Description |
accessToken | String | Yes |
Valid access token. |
Accept | String | No |
Selects the response's content type. Use below mentioned values to access New News Platform based search application/api.insights.beta+json application/api.insights.beta+xml |
URI Parameters
Parameter Name | Type | Required | Description |
companyId | Integer | Yes | A valid company ID |
Query Parameters
Parameter Name | Type | Required | Description |
days | Integer | Yes | Period length, ending with the current date to retrieve news for. Max value: 90 |
agents | String | Yes | A comma separated list of agents ID (see below) |
page | Integer | No | The page number of the result-set to return. Default: 1 |
resultsPerPage | Integer | No | The number of results in a page request. Min: 1, Max: 500, Default: 100 |
Agent Name | ID |
Leadership Changes | LEADERSHIP_CHANGES |
New Offerings | NEW_OFFERINGS |
Acquisitions | ACQUISITIONS |
Partnerships | PARTNERSHIPS |
Expanding Operations | EXPANDING_OPERATIONS |
Cost Cutting | COST_CUTTING |
Outperforming | OUTPERFORMING |
Underperforming | UNDERPERFORMING |
Company Presentation | COMPANY_PRESENTATION |
Litigation | LITIGATION |
Compliance | COMPLIANCE |
Research & Development | RESEARCH_DEVELOPMENT |
Data Security | DATA_SECURITY |
Funding Developments | FUNDING_DEVELOPMENTS |
Bankruptcy & Restructuring | BANKRUPTCY_RESTRUCTURING |
Real Estate: Deals | REALESTATE_DEALS |
Real Estate: Construction | REALESTATE_CONSTRUCTION |
Corporate Challenges | CORPORATE_CHALLENGES |
Responses
Here are the major responses the API may return.
For details on the errors, see API Error Codes.
HTTP 200
Returns either a JSON or XML data structure depending on the request Accept header.
Name | type | Description |
countPerAgent | Array | Array of results |
companyNews agent | String | News category |
companyNews count | Integer | News count for the category |
application/json Example
{ "countPerAgent": [ { "agent": "ACQUISITIONS", "count": "7" }, { "agent": "LEADERSHIP_CHANGES", "count": "2" } ],
"companyId": 726263,
"currentCompanyId": 1755 }
application/xml Example
<?xml version="1.0" encoding="UTF-8"?> <newsCount> <countPerAgent> <agent>ACQUISITIONS</agent> <count>7</count> </countPerAgent> <countPerAgent> <agent>LEADERSHIP_CHANGES</agent> <count>2</count> </countPerAgent>
<companyId>726263</companyId>
<currentCompanyId>1755</currentCompanyId> </newsCount>
HTTP 400
Invalid query parameter(s).
HTTP 401
Unauthorized Error - Cannot use API's without setting a valid accessToken in header.
HTTP 405
Method Not Allowed - Your are not allowed to access this API.
HTTP 429
Request is throttled.