Skip to content

Latest commit

Β 

History

History
1131 lines (854 loc) Β· 16.7 KB

reference.md

File metadata and controls

1131 lines (854 loc) Β· 16.7 KB

Reference

Search

client.Search.GetAsync(SearchGetRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles based on specified criteria such as keyword, language, country, source, and more.

πŸ”Œ Usage

await client.Search.GetAsync(
    new SearchGetRequest
    {
        Q = "technology AND (Apple OR Microsoft) NOT Google",
        SearchIn = "title_content, title_content_translated",
        IncludeTranslationFields = true,
        PredefinedSources = "top 100 US, top 5 GB",
        From = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
        IptcTags = "20000199,20000209",
        NotIptcTags = "20000205,20000209",
        IabTags = "Business,Events",
        NotIabTags = "Agriculture,Metals",
        CustomTags = "Tag1,Tag2,Tag3",
    }
);

βš™οΈ Parameters

request: SearchGetRequest

client.Search.PostAsync(SearchPostRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles based on specified criteria such as keyword, language, country, source, and more.

πŸ”Œ Usage

await client.Search.PostAsync(
    new SearchPostRequest
    {
        Q = "renewable energy",
        PredefinedSources = new List<string>() { "top 50 US" },
        Lang = new List<string>() { "en" },
        From = new DateTime(2024, 01, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 06, 30, 00, 00, 00, 000),
        AdditionalDomainInfo = true,
        IsNewsDomain = true,
    }
);

βš™οΈ Parameters

request: SearchPostRequest

LatestHeadlines

client.Latestheadlines.GetAsync(LatestHeadlinesGetRequest { ... }) -> OneOf

πŸ“ Description

Retrieves the latest headlines for the specified time period. You can filter results by language, country, source, and more.

πŸ”Œ Usage

await client.Latestheadlines.GetAsync(
    new LatestHeadlinesGetRequest
    {
        PredefinedSources = "top 100 US, top 5 GB",
        IncludeTranslationFields = true,
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
        IptcTags = "20000199,20000209",
        NotIptcTags = "20000205,20000209",
        IabTags = "Business,Events",
        NotIabTags = "Agriculture,Metals",
        CustomTags = "Tag1,Tag2,Tag3",
    }
);

βš™οΈ Parameters

request: LatestHeadlinesGetRequest

client.Latestheadlines.PostAsync(LatestHeadlinesPostRequest { ... }) -> OneOf

πŸ“ Description

Retrieves the latest headlines for the specified time period. You can filter results by language, country, source, and more.

πŸ”Œ Usage

await client.Latestheadlines.PostAsync(
    new LatestHeadlinesPostRequest
    {
        Lang = "en",
        PredefinedSources = new List<string>() { "top 50 US", "top 20 GB" },
        IsOpinion = false,
        PageSize = 10,
    }
);

βš™οΈ Parameters

request: LatestHeadlinesPostRequest

Breaking News

client.BreakingNews.BreakingNewsGetAsync(BreakingNewsGetRequest { ... }) -> BreakingNewsResponseDto

πŸ“ Description

Retrieves breaking news articles and sorts them based on specified criteria.

πŸ”Œ Usage

await client.BreakingNews.BreakingNewsGetAsync(
    new BreakingNewsGetRequest
    {
        TopNArticles = 5,
        IncludeTranslationFields = true,
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
    }
);

βš™οΈ Parameters

request: BreakingNewsGetRequest

client.BreakingNews.BreakingNewsPostAsync(BreakingNewsPostRequest { ... }) -> BreakingNewsResponseDto

πŸ“ Description

Retrieves breaking news articles and sorts them based on specified criteria.

πŸ”Œ Usage

await client.BreakingNews.BreakingNewsPostAsync(
    new BreakingNewsPostRequest
    {
        SortBy = SortBy.Relevancy,
        Page = 1,
        PageSize = 100,
        IncludeNlpData = true,
    }
);

βš™οΈ Parameters

request: BreakingNewsPostRequest

Authors

client.Authors.GetAsync(AuthorsGetRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles written by a specified author. You can filter results by language, country, source, and more.

πŸ”Œ Usage

await client.Authors.GetAsync(
    new AuthorsGetRequest
    {
        AuthorName = "Jane Smith",
        PredefinedSources = "top 100 US, top 5 GB",
        From = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        IncludeTranslationFields = true,
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
        NerName = "Tesla",
        IptcTags = "20000199,20000209",
        NotIptcTags = "20000205,20000209",
        IabTags = "Business,Events",
        NotIabTags = "Agriculture,Metals",
        CustomTags = "Tag1,Tag2,Tag3",
    }
);

βš™οΈ Parameters

request: AuthorsGetRequest

client.Authors.PostAsync(AuthorsPostRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles by author. You can filter results by language, country, source, and more.

πŸ”Œ Usage

await client.Authors.PostAsync(
    new AuthorsPostRequest
    {
        AuthorName = "Joanna Stern",
        Sources = new List<string>() { "wsj.com", "nytimes.com" },
        Lang = "en",
        From = new DateTime(2024, 01, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 06, 30, 00, 00, 00, 000),
    }
);

βš™οΈ Parameters

request: AuthorsPostRequest

SearchLink

client.SearchLink.SearchUrlGetAsync(SearchUrlGetRequest { ... }) -> SearchResponseDto

πŸ“ Description

Searches for articles based on specified links or IDs. You can filter results by date range.

πŸ”Œ Usage

await client.SearchLink.SearchUrlGetAsync(
    new SearchUrlGetRequest
    {
        From = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 01, 01, 00, 00, 00, 000),
    }
);

βš™οΈ Parameters

request: SearchUrlGetRequest

client.SearchLink.SearchUrlPostAsync(SearchUrlPostRequest { ... }) -> SearchResponseDto

πŸ“ Description

Searches for articles using their ID(s) or link(s).

πŸ”Œ Usage

await client.SearchLink.SearchUrlPostAsync(
    new SearchUrlPostRequest
    {
        Ids = new List<string>()
        {
            "8ea8a784568ffaa05cb6d1ab2d2e84dd",
            "0146a551ef05ab1c494a55e806e3ce64",
        },
        Links = new List<string>()
        {
            "https://www.nytimes.com/2024/08/30/technology/ai-chatbot-chatgpt-manipulation.html",
            "https://www.bbc.com/news/articles/c39k379grzlo",
        },
    }
);

βš™οΈ Parameters

request: SearchUrlPostRequest

SearchSimilar

client.Searchsimilar.GetAsync(SearchSimilarGetRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles similar to a specified query.

πŸ”Œ Usage

await client.Searchsimilar.GetAsync(
    new SearchSimilarGetRequest
    {
        Q = "technology AND (Apple OR Microsoft) NOT Google",
        SearchIn = "title_content, title_content_translated",
        IncludeTranslationFields = true,
        SimilarDocumentsFields = "title,summary",
        PredefinedSources = "top 100 US, top 5 GB",
        From = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
        NerName = "Tesla",
        IptcTags = "20000199,20000209",
        NotIptcTags = "20000205,20000209",
        CustomTags = "Tag1,Tag2,Tag3",
    }
);

βš™οΈ Parameters

request: SearchSimilarGetRequest

client.Searchsimilar.PostAsync(SearchSimilarPostRequest { ... }) -> OneOf

πŸ“ Description

Searches for articles similar to the specified query. You can filter results by language, country, source, and more.

πŸ”Œ Usage

await client.Searchsimilar.PostAsync(
    new SearchSimilarPostRequest
    {
        Q = "artificial intelligence",
        IncludeSimilarDocuments = true,
        SimilarDocumentsNumber = 5,
    }
);

βš™οΈ Parameters

request: SearchSimilarPostRequest

Sources

client.Sources.GetAsync(SourcesGetRequest { ... }) -> SourcesResponseDto

πŸ“ Description

Retrieves a list of sources based on specified criteria such as language, country, rank, and more.

πŸ”Œ Usage

await client.Sources.GetAsync(
    new SourcesGetRequest { PredefinedSources = "top 100 US, top 5 GB", SourceUrl = "bbc.com" }
);

βš™οΈ Parameters

request: SourcesGetRequest

client.Sources.PostAsync(SourcesPostRequest { ... }) -> SourcesResponseDto

πŸ“ Description

Retrieves the list of sources available in the database. You can filter the sources by language, country, and more.

πŸ”Œ Usage

await client.Sources.PostAsync(
    new SourcesPostRequest
    {
        PredefinedSources = new List<string>() { "top 50 US" },
        IncludeAdditionalInfo = true,
        IsNewsDomain = true,
        NewsDomainType = NewsDomainType.OriginalContent,
        NewsType = "General News Outlets",
    }
);

βš™οΈ Parameters

request: SourcesPostRequest

Aggregation

client.Aggregation.GetAsync(AggregationGetRequest { ... }) -> OneOf

πŸ“ Description

Retrieves the count of articles aggregated by day or hour based on various search criteria, such as keyword, language, country, and source.

πŸ”Œ Usage

await client.Aggregation.GetAsync(
    new AggregationGetRequest
    {
        Q = "technology AND (Apple OR Microsoft) NOT Google",
        SearchIn = "title_content, title_content_translated",
        PredefinedSources = "top 100 US, top 5 GB",
        From = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 07, 01, 00, 00, 00, 000),
        IncludeNlpData = true,
        HasNlp = true,
        Theme = "Business,Finance",
        NotTheme = "Crime",
        IptcTags = "20000199,20000209",
        NotIptcTags = "20000205,20000209",
    }
);

βš™οΈ Parameters

request: AggregationGetRequest

client.Aggregation.PostAsync(AggregationPostRequest { ... }) -> OneOf

πŸ“ Description

Retrieves the count of articles aggregated by day or hour based on various search criteria, such as keyword, language, country, and source.

πŸ”Œ Usage

await client.Aggregation.PostAsync(
    new AggregationPostRequest
    {
        Q = "renewable energy",
        AggregationBy = AggregationBy.Day,
        PredefinedSources = "top 50 US",
        From = new DateTime(2024, 01, 01, 00, 00, 00, 000),
        To = new DateTime(2024, 06, 30, 00, 00, 00, 000),
    }
);

βš™οΈ Parameters

request: AggregationPostRequest

Subscription

client.Subscription.GetAsync() -> SubscriptionResponseDto

πŸ“ Description

Retrieves information about your subscription plan.

πŸ”Œ Usage

await client.Subscription.GetAsync();
client.Subscription.PostAsync() -> SubscriptionResponseDto

πŸ“ Description

Retrieves information about your subscription plan.

πŸ”Œ Usage

await client.Subscription.PostAsync();