npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

newscatcherapi-typescript-sdk

v6.0.15

Published

Client for NewsCatcher-V3 Production API

Downloads

66

Readme

newscatcherapi-typescript-sdk

Visit our website https://newscatcherapi.com

npm

Table of Contents

Installation

npm i newscatcherapi-typescript-sdk
pnpm i newscatcherapi-typescript-sdk
yarn add newscatcherapi-typescript-sdk

Getting Started

import { Newscatcher } from "newscatcherapi-typescript-sdk";

const newscatcher = new Newscatcher({
  // Defining the base path is optional and defaults to https://v3-api.newscatcherapi.com
  // basePath: "https://v3-api.newscatcherapi.com",
  apiKey: "API_KEY",
});

const getResponse = await newscatcher.authors.get({
  authorName: "authorName_example",
  byParseDate: false,
  sortBy: "relevancy",
  page: 1,
  pageSize: 100,
});

console.log(getResponse);

Reference

newscatcher.authors.get

This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more.

🛠️ Usage

const getResponse = await newscatcher.authors.get({
  authorName: "authorName_example",
  byParseDate: false,
  sortBy: "relevancy",
  page: 1,
  pageSize: 100,
});

⚙️ Parameters

authorName: string
notAuthorName: string
sources: any
predefinedSources: any
notSources: any
lang: any
notLang: any
countries: any
notCountries: any
from: From
to: To
publishedDatePrecision: string
byParseDate: boolean
sortBy: string
rankedOnly: RankedOnly
fromRank: number
toRank: number
isHeadline: boolean
isOpinion: boolean
isPaidContent: boolean
parentUrl: any
allLinks: any
allDomainLinks: any
wordCountMin: number
wordCountMax: number
page: number
pageSize: number
includeNlpData: boolean
hasNlp: boolean
theme: string
notTheme: string
titleSentimentMin: number
titleSentimentMax: number
contentSentimentMin: number
contentSentimentMax: number
iptcTags: any
notIptcTags: any
iabTags: any
notIabTags: any

🔄 Return

AuthorsGetResponse

🌐 Endpoint

/api/authors GET

🔙 Back to Table of Contents


newscatcher.authors.post

This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more.

🛠️ Usage

const postResponse = await newscatcher.authors.post({
  author_name: "author_name_example",
  by_parse_date: false,
  sort_by: "relevancy",
  page: 1,
  page_size: 100,
});

⚙️ Parameters

author_name: string
not_author_name: string
sources: any
predefined_sources: any
not_sources: any
lang: any
not_lang: any
countries: any
not_countries: any
from_: From
to_: To
published_date_precision: string
by_parse_date: boolean
sort_by: string
ranked_only: RankedOnly
from_rank: number
to_rank: number
is_headline: boolean
is_opinion: boolean
is_paid_content: boolean
parent_url: any
all_links: any
all_domain_links: any
word_count_min: number
word_count_max: number
page: number
page_size: number
include_nlp_data: boolean
has_nlp: boolean
theme: string
not_theme: string
title_sentiment_min: number
title_sentiment_max: number
content_sentiment_min: number
content_sentiment_max: number
iptc_tags: any
not_iptc_tags: any
iab_tags: any
not_iab_tags: any

🔄 Return

AuthorsPostResponse

🌐 Endpoint

/api/authors POST

🔙 Back to Table of Contents


newscatcher.latestHeadlines.get

This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more.

🛠️ Usage

const getResponse = await newscatcher.latestHeadlines.get({
  when: "7d",
  byParseDate: false,
  sortBy: "relevancy",
  page: 1,
  pageSize: 100,
});

⚙️ Parameters

when: string
byParseDate: boolean
sortBy: string
lang: any
notLang: any
countries: any
notCountries: any
sources: any
predefinedSources: any
notSources: any
notAuthorName: any
rankedOnly: RankedOnly
isHeadline: boolean
isOpinion: boolean
isPaidContent: boolean
parentUrl: any
allLinks: any
allDomainLinks: any
wordCountMin: number
wordCountMax: number
page: number
pageSize: number
clusteringVariable: string
clusteringEnabled: boolean
clusteringThreshold: number
includeNlpData: boolean
hasNlp: boolean
theme: string
notTheme: string
orgEntityName: string
perEntityName: string
locEntityName: string
miscEntityName: string
titleSentimentMin: number
titleSentimentMax: number
contentSentimentMin: number
contentSentimentMax: number
iptcTags: any
notIptcTags: any
iabTags: any
notIabTags: any

🔄 Return

LatestHeadlinesGetResponse

🌐 Endpoint

/api/latest_headlines GET

🔙 Back to Table of Contents


newscatcher.latestHeadlines.post

This endpoint allows you to get latest headlines. You need to specify since when you want to get the latest headlines. You can also filter by language, country, source, and more.

🛠️ Usage

