News & Stories

Story Count Statistics

Count matching stories by their creation time. Results can be grouped by hour, day, week, or month and filtered by supported story attributes.

get/v1/stories/stats

Request

  • Base URL: https://api.perigon.io
  • URL: https://api.perigon.io/v1/stories/stats
  • Auth: HTTP bearer

Query parameters

qstring

String. Primary search query for filtering stories based on their name, summary, and key points. Supports Boolean operators (AND, OR, NOT), exact phrases with quotes, and wildcards (* and ?) for flexible searching.

namestring

String. Search specifically within story names. Supports Boolean operators, exact phrases with quotes, and wildcards for matching name variations.

clusterIdstring[]

String Array. Filter to specific stories using their unique identifiers. Each clusterId represents a distinct story that groups related articles. Multiple values create an OR filter.

excludeClusterIdstring[]

String Array. Excludes specific stories from the results by their unique identifiers. Use this parameter to filter out unwanted or previously seen stories.

fromstring date-time

Filter for stories created on or after this date. Accepts ISO 8601 or yyyy-mm-dd format.

tostring date-time

Filter for stories created on or before this date. Accepts ISO 8601 or yyyy-mm-dd format.

initializedFromstring date-time

Filter for stories initialized on or after this date. A story is initialized when it becomes visible with generated story data.

initializedTostring date-time

Filter for stories initialized on or before this date. A story is initialized when it becomes visible with generated story data.

updatedFromstring date-time

Date. Filter for stories that received new articles after this date. Useful for tracking developing news events or evolving storylines.

updatedTostring date-time

Date. Filter for stories that received new articles before this date. Useful for tracking developing news events or evolving storylines.

topicstring[]

String Array. Filter stories by specific topics such as Markets, Crime, Cryptocurrency, or College Sports. Topics are more granular than categories, and stories can include multiple topics based on their constituent articles. Use the /topics endpoint for a complete list of available topics. Multiple values create an OR filter.

categorystring[]

String Array. Filter stories by broad content categories such as Politics, Tech, Sports, Business, or Finance. Use 'none' to find uncategorized stories. Categories are derived from the articles within each story. Multiple values create an OR filter.

taxonomystring[]

String Array. Filter stories by Google Content Categories. Must pass the full hierarchical path of the category. Example: taxonomy=/Finance/Banking/Other,/Finance/Investing/Funds. Stories are categorized based on their constituent articles. Multiple values create an OR filter.

sourcestring[]

String Array. Filter stories that contain articles from specific publisher domains or subdomains. Supports wildcards (* and ?) for pattern matching (e.g., *.cnn.com). A story will match if it contains at least one article from any of the specified sources. Multiple values create an OR filter.

sourceGroupstring[]

String Array. Filter stories that contain articles from publishers in Perigon's curated bundles (e.g., top100, top25crypto). A story will match if it contains at least one article from any publisher in the specified bundles. Multiple values create an OR filter.

minUniqueSourcesinteger

Integer. Specifies the minimum number of unique sources required for a story to appear in results. Higher values return more significant stories covered by multiple publications. Default is 3.

minSourceDiversitynumber

Float. Minimum ratio of unique sources to unique articles (uniqueSources / uniqueCount). Filters out stories dominated by a single publisher. For example, a value of 0.05 requires at least 1 unique source per 20 articles. Not applied by default.

personWikidataIdstring[]

String Array. Filter stories by Wikidata IDs of top mentioned people. Returns stories where these individuals appear prominently. Refer to the /people endpoint for a complete list of tracked individuals.

personNamestring

String. Filter stories by exact name matches of top mentioned people. Does not support Boolean or complex logic. For available person entities, consult the /people endpoint.

companyIdstring[]

String Array. Filter stories by identifiers of top mentioned companies. Returns stories where these companies appear prominently. For a complete list of tracked companies, refer to the /companies endpoint.

companyNamestring

String. Filter stories by names of top mentioned companies. Performs an exact match on company names in the topCompanies field.

companyDomainstring[]

String Array. Filter stories by domains of top mentioned companies (e.g., apple.com). Returns stories where companies with these domains appear prominently. For available company entities, consult the /companies endpoint.

companySymbolstring[]

String Array. Filter stories by stock symbols of top mentioned companies. Returns stories where companies with these symbols appear prominently. For available company entities and their symbols, consult the /companies endpoint.

companyIsinstring[]

String Array. Filter stories by ISIN codes of top mentioned companies (International Securities Identification Numbers). Returns stories where companies with these ISINs appear prominently. For available company entities and their ISINs, consult the /companies endpoint.

companySymbolIsinstring[]

String Array. Filter stories by ISIN codes on ticker listings of top mentioned companies (symbols.isin). Distinct from companyIsin, which matches the company-level ISIN. Returns stories where those companies appear prominently. For available company entities and their listing ISINs, consult the /companies endpoint.

countrystring[]

String Array. Country code to filter by country. If multiple parameters are passed, they will be applied as OR operations.

statestring[]

String Array. Filter local news by state. Applies only to local news, when this param is passed non-local news will not be returned. If multiple parameters are passed, they will be applied as OR operations.

citystring[]

String Array. Filter local news by city. Applies only to local news, when this param is passed non-local news will not be returned. If multiple parameters are passed, they will be applied as OR operations.

areastring[]

String Array. Filter local news by area. Applies only to local news, when this param is passed non-local news will not be returned. If multiple parameters are passed, they will be applied as OR operations.

minClusterSizeinteger

Integer. Filter by minimum cluster size. Minimum cluster size filter applies to number of unique articles.

maxClusterSizeinteger

Integer. Filter by maximum cluster size. Maximum cluster size filter applies to number of unique articles in the cluster.

nameExistsboolean

Boolean. Filter to only include stories that have been assigned names. Defaults to true. Note that stories only receive names after they contain at least 5 unique articles.

positiveSentimentFromnumber float

Filter stories with an aggregate positive sentiment score greater than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger positive tone.

positiveSentimentTonumber float

Filter stories with an aggregate positive sentiment score less than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger positive tone.

neutralSentimentFromnumber float

Filter stories with an aggregate neutral sentiment score greater than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger neutral tone.

neutralSentimentTonumber float

Filter stories with an aggregate neutral sentiment score less than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger neutral tone.

negativeSentimentFromnumber float

Filter stories with an aggregate negative sentiment score greater than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger negative tone.

negativeSentimentTonumber float

Filter stories with an aggregate negative sentiment score less than or equal to the specified value. Scores range from 0 to 1, with higher values indicating stronger negative tone.

showDuplicatesboolean

Boolean. Stories are deduplicated by default. If a story is deduplicated, all future articles are merged into the original story. duplicateOf field contains the original cluster Id. When showDuplicates=true, all stories are shown.

splitBy'hour' | 'day' | 'week' | 'month' required

Time interval used to group story counts. Accepts hour, day, week, or month and defaults to month.

timeZonestring

IANA time zone used to align interval buckets (e.g. America/Chicago). Defaults to UTC. Applies to intervalArticleCounts.

Response

200 - Success

statusinteger nullable

HTTP status code for the response.

resultsobject[] nullable

Statistics returned by the request.

numResultsinteger nullable

Total number of matching records, when calculated by the endpoint.

Changes

No recorded changes to this operation across all 1 revision of this API.