const postResponse = await newscatcher.latestHeadlines.post({
  when: "7d",
  by_parse_date: false,
  sort_by: "relevancy",
  page: 1,
  page_size: 100,
});

⚙️ Parameters

when: string
by_parse_date: boolean
sort_by: string
lang: any
not_lang: any
countries: any
not_countries: any
sources: any
predefined_sources: any
not_sources: any
not_author_name: any
ranked_only: RankedOnly
is_headline: boolean
is_opinion: boolean
is_paid_content: boolean
parent_url: any
all_links: any
all_domain_links: any
word_count_min: number
word_count_max: number
page: number
page_size: number
clustering_variable: string
clustering_enabled: boolean
clustering_threshold: number
include_nlp_data: boolean
has_nlp: boolean
theme: string
not_theme: string
ORG_entity_name: string
PER_entity_name: string
LOC_entity_name: string
MISC_entity_name: string
title_sentiment_min: number
title_sentiment_max: number
content_sentiment_min: number
content_sentiment_max: number
iptc_tags: any
not_iptc_tags: any
iab_tags: any
not_iab_tags: any

🔄 Return

LatestHeadlinesPostResponse

🌐 Endpoint

/api/latest_headlines POST

🔙 Back to Table of Contents


newscatcher.search.get

This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more.

🛠️ Usage

const getResponse = await newscatcher.search.get({
  q: "q_example",
  searchIn: "title_content",
  byParseDate: false,
  sortBy: "relevancy",
  page: 1,
  pageSize: 100,
});

⚙️ Parameters

q: string
searchIn: string
predefinedSources: any
sources: any
notSources: any
lang: any
notLang: any
countries: any
notCountries: any
notAuthorName: any
from: From
to: To
publishedDatePrecision: string
byParseDate: boolean
sortBy: string
rankedOnly: RankedOnly
fromRank: number
toRank: number
isHeadline: boolean
isOpinion: boolean
isPaidContent: boolean
parentUrl: any
allLinks: any
allDomainLinks: any
wordCountMin: number
wordCountMax: number
page: number
pageSize: number
clusteringVariable: string
clusteringEnabled: boolean
clusteringThreshold: number
includeNlpData: boolean
hasNlp: boolean
theme: string
notTheme: string
orgEntityName: string
perEntityName: string
locEntityName: string
miscEntityName: string
titleSentimentMin: number
titleSentimentMax: number
contentSentimentMin: number
contentSentimentMax: number
iptcTags: any
notIptcTags: any
sourceName: any
iabTags: any
notIabTags: any
excludeDuplicates: boolean
additionalDomainInfo: boolean
isNewsDomain: boolean
newsDomainType: any
newsType: any

🔄 Return

SearchGetResponse

🌐 Endpoint

/api/search GET

🔙 Back to Table of Contents


newscatcher.search.post

This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more.

🛠️ Usage

const postResponse = await newscatcher.search.post({
  q: "q_example",
  search_in: "title_content",
  by_parse_date: false,
  sort_by: "relevancy",
  page: 1,
  page_size: 100,
});

⚙️ Parameters

q: string
search_in: string
predefined_sources: any
sources: any
not_sources: any
lang: any
not_lang: any
countries: any
not_countries: any
not_author_name: any
from_: From
to_: To
published_date_precision: string
by_parse_date: boolean
sort_by: string
ranked_only: RankedOnly
from_rank: number
to_rank: number
is_headline: boolean
is_opinion: boolean
is_paid_content: boolean
parent_url: any
all_links: any
all_domain_links: any
word_count_min: number
word_count_max: number
page: number
page_size: number
clustering_variable: string
clustering_enabled: boolean
clustering_threshold: number
include_nlp_data: boolean
has_nlp: boolean
theme: string
not_theme: string
ORG_entity_name: string
PER_entity_name: string
LOC_entity_name: string
MISC_entity_name: string
title_sentiment_min: number
title_sentiment_max: number
content_sentiment_min: number
content_sentiment_max: number
iptc_tags: any
not_iptc_tags: any
source_name: any
iab_tags: any
not_iab_tags: any
exclude_duplicates: boolean
additional_domain_info: boolean
is_news_domain: boolean
news_domain_type: any
news_type: any

🔄 Return

SearchPostResponse

🌐 Endpoint

/api/search POST

🔙 Back to Table of Contents


newscatcher.searchLink.get

This endpoint allows you to search for articles. You can search for articles by id(s) or link(s).

🛠️ Usage

const getResponse = await newscatcher.searchLink.get({
  page: 1,
  pageSize: 100,
});

⚙️ Parameters

ids: any
links: any
from: From1
to: To1
page: number
pageSize: number

🔄 Return

DtoResponsesSearchResponseSearchResponse

🌐 Endpoint

/api/search_by_link GET

🔙 Back to Table of Contents


newscatcher.searchLink.post

This endpoint allows you to search for articles. You can search for articles by id(s) or link(s).

🛠️ Usage

const postResponse = await newscatcher.searchLink.post({
  page: 1,
  page_size: 100,
});

⚙️ Parameters

ids: any
links: any
from_: From1
to_: To1
page: number
page_size: number

🔄 Return

DtoResponsesSearchResponseSearchResponse

🌐 Endpoint

/api/search_by_link POST

🔙 Back to Table of Contents


newscatcher.searchSimilar.get

This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search.

🛠️ Usage

const getResponse = await newscatcher.searchSimilar.get({
  q: "q_example",
  searchIn: "title_content",
  includeSimilarDocuments: false,
  similarDocumentsNumber: 5,
  similarDocumentsFields: "title,content",
  byParseDate: false,
  sortBy: "relevancy",
  page: 1,
  pageSize: 100,
});

⚙️ Parameters

q: string
searchIn: string
includeSimilarDocuments: boolean
similarDocumentsNumber: number
similarDocumentsFields: string
predefinedSources: any
sources: any
notSources: any
lang: any
notLang: any
countries: any
notCountries: any
from: From
to: To
byParseDate: boolean
publishedDatePrecision: string
sortBy: string
rankedOnly: RankedOnly
fromRank: number
toRank: number
isHeadline: boolean
isOpinion: boolean
isPaidContent: boolean
parentUrl: any
allLinks: any
allDomainLinks: any
wordCountMin: number
wordCountMax: number
page: number
pageSize: number
includeNlpData: boolean
hasNlp: boolean
theme: string
notTheme: string
titleSentimentMin: number
titleSentimentMax: number
contentSentimentMin: number
contentSentimentMax: number
iptcTags: any
notIptcTags: any

🔄 Return

SearchSimilarGetResponse

🌐 Endpoint

/api/search_similar GET

🔙 Back to Table of Contents


newscatcher.searchSimilar.post

This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search.

🛠️ Usage

const postResponse = await newscatcher.searchSimilar.post({
  q: "q_example",
  search_in: "title_content",
  include_similar_documents: false,
  similar_documents_number: 5,
  similar_documents_fields: "title,content",
  by_parse_date: false,
  sort_by: "relevancy",
  page: 1,
  page_size: 100,
});

⚙️ Parameters

q: string
search_in: string
include_similar_documents: boolean
similar_documents_number: number
similar_documents_fields: string
predefined_sources: any
sources: any
not_sources: any
lang: any
not_lang: any
countries: any
not_countries: any
from_: From
to_: To
by_parse_date: boolean
published_date_precision: string
sort_by: string
ranked_only: RankedOnly
from_rank: number
to_rank: number
is_headline: boolean
is_opinion: boolean
is_paid_content: boolean
parent_url: any
all_links: any
all_domain_links: any
word_count_min: number
word_count_max: number
page: number
page_size: number
include_nlp_data: boolean
has_nlp: boolean
theme: string
not_theme: string
title_sentiment_min: number
title_sentiment_max: number
content_sentiment_min: number
content_sentiment_max: number
iptc_tags: any
not_iptc_tags: any

🔄 Return

SearchSimilarPostResponse

🌐 Endpoint

/api/search_similar POST

🔙 Back to Table of Contents


newscatcher.sources.get

This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing

🛠️ Usage

const getResponse = await newscatcher.sources.get({});

⚙️ Parameters

lang: any
countries: any
predefinedSources: any
includeAdditionalInfo: boolean
fromRank: number
toRank: number
sourceName: any
sourceUrl: any
isNewsDomain: boolean
newsDomainType: any
newsType: any

🔄 Return

SourceResponse

🌐 Endpoint

/api/sources GET

🔙 Back to Table of Contents


newscatcher.sources.post

This endpoint allows you to get the list of sources that are available in the database. You can filter the sources by language and country. The maximum number of sources displayed is set according to your plan. You can find the list of plans and their features here: https://newscatcherapi.com/news-api#news-api-pricing

🛠️ Usage

const postResponse = await newscatcher.sources.post({});

⚙️ Parameters

lang: any
countries: any
predefined_sources: any
include_additional_info: boolean
from_rank: number
to_rank: number
source_name: any
source_url: any
is_news_domain: boolean
news_domain_type: any
news_type: any

🔄 Return

SourceResponse

🌐 Endpoint

/api/sources POST

🔙 Back to Table of Contents


newscatcher.subscription.get

This endpoint allows you to get info about your subscription plan.

🛠️ Usage

const getResponse = await newscatcher.subscription.get();

🔄 Return

SubscriptionResponse

🌐 Endpoint

/api/subscription GET

🔙 Back to Table of Contents


newscatcher.subscription.post

This endpoint allows you to get info about your subscription plan.

🛠️ Usage

const postResponse = await newscatcher.subscription.post();

🔄 Return

SubscriptionResponse

🌐 Endpoint

/api/subscription POST

🔙 Back to Table of Contents


Author

This TypeScript package is automatically generated by Konfig