Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Complex128(c complex128) *complex128
- func Complex64(c complex64) *complex64
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func Int8(i int8) *int8
- func MustParseDate(date string) time.Time
- func MustParseDateTime(datetime string) time.Time
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func UUID(u uuid.UUID) *uuid.UUID
- func Uint(u uint) *uint
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uint8(u uint8) *uint8
- func Uintptr(u uintptr) *uintptr
- type AdditionalDomainInfo
- type AdditionalDomainInfoEntity
- func (a *AdditionalDomainInfoEntity) GetExtraProperties() map[string]interface{}
- func (a *AdditionalDomainInfoEntity) GetIsNewsDomain() *bool
- func (a *AdditionalDomainInfoEntity) GetNewsDomainType() *string
- func (a *AdditionalDomainInfoEntity) GetNewsType() *string
- func (a *AdditionalDomainInfoEntity) String() string
- func (a *AdditionalDomainInfoEntity) UnmarshalJSON(data []byte) error
- type AdditionalSourceInfo
- func (a *AdditionalSourceInfo) GetCountry() *string
- func (a *AdditionalSourceInfo) GetExtraProperties() map[string]interface{}
- func (a *AdditionalSourceInfo) GetIsNewsDomain() *bool
- func (a *AdditionalSourceInfo) GetNbArticlesFor7D() *int
- func (a *AdditionalSourceInfo) GetNewsDomainType() *string
- func (a *AdditionalSourceInfo) GetNewsType() *string
- func (a *AdditionalSourceInfo) GetRank() *int
- func (a *AdditionalSourceInfo) String() string
- func (a *AdditionalSourceInfo) UnmarshalJSON(data []byte) error
- type AggregationBy
- type AggregationCountResponseDto
- func (a *AggregationCountResponseDto) GetAggregations() *Aggregations
- func (a *AggregationCountResponseDto) GetExtraProperties() map[string]interface{}
- func (a *AggregationCountResponseDto) GetPage() int
- func (a *AggregationCountResponseDto) GetPageSize() int
- func (a *AggregationCountResponseDto) GetStatus() string
- func (a *AggregationCountResponseDto) GetTotalHits() int
- func (a *AggregationCountResponseDto) GetTotalPages() int
- func (a *AggregationCountResponseDto) GetUserInput() *UserInputDto
- func (a *AggregationCountResponseDto) String() string
- func (a *AggregationCountResponseDto) UnmarshalJSON(data []byte) error
- type AggregationGetRequest
- type AggregationGetRequestAggregationBy
- type AggregationGetRequestPublishedDatePrecision
- type AggregationGetRequestSortBy
- type AggregationGetResponse
- func (a *AggregationGetResponse) Accept(visitor AggregationGetResponseVisitor) error
- func (a *AggregationGetResponse) GetAggregationCountResponseDto() *AggregationCountResponseDto
- func (a *AggregationGetResponse) GetFailedAggregationCountResponseDto() *FailedAggregationCountResponseDto
- func (a AggregationGetResponse) MarshalJSON() ([]byte, error)
- func (a *AggregationGetResponse) UnmarshalJSON(data []byte) error
- type AggregationGetResponseVisitor
- type AggregationItem
- type AggregationPostRequest
- type AggregationPostResponse
- func (a *AggregationPostResponse) Accept(visitor AggregationPostResponseVisitor) error
- func (a *AggregationPostResponse) GetAggregationCountResponseDto() *AggregationCountResponseDto
- func (a *AggregationPostResponse) GetFailedAggregationCountResponseDto() *FailedAggregationCountResponseDto
- func (a AggregationPostResponse) MarshalJSON() ([]byte, error)
- func (a *AggregationPostResponse) UnmarshalJSON(data []byte) error
- type AggregationPostResponseVisitor
- type Aggregations
- func (a *Aggregations) Accept(visitor AggregationsVisitor) error
- func (a *Aggregations) GetAggregationItem() *AggregationItem
- func (a *Aggregations) GetAggregationItemList() []*AggregationItem
- func (a Aggregations) MarshalJSON() ([]byte, error)
- func (a *Aggregations) UnmarshalJSON(data []byte) error
- type AggregationsVisitor
- type AllDomainLinks
- type AllDomainLinksVisitor
- type AllLinks
- type AllLinksVisitor
- type ArticleEntity
- func (a *ArticleEntity) GetAdditionalDomainInfo() *AdditionalDomainInfoEntity
- func (a *ArticleEntity) GetAllDomainLinks() *ArticleEntityAllDomainLinks
- func (a *ArticleEntity) GetAllLinks() *ArticleEntityAllLinks
- func (a *ArticleEntity) GetAuthor() *string
- func (a *ArticleEntity) GetAuthors() *Authors
- func (a *ArticleEntity) GetContent() string
- func (a *ArticleEntity) GetCountry() *string
- func (a *ArticleEntity) GetCustomTags() map[string][]string
- func (a *ArticleEntity) GetDescription() *string
- func (a *ArticleEntity) GetDomainUrl() string
- func (a *ArticleEntity) GetExtraProperties() map[string]interface{}
- func (a *ArticleEntity) GetFullDomainUrl() string
- func (a *ArticleEntity) GetId() string
- func (a *ArticleEntity) GetIsHeadline() *bool
- func (a *ArticleEntity) GetIsOpinion() *bool
- func (a *ArticleEntity) GetJournalists() *Journalists
- func (a *ArticleEntity) GetLanguage() *string
- func (a *ArticleEntity) GetLink() string
- func (a *ArticleEntity) GetMedia() *string
- func (a *ArticleEntity) GetNameSource() *string
- func (a *ArticleEntity) GetNlp() *NlpDataEntity
- func (a *ArticleEntity) GetPaidContent() *bool
- func (a *ArticleEntity) GetParentUrl() string
- func (a *ArticleEntity) GetParseDate() *string
- func (a *ArticleEntity) GetPublishedDate() *string
- func (a *ArticleEntity) GetPublishedDatePrecision() *string
- func (a *ArticleEntity) GetRank() int
- func (a *ArticleEntity) GetRights() *string
- func (a *ArticleEntity) GetScore() float64
- func (a *ArticleEntity) GetTitle() string
- func (a *ArticleEntity) GetTwitterAccount() *string
- func (a *ArticleEntity) GetUpdatedDate() *string
- func (a *ArticleEntity) GetUpdatedDatePrecision() *string
- func (a *ArticleEntity) GetWordCount() *int
- func (a *ArticleEntity) String() string
- func (a *ArticleEntity) UnmarshalJSON(data []byte) error
- type ArticleEntityAllDomainLinks
- func (a *ArticleEntityAllDomainLinks) Accept(visitor ArticleEntityAllDomainLinksVisitor) error
- func (a *ArticleEntityAllDomainLinks) GetString() string
- func (a *ArticleEntityAllDomainLinks) GetStringList() []string
- func (a ArticleEntityAllDomainLinks) MarshalJSON() ([]byte, error)
- func (a *ArticleEntityAllDomainLinks) UnmarshalJSON(data []byte) error
- type ArticleEntityAllDomainLinksVisitor
- type ArticleEntityAllLinks
- func (a *ArticleEntityAllLinks) Accept(visitor ArticleEntityAllLinksVisitor) error
- func (a *ArticleEntityAllLinks) GetString() string
- func (a *ArticleEntityAllLinks) GetStringList() []string
- func (a ArticleEntityAllLinks) MarshalJSON() ([]byte, error)
- func (a *ArticleEntityAllLinks) UnmarshalJSON(data []byte) error
- type ArticleEntityAllLinksVisitor
- type Articles
- type AuthorName
- type Authors
- type AuthorsGetRequest
- type AuthorsGetRequestPublishedDatePrecision
- type AuthorsGetRequestSortBy
- type AuthorsGetResponse
- func (a *AuthorsGetResponse) Accept(visitor AuthorsGetResponseVisitor) error
- func (a *AuthorsGetResponse) GetFailedAuthorsResponseDto() *FailedAuthorsResponseDto
- func (a *AuthorsGetResponse) GetSearchResponseDto() *SearchResponseDto
- func (a AuthorsGetResponse) MarshalJSON() ([]byte, error)
- func (a *AuthorsGetResponse) UnmarshalJSON(data []byte) error
- type AuthorsGetResponseVisitor
- type AuthorsPostRequest
- type AuthorsPostResponse
- func (a *AuthorsPostResponse) Accept(visitor AuthorsPostResponseVisitor) error
- func (a *AuthorsPostResponse) GetFailedAuthorsResponseDto() *FailedAuthorsResponseDto
- func (a *AuthorsPostResponse) GetSearchResponseDto() *SearchResponseDto
- func (a AuthorsPostResponse) MarshalJSON() ([]byte, error)
- func (a *AuthorsPostResponse) UnmarshalJSON(data []byte) error
- type AuthorsPostResponseVisitor
- type AuthorsVisitor
- type BadRequestError
- type BaseSearchResponseDto
- func (b *BaseSearchResponseDto) GetExtraProperties() map[string]interface{}
- func (b *BaseSearchResponseDto) GetPage() int
- func (b *BaseSearchResponseDto) GetPageSize() int
- func (b *BaseSearchResponseDto) GetStatus() string
- func (b *BaseSearchResponseDto) GetTotalHits() int
- func (b *BaseSearchResponseDto) GetTotalPages() int
- func (b *BaseSearchResponseDto) String() string
- func (b *BaseSearchResponseDto) UnmarshalJSON(data []byte) error
- type ByParseDate
- type ClusterEntity
- func (c *ClusterEntity) GetArticles() []*ArticleEntity
- func (c *ClusterEntity) GetClusterId() string
- func (c *ClusterEntity) GetClusterSize() int
- func (c *ClusterEntity) GetExtraProperties() map[string]interface{}
- func (c *ClusterEntity) String() string
- func (c *ClusterEntity) UnmarshalJSON(data []byte) error
- type ClusteredArticlesDto
- func (c *ClusteredArticlesDto) GetClusters() []*ClusterEntity
- func (c *ClusteredArticlesDto) GetClustersCount() int
- func (c *ClusteredArticlesDto) GetExtraProperties() map[string]interface{}
- func (c *ClusteredArticlesDto) String() string
- func (c *ClusteredArticlesDto) UnmarshalJSON(data []byte) error
- type ClusteredSearchResponseDto
- func (c *ClusteredSearchResponseDto) GetClusters() []*ClusterEntity
- func (c *ClusteredSearchResponseDto) GetClustersCount() int
- func (c *ClusteredSearchResponseDto) GetExtraProperties() map[string]interface{}
- func (c *ClusteredSearchResponseDto) GetPage() int
- func (c *ClusteredSearchResponseDto) GetPageSize() int
- func (c *ClusteredSearchResponseDto) GetStatus() string
- func (c *ClusteredSearchResponseDto) GetTotalHits() int
- func (c *ClusteredSearchResponseDto) GetTotalPages() int
- func (c *ClusteredSearchResponseDto) GetUserInput() *UserInputDto
- func (c *ClusteredSearchResponseDto) String() string
- func (c *ClusteredSearchResponseDto) UnmarshalJSON(data []byte) error
- type ClusteringEnabled
- type ClusteringThreshold
- type ClusteringVariable
- type ContentSentimentMax
- type ContentSentimentMin
- type Countries
- type CountriesVisitor
- type CustomTags
- type CustomTagsVisitor
- type Error
- type ExcludeDuplicates
- type FailedAggregationCountResponseDto
- func (f *FailedAggregationCountResponseDto) GetExtraProperties() map[string]interface{}
- func (f *FailedAggregationCountResponseDto) GetPage() int
- func (f *FailedAggregationCountResponseDto) GetPageSize() int
- func (f *FailedAggregationCountResponseDto) GetStatus() string
- func (f *FailedAggregationCountResponseDto) GetTotalHits() int
- func (f *FailedAggregationCountResponseDto) GetTotalPages() int
- func (f *FailedAggregationCountResponseDto) GetUserInput() *UserInputDto
- func (f *FailedAggregationCountResponseDto) String() string
- func (f *FailedAggregationCountResponseDto) UnmarshalJSON(data []byte) error
- type FailedAuthorsResponseDto
- func (f *FailedAuthorsResponseDto) GetArticles() []map[string]interface{}
- func (f *FailedAuthorsResponseDto) GetExtraProperties() map[string]interface{}
- func (f *FailedAuthorsResponseDto) GetPage() int
- func (f *FailedAuthorsResponseDto) GetPageSize() int
- func (f *FailedAuthorsResponseDto) GetStatus() string
- func (f *FailedAuthorsResponseDto) GetTotalHits() int
- func (f *FailedAuthorsResponseDto) GetTotalPages() int
- func (f *FailedAuthorsResponseDto) GetUserInput() *UserInputDto
- func (f *FailedAuthorsResponseDto) String() string
- func (f *FailedAuthorsResponseDto) UnmarshalJSON(data []byte) error
- type FailedSearchSimilarResponseDto
- func (f *FailedSearchSimilarResponseDto) GetArticles() []map[string]interface{}
- func (f *FailedSearchSimilarResponseDto) GetExtraProperties() map[string]interface{}
- func (f *FailedSearchSimilarResponseDto) GetPage() int
- func (f *FailedSearchSimilarResponseDto) GetPageSize() int
- func (f *FailedSearchSimilarResponseDto) GetStatus() string
- func (f *FailedSearchSimilarResponseDto) GetTotalHits() int
- func (f *FailedSearchSimilarResponseDto) GetTotalPages() int
- func (f *FailedSearchSimilarResponseDto) GetUserInput() *UserInputDto
- func (f *FailedSearchSimilarResponseDto) String() string
- func (f *FailedSearchSimilarResponseDto) UnmarshalJSON(data []byte) error
- type FileParam
- type FileParamOption
- type ForbiddenError
- type From
- type FromRank
- type FromVisitor
- type HasNlp
- type IabTags
- type IabTagsVisitor
- type Ids
- type IdsVisitor
- type IncludeAdditionalInfo
- type IncludeNlpData
- type IncludeSimilarDocuments
- type InternalServerError
- type IptcTags
- type IptcTagsVisitor
- type IsHeadline
- type IsNewsDomain
- type IsOpinion
- type IsPaidContent
- type Journalists
- type JournalistsVisitor
- type Lang
- type LangVisitor
- type LatestHeadlinesGetRequest
- type LatestHeadlinesGetRequestClusteringVariable
- type LatestHeadlinesGetResponse
- func (l *LatestHeadlinesGetResponse) Accept(visitor LatestHeadlinesGetResponseVisitor) error
- func (l *LatestHeadlinesGetResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
- func (l *LatestHeadlinesGetResponse) GetSearchResponseDto() *SearchResponseDto
- func (l LatestHeadlinesGetResponse) MarshalJSON() ([]byte, error)
- func (l *LatestHeadlinesGetResponse) UnmarshalJSON(data []byte) error
- type LatestHeadlinesGetResponseVisitor
- type LatestHeadlinesPostRequest
- type LatestHeadlinesPostResponse
- func (l *LatestHeadlinesPostResponse) Accept(visitor LatestHeadlinesPostResponseVisitor) error
- func (l *LatestHeadlinesPostResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
- func (l *LatestHeadlinesPostResponse) GetSearchResponseDto() *SearchResponseDto
- func (l LatestHeadlinesPostResponse) MarshalJSON() ([]byte, error)
- func (l *LatestHeadlinesPostResponse) UnmarshalJSON(data []byte) error
- type LatestHeadlinesPostResponseVisitor
- type Links
- type LinksVisitor
- type LocEntityName
- type LocEntityNameVisitor
- type MiscEntityName
- type MiscEntityNameVisitor
- type NamedEntityList
- type NamedEntityListItem
- type NerName
- type NewsDomainType
- type NewsType
- type NewsTypeVisitor
- type NlpDataEntity
- func (n *NlpDataEntity) GetExtraProperties() map[string]interface{}
- func (n *NlpDataEntity) GetIabTagsName() []string
- func (n *NlpDataEntity) GetIptcTagsId() []string
- func (n *NlpDataEntity) GetIptcTagsName() []string
- func (n *NlpDataEntity) GetNerLoc() *NamedEntityList
- func (n *NlpDataEntity) GetNerMisc() *NamedEntityList
- func (n *NlpDataEntity) GetNerOrg() *NamedEntityList
- func (n *NlpDataEntity) GetNerPer() *NamedEntityList
- func (n *NlpDataEntity) GetNewEmbedding() []float64
- func (n *NlpDataEntity) GetSentiment() *SentimentScores
- func (n *NlpDataEntity) GetSummary() *string
- func (n *NlpDataEntity) GetTheme() *string
- func (n *NlpDataEntity) String() string
- func (n *NlpDataEntity) UnmarshalJSON(data []byte) error
- type NotAuthorName
- type NotAuthorNameVisitor
- type NotCountries
- type NotCountriesVisitor
- type NotIabTags
- type NotIabTagsVisitor
- type NotIptcTags
- type NotIptcTagsVisitor
- type NotLang
- type NotLangVisitor
- type NotSources
- type NotSourcesVisitor
- type NotTheme
- type NotThemeVisitor
- type OrgEntityName
- type OrgEntityNameVisitor
- type Page
- type PageSize
- type ParentUrl
- type ParentUrlVisitor
- type PerEntityName
- type PerEntityNameVisitor
- type PredefinedSources
- type PredefinedSourcesVisitor
- type PublishedDatePrecision
- type Q
- type RankedOnly
- type RequestTimeoutError
- type SearchGetRequest
- type SearchGetRequestClusteringVariable
- type SearchGetRequestNewsDomainType
- type SearchGetRequestPublishedDatePrecision
- type SearchGetRequestSortBy
- type SearchGetResponse
- func (s *SearchGetResponse) Accept(visitor SearchGetResponseVisitor) error
- func (s *SearchGetResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
- func (s *SearchGetResponse) GetSearchResponseDto() *SearchResponseDto
- func (s SearchGetResponse) MarshalJSON() ([]byte, error)
- func (s *SearchGetResponse) UnmarshalJSON(data []byte) error
- type SearchGetResponseVisitor
- type SearchIn
- type SearchPostRequest
- type SearchPostResponse
- func (s *SearchPostResponse) Accept(visitor SearchPostResponseVisitor) error
- func (s *SearchPostResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
- func (s *SearchPostResponse) GetSearchResponseDto() *SearchResponseDto
- func (s SearchPostResponse) MarshalJSON() ([]byte, error)
- func (s *SearchPostResponse) UnmarshalJSON(data []byte) error
- type SearchPostResponseVisitor
- type SearchResponseDto
- func (s *SearchResponseDto) GetArticles() *Articles
- func (s *SearchResponseDto) GetExtraProperties() map[string]interface{}
- func (s *SearchResponseDto) GetPage() int
- func (s *SearchResponseDto) GetPageSize() int
- func (s *SearchResponseDto) GetStatus() string
- func (s *SearchResponseDto) GetTotalHits() int
- func (s *SearchResponseDto) GetTotalPages() int
- func (s *SearchResponseDto) GetUserInput() *UserInputDto
- func (s *SearchResponseDto) String() string
- func (s *SearchResponseDto) UnmarshalJSON(data []byte) error
- type SearchSimilarGetRequest
- type SearchSimilarGetRequestPublishedDatePrecision
- type SearchSimilarGetRequestSortBy
- type SearchSimilarGetResponse
- func (s *SearchSimilarGetResponse) Accept(visitor SearchSimilarGetResponseVisitor) error
- func (s *SearchSimilarGetResponse) GetFailedSearchSimilarResponseDto() *FailedSearchSimilarResponseDto
- func (s *SearchSimilarGetResponse) GetSearchSimilarResponseDto() *SearchSimilarResponseDto
- func (s SearchSimilarGetResponse) MarshalJSON() ([]byte, error)
- func (s *SearchSimilarGetResponse) UnmarshalJSON(data []byte) error
- type SearchSimilarGetResponseVisitor
- type SearchSimilarPostRequest
- type SearchSimilarPostResponse
- func (s *SearchSimilarPostResponse) Accept(visitor SearchSimilarPostResponseVisitor) error
- func (s *SearchSimilarPostResponse) GetFailedSearchSimilarResponseDto() *FailedSearchSimilarResponseDto
- func (s *SearchSimilarPostResponse) GetSearchSimilarResponseDto() *SearchSimilarResponseDto
- func (s SearchSimilarPostResponse) MarshalJSON() ([]byte, error)
- func (s *SearchSimilarPostResponse) UnmarshalJSON(data []byte) error
- type SearchSimilarPostResponseVisitor
- type SearchSimilarResponseDto
- func (s *SearchSimilarResponseDto) GetArticles() []*SimilarArticleEntity
- func (s *SearchSimilarResponseDto) GetExtraProperties() map[string]interface{}
- func (s *SearchSimilarResponseDto) GetPage() int
- func (s *SearchSimilarResponseDto) GetPageSize() int
- func (s *SearchSimilarResponseDto) GetStatus() string
- func (s *SearchSimilarResponseDto) GetTotalHits() int
- func (s *SearchSimilarResponseDto) GetTotalPages() int
- func (s *SearchSimilarResponseDto) GetUserInput() *UserInputDto
- func (s *SearchSimilarResponseDto) String() string
- func (s *SearchSimilarResponseDto) UnmarshalJSON(data []byte) error
- type SearchUrlGetRequest
- type SearchUrlPostRequest
- type SentimentScores
- type SimilarArticleEntity
- func (s *SimilarArticleEntity) GetAdditionalDomainInfo() *AdditionalDomainInfoEntity
- func (s *SimilarArticleEntity) GetAllDomainLinks() *ArticleEntityAllDomainLinks
- func (s *SimilarArticleEntity) GetAllLinks() *ArticleEntityAllLinks
- func (s *SimilarArticleEntity) GetAuthor() *string
- func (s *SimilarArticleEntity) GetAuthors() *Authors
- func (s *SimilarArticleEntity) GetContent() string
- func (s *SimilarArticleEntity) GetCountry() *string
- func (s *SimilarArticleEntity) GetCustomTags() map[string][]string
- func (s *SimilarArticleEntity) GetDescription() *string
- func (s *SimilarArticleEntity) GetDomainUrl() string
- func (s *SimilarArticleEntity) GetExtraProperties() map[string]interface{}
- func (s *SimilarArticleEntity) GetFullDomainUrl() string
- func (s *SimilarArticleEntity) GetId() string
- func (s *SimilarArticleEntity) GetIsHeadline() *bool
- func (s *SimilarArticleEntity) GetIsOpinion() *bool
- func (s *SimilarArticleEntity) GetJournalists() *Journalists
- func (s *SimilarArticleEntity) GetLanguage() *string
- func (s *SimilarArticleEntity) GetLink() string
- func (s *SimilarArticleEntity) GetMedia() *string
- func (s *SimilarArticleEntity) GetNameSource() *string
- func (s *SimilarArticleEntity) GetNlp() *NlpDataEntity
- func (s *SimilarArticleEntity) GetPaidContent() *bool
- func (s *SimilarArticleEntity) GetParentUrl() string
- func (s *SimilarArticleEntity) GetParseDate() *string
- func (s *SimilarArticleEntity) GetPublishedDate() *string
- func (s *SimilarArticleEntity) GetPublishedDatePrecision() *string
- func (s *SimilarArticleEntity) GetRank() int
- func (s *SimilarArticleEntity) GetRights() *string
- func (s *SimilarArticleEntity) GetScore() float64
- func (s *SimilarArticleEntity) GetSimilarDocuments() []*SimilarDocument
- func (s *SimilarArticleEntity) GetTitle() string
- func (s *SimilarArticleEntity) GetTwitterAccount() *string
- func (s *SimilarArticleEntity) GetUpdatedDate() *string
- func (s *SimilarArticleEntity) GetUpdatedDatePrecision() *string
- func (s *SimilarArticleEntity) GetWordCount() *int
- func (s *SimilarArticleEntity) String() string
- func (s *SimilarArticleEntity) UnmarshalJSON(data []byte) error
- type SimilarDocument
- func (s *SimilarDocument) GetExtraProperties() map[string]interface{}
- func (s *SimilarDocument) GetId() string
- func (s *SimilarDocument) GetLink() string
- func (s *SimilarDocument) GetScore() float64
- func (s *SimilarDocument) GetTitle() string
- func (s *SimilarDocument) String() string
- func (s *SimilarDocument) UnmarshalJSON(data []byte) error
- type SimilarDocumentsFields
- type SimilarDocumentsNumber
- type SortBy
- type SourceInfo
- func (s *SourceInfo) GetAdditionalInfo() *AdditionalSourceInfo
- func (s *SourceInfo) GetDomainUrl() string
- func (s *SourceInfo) GetExtraProperties() map[string]interface{}
- func (s *SourceInfo) GetLogo() *string
- func (s *SourceInfo) GetNameSource() *string
- func (s *SourceInfo) String() string
- func (s *SourceInfo) UnmarshalJSON(data []byte) error
- type SourceName
- type SourceNameVisitor
- type SourceUrl
- type SourceUrlVisitor
- type Sources
- type SourcesGetRequest
- type SourcesGetRequestNewsDomainType
- type SourcesPostRequest
- type SourcesResponseDto
- func (s *SourcesResponseDto) GetExtraProperties() map[string]interface{}
- func (s *SourcesResponseDto) GetMessage() string
- func (s *SourcesResponseDto) GetSources() []*SourcesResponseDtoSourcesItem
- func (s *SourcesResponseDto) GetUserInput() map[string]interface{}
- func (s *SourcesResponseDto) String() string
- func (s *SourcesResponseDto) UnmarshalJSON(data []byte) error
- type SourcesResponseDtoSourcesItem
- func (s *SourcesResponseDtoSourcesItem) Accept(visitor SourcesResponseDtoSourcesItemVisitor) error
- func (s *SourcesResponseDtoSourcesItem) GetSourceInfo() *SourceInfo
- func (s *SourcesResponseDtoSourcesItem) GetString() string
- func (s SourcesResponseDtoSourcesItem) MarshalJSON() ([]byte, error)
- func (s *SourcesResponseDtoSourcesItem) UnmarshalJSON(data []byte) error
- type SourcesResponseDtoSourcesItemVisitor
- type SourcesVisitor
- type SubscriptionResponseDto
- func (s *SubscriptionResponseDto) GetActive() bool
- func (s *SubscriptionResponseDto) GetConcurrentCalls() int
- func (s *SubscriptionResponseDto) GetExtraProperties() map[string]interface{}
- func (s *SubscriptionResponseDto) GetHistoricalDays() int
- func (s *SubscriptionResponseDto) GetPlan() string
- func (s *SubscriptionResponseDto) GetPlanCalls() int
- func (s *SubscriptionResponseDto) GetRemainingCalls() int
- func (s *SubscriptionResponseDto) String() string
- func (s *SubscriptionResponseDto) UnmarshalJSON(data []byte) error
- type Theme
- type ThemeVisitor
- type TimeFrameCount
- func (t *TimeFrameCount) GetArticleCount() int
- func (t *TimeFrameCount) GetExtraProperties() map[string]interface{}
- func (t *TimeFrameCount) GetTimeFrame() time.Time
- func (t *TimeFrameCount) MarshalJSON() ([]byte, error)
- func (t *TimeFrameCount) String() string
- func (t *TimeFrameCount) UnmarshalJSON(data []byte) error
- type TitleSentimentMax
- type TitleSentimentMin
- type To
- type ToRank
- type ToVisitor
- type TooManyRequestsError
- type UnauthorizedError
- type UnprocessableEntityError
- type UserInputDto
- type When
- type WordCountMax
- type WordCountMin
Constants ¶
This section is empty.
Variables ¶
var Environments = struct { Default string }{ Default: "https://v3-api.newscatcherapi.com", }
Environments defines all of the API environments. These values can be used with the WithBaseURL RequestOption to override the client's default environment, if any.
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
func MustParseDate ¶
MustParseDate attempts to parse the given string as a date time.Time, and panics upon failure.
func MustParseDateTime ¶
MustParseDateTime attempts to parse the given string as a datetime time.Time, and panics upon failure.
Types ¶
type AdditionalDomainInfo ¶ added in v1.1.0
type AdditionalDomainInfo = bool
If true, includes additional domain information in the response for each article: - `is_news_domain`: Boolean indicating if the source is a news domain. - `news_domain_type`: Type of news domain (e.g., `"Original Content"`). - `news_type`: Category of news (e.g., `"News and Blogs"`).
type AdditionalDomainInfoEntity ¶ added in v1.1.0
type AdditionalDomainInfoEntity struct { // Indicates whether the domain is a news domain. IsNewsDomain *bool `json:"is_news_domain,omitempty" url:"is_news_domain,omitempty"` // The type of news content provided by the domain. NewsType *string `json:"news_type,omitempty" url:"news_type,omitempty"` // The type of news domain. NewsDomainType *string `json:"news_domain_type,omitempty" url:"news_domain_type,omitempty"` // contains filtered or unexported fields }
Additional information about the domain of the article.
func (*AdditionalDomainInfoEntity) GetExtraProperties ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) GetExtraProperties() map[string]interface{}
func (*AdditionalDomainInfoEntity) GetIsNewsDomain ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) GetIsNewsDomain() *bool
func (*AdditionalDomainInfoEntity) GetNewsDomainType ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) GetNewsDomainType() *string
func (*AdditionalDomainInfoEntity) GetNewsType ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) GetNewsType() *string
func (*AdditionalDomainInfoEntity) String ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) String() string
func (*AdditionalDomainInfoEntity) UnmarshalJSON ¶ added in v1.1.0
func (a *AdditionalDomainInfoEntity) UnmarshalJSON(data []byte) error
type AdditionalSourceInfo ¶
type AdditionalSourceInfo struct { // The number of articles published by the source in the last seven days. NbArticlesFor7D *int `json:"nb_articles_for_7d,omitempty" url:"nb_articles_for_7d,omitempty"` // The country of origin of the news source. Country *string `json:"country,omitempty" url:"country,omitempty"` // The SEO rank of the news source. Rank *int `json:"rank,omitempty" url:"rank,omitempty"` // Indicates whether the source is a news domain. IsNewsDomain *bool `json:"is_news_domain,omitempty" url:"is_news_domain,omitempty"` // The type of news domain. NewsDomainType *string `json:"news_domain_type,omitempty" url:"news_domain_type,omitempty"` // The category of news provided by the source. NewsType *string `json:"news_type,omitempty" url:"news_type,omitempty"` // contains filtered or unexported fields }
The data model for additional information about a news source.
func (*AdditionalSourceInfo) GetCountry ¶
func (a *AdditionalSourceInfo) GetCountry() *string
func (*AdditionalSourceInfo) GetExtraProperties ¶
func (a *AdditionalSourceInfo) GetExtraProperties() map[string]interface{}
func (*AdditionalSourceInfo) GetIsNewsDomain ¶
func (a *AdditionalSourceInfo) GetIsNewsDomain() *bool
func (*AdditionalSourceInfo) GetNbArticlesFor7D ¶
func (a *AdditionalSourceInfo) GetNbArticlesFor7D() *int
func (*AdditionalSourceInfo) GetNewsDomainType ¶
func (a *AdditionalSourceInfo) GetNewsDomainType() *string
func (*AdditionalSourceInfo) GetNewsType ¶
func (a *AdditionalSourceInfo) GetNewsType() *string
func (*AdditionalSourceInfo) GetRank ¶
func (a *AdditionalSourceInfo) GetRank() *int
func (*AdditionalSourceInfo) String ¶
func (a *AdditionalSourceInfo) String() string
func (*AdditionalSourceInfo) UnmarshalJSON ¶
func (a *AdditionalSourceInfo) UnmarshalJSON(data []byte) error
type AggregationBy ¶ added in v1.1.0
type AggregationBy string
The aggregation interval for the results. Possible values are: - `day`: Aggregates results by day. - `hour`: Aggregates results by hour.
const ( AggregationByDay AggregationBy = "day" AggregationByHour AggregationBy = "hour" )
func NewAggregationByFromString ¶ added in v1.1.0
func NewAggregationByFromString(s string) (AggregationBy, error)
func (AggregationBy) Ptr ¶ added in v1.1.0
func (a AggregationBy) Ptr() *AggregationBy
type AggregationCountResponseDto ¶ added in v1.1.0
type AggregationCountResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // The aggregation results. Can be either a dictionary or a list of dictionaries. Aggregations *Aggregations `json:"aggregations,omitempty" url:"aggregations,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a successful `Aggregation count` request. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing.
func (*AggregationCountResponseDto) GetAggregations ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetAggregations() *Aggregations
func (*AggregationCountResponseDto) GetExtraProperties ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetExtraProperties() map[string]interface{}
func (*AggregationCountResponseDto) GetPage ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetPage() int
func (*AggregationCountResponseDto) GetPageSize ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetPageSize() int
func (*AggregationCountResponseDto) GetStatus ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetStatus() string
func (*AggregationCountResponseDto) GetTotalHits ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetTotalHits() int
func (*AggregationCountResponseDto) GetTotalPages ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetTotalPages() int
func (*AggregationCountResponseDto) GetUserInput ¶ added in v1.1.0
func (a *AggregationCountResponseDto) GetUserInput() *UserInputDto
func (*AggregationCountResponseDto) String ¶ added in v1.1.0
func (a *AggregationCountResponseDto) String() string
func (*AggregationCountResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (a *AggregationCountResponseDto) UnmarshalJSON(data []byte) error
type AggregationGetRequest ¶ added in v1.1.0
type AggregationGetRequest struct { // The keyword(s) to search for in articles. Query syntax supports logical operators (`AND`, `OR`, `NOT`) and wildcards: // // - For an exact match, use double quotes. For example, `"technology news"`. // - Use `*` to search for any keyword. // - Use `+` to include and `-` to exclude specific words or phrases. // For example, `+Apple`, `-Google`. // - Use `AND`, `OR`, and `NOT` to refine search results. // For example, `technology AND (Apple OR Microsoft) NOT Google`. // // For more details, see [Advanced querying](/docs/v3/documentation/guides-and-concepts/advanced-querying). Q string `json:"-" url:"q"` // The article fields to search in. To search in multiple fields, use a comma-separated string. // // Example: `"title, summary"` // // **Note**: The `summary` option is available if NLP is enabled in your plan. // // Available options: `title`, `summary`, `content`. SearchIn *string `json:"-" url:"search_in,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable.To specify multiple sources, use a comma-separated string. // // Examples: // - `"nytimes.com"` // - `"theguardian.com, finance.yahoo.com"` Sources *string `json:"-" url:"sources,omitempty"` // The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. // // Example: `"cnn.com, wsj.com"` NotSources *string `json:"-" url:"not_sources,omitempty"` // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string. // // Example: `"fr, de"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). NotLang *string `json:"-" url:"not_lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string. // // Example:`"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). NotCountries *string `json:"-" url:"not_countries,omitempty"` // The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. // // Example: `"John Doe, Jane Doe"` NotAuthorName *string `json:"-" url:"not_author_name,omitempty"` // The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. From *time.Time `json:"-" url:"from_,omitempty"` // The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. To *time.Time `json:"-" url:"to_,omitempty"` // The precision of the published date. There are three types: // - `full`: The day and time of an article is correctly identified with the appropriate timezone. // - `timezone unknown`: The day and time of an article is correctly identified without timezone. // - `date`: Only the day is identified without an exact time. PublishedDatePrecision *AggregationGetRequestPublishedDatePrecision `json:"-" url:"published_date_precision,omitempty"` // If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object. ByParseDate *bool `json:"-" url:"by_parse_date,omitempty"` // The sorting order of the results. Possible values are: // - `relevancy`: The most relevant results first. // - `date`: The most recently published results first. // - `rank`: The results from the highest-ranked sources first. SortBy *AggregationGetRequestSortBy `json:"-" url:"sort_by,omitempty"` // If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999. RankedOnly *bool `json:"-" url:"ranked_only,omitempty"` // The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. FromRank *int `json:"-" url:"from_rank,omitempty"` // The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. ToRank *int `json:"-" url:"to_rank,omitempty"` // If true, only returns articles that were posted on the home page of a given news domain. IsHeadline *bool `json:"-" url:"is_headline,omitempty"` // If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only. IsOpinion *bool `json:"-" url:"is_opinion,omitempty"` // If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved. IsPaidContent *bool `json:"-" url:"is_paid_content,omitempty"` // The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. // // Example: `"wsj.com/politics, wsj.com/tech"` ParentUrl *string `json:"-" url:"parent_url,omitempty"` // The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. // // Example: `"https://aiindex.stanford.edu/report, https://www.stateof.ai"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllLinks *string `json:"-" url:"all_links,omitempty"` // The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. // // Example: `"who.int, nih.gov"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllDomainLinks *string `json:"-" url:"all_domain_links,omitempty"` // The minimum number of words an article must contain. To be used for avoiding articles with small content. WordCountMin *int `json:"-" url:"word_count_min,omitempty"` // The maximum number of words an article can contain. To be used for avoiding articles with large content. WordCountMax *int `json:"-" url:"word_count_max,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` // If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition. // // The NLP layer includes: // - Theme: General topic of the article. // - Summary: A concise overview of the article content. // - Sentiment: Separate scores for title and content (range: -1 to 1). // - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). // - IPTC tags: Standardized news category tags. // - IAB tags: Content categories for digital advertising. // // **Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). IncludeNlpData *bool `json:"-" url:"include_nlp_data,omitempty"` // If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques. // // **Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). HasNlp *bool `json:"-" url:"has_nlp,omitempty"` // Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string. // // Example: `"Finance, Tech"` // // **Note**: The `theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). // // Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`. Theme *string `json:"-" url:"theme,omitempty"` // Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string. // // Example: `"Crime, Tech"` // // **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). NotTheme *string `json:"-" url:"not_theme,omitempty"` // Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string. // // Example: `"Apple, Microsoft"` // // **Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). OrgEntityName *string `json:"-" url:"ORG_entity_name,omitempty"` // Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string. // // Example: `"Elon Musk, Jeff Bezos"` // // **Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). PerEntityName *string `json:"-" url:"PER_entity_name,omitempty"` // Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string. // // Example: `"California, New York"` // // **Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). LocEntityName *string `json:"-" url:"LOC_entity_name,omitempty"` // Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string. // // Example: `"Bitcoin, Blockchain"` // // **Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). MiscEntityName *string `json:"-" url:"MISC_entity_name,omitempty"` // Filters articles based on the minimum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMin *float64 `json:"-" url:"title_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMax *float64 `json:"-" url:"title_sentiment_max,omitempty"` // Filters articles based on the minimum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMin *float64 `json:"-" url:"content_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMax *float64 `json:"-" url:"content_sentiment_max,omitempty"` // Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string of tag IDs. // // Example: `"20000199, 20000209"` // // **Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). IptcTags *string `json:"-" url:"iptc_tags,omitempty"` // Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string of tag IDs. // // Example: `"20000205, 20000209"` // // **Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). NotIptcTags *string `json:"-" url:"not_iptc_tags,omitempty"` // The aggregation interval for the results. Possible values are: // - `day`: Aggregates results by day. // - `hour`: Aggregates results by hour. AggregationBy *AggregationGetRequestAggregationBy `json:"-" url:"aggregation_by,omitempty"` }
type AggregationGetRequestAggregationBy ¶ added in v1.1.0
type AggregationGetRequestAggregationBy string
const ( AggregationGetRequestAggregationByDay AggregationGetRequestAggregationBy = "day" AggregationGetRequestAggregationByHour AggregationGetRequestAggregationBy = "hour" )
func NewAggregationGetRequestAggregationByFromString ¶ added in v1.1.0
func NewAggregationGetRequestAggregationByFromString(s string) (AggregationGetRequestAggregationBy, error)
func (AggregationGetRequestAggregationBy) Ptr ¶ added in v1.1.0
func (a AggregationGetRequestAggregationBy) Ptr() *AggregationGetRequestAggregationBy
type AggregationGetRequestPublishedDatePrecision ¶ added in v1.1.0
type AggregationGetRequestPublishedDatePrecision string
const ( AggregationGetRequestPublishedDatePrecisionFull AggregationGetRequestPublishedDatePrecision = "full" AggregationGetRequestPublishedDatePrecisionTimezoneUnknown AggregationGetRequestPublishedDatePrecision = "timezone unknown" AggregationGetRequestPublishedDatePrecisionDate AggregationGetRequestPublishedDatePrecision = "date" )
func NewAggregationGetRequestPublishedDatePrecisionFromString ¶ added in v1.1.0
func NewAggregationGetRequestPublishedDatePrecisionFromString(s string) (AggregationGetRequestPublishedDatePrecision, error)
type AggregationGetRequestSortBy ¶ added in v1.1.0
type AggregationGetRequestSortBy string
const ( AggregationGetRequestSortByRelevancy AggregationGetRequestSortBy = "relevancy" AggregationGetRequestSortByDate AggregationGetRequestSortBy = "date" AggregationGetRequestSortByRank AggregationGetRequestSortBy = "rank" )
func NewAggregationGetRequestSortByFromString ¶ added in v1.1.0
func NewAggregationGetRequestSortByFromString(s string) (AggregationGetRequestSortBy, error)
func (AggregationGetRequestSortBy) Ptr ¶ added in v1.1.0
func (a AggregationGetRequestSortBy) Ptr() *AggregationGetRequestSortBy
type AggregationGetResponse ¶ added in v1.1.0
type AggregationGetResponse struct { AggregationCountResponseDto *AggregationCountResponseDto FailedAggregationCountResponseDto *FailedAggregationCountResponseDto // contains filtered or unexported fields }
func NewAggregationGetResponseFromAggregationCountResponseDto ¶ added in v1.1.0
func NewAggregationGetResponseFromAggregationCountResponseDto(value *AggregationCountResponseDto) *AggregationGetResponse
func NewAggregationGetResponseFromFailedAggregationCountResponseDto ¶ added in v1.1.0
func NewAggregationGetResponseFromFailedAggregationCountResponseDto(value *FailedAggregationCountResponseDto) *AggregationGetResponse
func (*AggregationGetResponse) Accept ¶ added in v1.1.0
func (a *AggregationGetResponse) Accept(visitor AggregationGetResponseVisitor) error
func (*AggregationGetResponse) GetAggregationCountResponseDto ¶ added in v1.1.0
func (a *AggregationGetResponse) GetAggregationCountResponseDto() *AggregationCountResponseDto
func (*AggregationGetResponse) GetFailedAggregationCountResponseDto ¶ added in v1.1.0
func (a *AggregationGetResponse) GetFailedAggregationCountResponseDto() *FailedAggregationCountResponseDto
func (AggregationGetResponse) MarshalJSON ¶ added in v1.1.0
func (a AggregationGetResponse) MarshalJSON() ([]byte, error)
func (*AggregationGetResponse) UnmarshalJSON ¶ added in v1.1.0
func (a *AggregationGetResponse) UnmarshalJSON(data []byte) error
type AggregationGetResponseVisitor ¶ added in v1.1.0
type AggregationGetResponseVisitor interface { VisitAggregationCountResponseDto(*AggregationCountResponseDto) error VisitFailedAggregationCountResponseDto(*FailedAggregationCountResponseDto) error }
type AggregationItem ¶ added in v1.1.0
type AggregationItem struct { // Array of time frames and their corresponding article counts AggregationCount []*TimeFrameCount `json:"aggregation_count,omitempty" url:"aggregation_count,omitempty"` // contains filtered or unexported fields }
A single item in the aggregations array containing a collection of time-based article counts.
func (*AggregationItem) GetAggregationCount ¶ added in v1.1.0
func (a *AggregationItem) GetAggregationCount() []*TimeFrameCount
func (*AggregationItem) GetExtraProperties ¶ added in v1.1.0
func (a *AggregationItem) GetExtraProperties() map[string]interface{}
func (*AggregationItem) String ¶ added in v1.1.0
func (a *AggregationItem) String() string
func (*AggregationItem) UnmarshalJSON ¶ added in v1.1.0
func (a *AggregationItem) UnmarshalJSON(data []byte) error
type AggregationPostRequest ¶ added in v1.1.0
type AggregationPostRequest struct { Q Q `json:"q" url:"-"` SearchIn *SearchIn `json:"search_in,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` Sources *Sources `json:"sources,omitempty" url:"-"` NotSources *NotSources `json:"not_sources,omitempty" url:"-"` Lang *Lang `json:"lang,omitempty" url:"-"` NotLang *NotLang `json:"not_lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` NotCountries *NotCountries `json:"not_countries,omitempty" url:"-"` NotAuthorName *NotAuthorName `json:"not_author_name,omitempty" url:"-"` From *From `json:"from_,omitempty" url:"-"` To *To `json:"to_,omitempty" url:"-"` PublishedDatePrecision *PublishedDatePrecision `json:"published_date_precision,omitempty" url:"-"` ByParseDate *ByParseDate `json:"by_parse_date,omitempty" url:"-"` SortBy *SortBy `json:"sort_by,omitempty" url:"-"` RankedOnly *RankedOnly `json:"ranked_only,omitempty" url:"-"` FromRank *FromRank `json:"from_rank,omitempty" url:"-"` ToRank *ToRank `json:"to_rank,omitempty" url:"-"` IsHeadline *IsHeadline `json:"is_headline,omitempty" url:"-"` IsOpinion *IsOpinion `json:"is_opinion,omitempty" url:"-"` IsPaidContent *IsPaidContent `json:"is_paid_content,omitempty" url:"-"` ParentUrl *ParentUrl `json:"parent_url,omitempty" url:"-"` AllLinks *AllLinks `json:"all_links,omitempty" url:"-"` AllDomainLinks *AllDomainLinks `json:"all_domain_links,omitempty" url:"-"` WordCountMin *WordCountMin `json:"word_count_min,omitempty" url:"-"` WordCountMax *WordCountMax `json:"word_count_max,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` IncludeNlpData *IncludeNlpData `json:"include_nlp_data,omitempty" url:"-"` HasNlp *HasNlp `json:"has_nlp,omitempty" url:"-"` Theme *Theme `json:"theme,omitempty" url:"-"` NotTheme *NotTheme `json:"not_theme,omitempty" url:"-"` OrgEntityName *OrgEntityName `json:"ORG_entity_name,omitempty" url:"-"` PerEntityName *PerEntityName `json:"PER_entity_name,omitempty" url:"-"` LocEntityName *LocEntityName `json:"LOC_entity_name,omitempty" url:"-"` MiscEntityName *MiscEntityName `json:"MISC_entity_name,omitempty" url:"-"` TitleSentimentMin *TitleSentimentMin `json:"title_sentiment_min,omitempty" url:"-"` TitleSentimentMax *TitleSentimentMax `json:"title_sentiment_max,omitempty" url:"-"` ContentSentimentMin *ContentSentimentMin `json:"content_sentiment_min,omitempty" url:"-"` ContentSentientMax *ContentSentimentMax `json:"content_sentient_max,omitempty" url:"-"` IptcTags *IptcTags `json:"iptc_tags,omitempty" url:"-"` NotIptcTags *NotIptcTags `json:"not_iptc_tags,omitempty" url:"-"` AggregationBy *AggregationBy `json:"aggregation_by,omitempty" url:"-"` }
type AggregationPostResponse ¶ added in v1.1.0
type AggregationPostResponse struct { AggregationCountResponseDto *AggregationCountResponseDto FailedAggregationCountResponseDto *FailedAggregationCountResponseDto // contains filtered or unexported fields }
func NewAggregationPostResponseFromAggregationCountResponseDto ¶ added in v1.1.0
func NewAggregationPostResponseFromAggregationCountResponseDto(value *AggregationCountResponseDto) *AggregationPostResponse
func NewAggregationPostResponseFromFailedAggregationCountResponseDto ¶ added in v1.1.0
func NewAggregationPostResponseFromFailedAggregationCountResponseDto(value *FailedAggregationCountResponseDto) *AggregationPostResponse
func (*AggregationPostResponse) Accept ¶ added in v1.1.0
func (a *AggregationPostResponse) Accept(visitor AggregationPostResponseVisitor) error
func (*AggregationPostResponse) GetAggregationCountResponseDto ¶ added in v1.1.0
func (a *AggregationPostResponse) GetAggregationCountResponseDto() *AggregationCountResponseDto
func (*AggregationPostResponse) GetFailedAggregationCountResponseDto ¶ added in v1.1.0
func (a *AggregationPostResponse) GetFailedAggregationCountResponseDto() *FailedAggregationCountResponseDto
func (AggregationPostResponse) MarshalJSON ¶ added in v1.1.0
func (a AggregationPostResponse) MarshalJSON() ([]byte, error)
func (*AggregationPostResponse) UnmarshalJSON ¶ added in v1.1.0
func (a *AggregationPostResponse) UnmarshalJSON(data []byte) error
type AggregationPostResponseVisitor ¶ added in v1.1.0
type AggregationPostResponseVisitor interface { VisitAggregationCountResponseDto(*AggregationCountResponseDto) error VisitFailedAggregationCountResponseDto(*FailedAggregationCountResponseDto) error }
type Aggregations ¶ added in v1.1.0
type Aggregations struct { AggregationItem *AggregationItem AggregationItemList []*AggregationItem // contains filtered or unexported fields }
The aggregation results. Can be either a dictionary or a list of dictionaries.
func NewAggregationsFromAggregationItem ¶ added in v1.1.0
func NewAggregationsFromAggregationItem(value *AggregationItem) *Aggregations
func NewAggregationsFromAggregationItemList ¶ added in v1.1.0
func NewAggregationsFromAggregationItemList(value []*AggregationItem) *Aggregations
func (*Aggregations) Accept ¶ added in v1.1.0
func (a *Aggregations) Accept(visitor AggregationsVisitor) error
func (*Aggregations) GetAggregationItem ¶ added in v1.1.0
func (a *Aggregations) GetAggregationItem() *AggregationItem
func (*Aggregations) GetAggregationItemList ¶ added in v1.1.0
func (a *Aggregations) GetAggregationItemList() []*AggregationItem
func (Aggregations) MarshalJSON ¶ added in v1.1.0
func (a Aggregations) MarshalJSON() ([]byte, error)
func (*Aggregations) UnmarshalJSON ¶ added in v1.1.0
func (a *Aggregations) UnmarshalJSON(data []byte) error
type AggregationsVisitor ¶ added in v1.1.0
type AggregationsVisitor interface { VisitAggregationItem(*AggregationItem) error VisitAggregationItemList([]*AggregationItem) error }
type AllDomainLinks ¶ added in v1.1.0
type AllDomainLinks struct { String string StringList []string // contains filtered or unexported fields }
The domain(s) mentioned in the article. For multiple domains, use a comma-separated string or an array of strings.
Examples: - `"who.int, nih.gov"` - `["who.int", "nih.gov"]`
For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url).
func NewAllDomainLinksFromString ¶ added in v1.1.0
func NewAllDomainLinksFromString(value string) *AllDomainLinks
func NewAllDomainLinksFromStringList ¶ added in v1.1.0
func NewAllDomainLinksFromStringList(value []string) *AllDomainLinks
func (*AllDomainLinks) Accept ¶ added in v1.1.0
func (a *AllDomainLinks) Accept(visitor AllDomainLinksVisitor) error
func (*AllDomainLinks) GetString ¶ added in v1.1.0
func (a *AllDomainLinks) GetString() string
func (*AllDomainLinks) GetStringList ¶ added in v1.1.0
func (a *AllDomainLinks) GetStringList() []string
func (AllDomainLinks) MarshalJSON ¶ added in v1.1.0
func (a AllDomainLinks) MarshalJSON() ([]byte, error)
func (*AllDomainLinks) UnmarshalJSON ¶ added in v1.1.0
func (a *AllDomainLinks) UnmarshalJSON(data []byte) error
type AllDomainLinksVisitor ¶ added in v1.1.0
type AllLinks ¶ added in v1.1.0
type AllLinks struct { String string StringList []string // contains filtered or unexported fields }
The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string or an array of strings.
Examples: - `"https://aiindex.stanford.edu/report/, https://www.stateof.ai/"` - `["https://aiindex.stanford.edu/report/", "https://www.stateof.ai/"]`
For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url).
func NewAllLinksFromString ¶ added in v1.1.0
func NewAllLinksFromStringList ¶ added in v1.1.0
func (*AllLinks) Accept ¶ added in v1.1.0
func (a *AllLinks) Accept(visitor AllLinksVisitor) error
func (*AllLinks) GetStringList ¶ added in v1.1.0
func (AllLinks) MarshalJSON ¶ added in v1.1.0
func (*AllLinks) UnmarshalJSON ¶ added in v1.1.0
type AllLinksVisitor ¶ added in v1.1.0
type ArticleEntity ¶ added in v1.1.0
type ArticleEntity struct { // The title of the article. Title string `json:"title" url:"title"` // The primary author of the article. Author *string `json:"author,omitempty" url:"author,omitempty"` // A list of authors of the article. Authors *Authors `json:"authors,omitempty" url:"authors,omitempty"` // A list of journalists associated with the article. Journalists *Journalists `json:"journalists,omitempty" url:"journalists,omitempty"` // The date the article was published. PublishedDate *string `json:"published_date,omitempty" url:"published_date,omitempty"` // The precision of the published date. PublishedDatePrecision *string `json:"published_date_precision,omitempty" url:"published_date_precision,omitempty"` // The date the article was last updated. UpdatedDate *string `json:"updated_date,omitempty" url:"updated_date,omitempty"` // The precision of the updated date. UpdatedDatePrecision *string `json:"updated_date_precision,omitempty" url:"updated_date_precision,omitempty"` // The date the article was parsed. ParseDate *string `json:"parse_date,omitempty" url:"parse_date,omitempty"` // The URL link to the article. Link string `json:"link" url:"link"` // The domain URL of the article. DomainUrl string `json:"domain_url" url:"domain_url"` // The full domain URL of the article. FullDomainUrl string `json:"full_domain_url" url:"full_domain_url"` // The name of the source where the article was published. NameSource *string `json:"name_source,omitempty" url:"name_source,omitempty"` // Indicates if the article is a headline. IsHeadline *bool `json:"is_headline,omitempty" url:"is_headline,omitempty"` // Indicates if the article is paid content. PaidContent *bool `json:"paid_content,omitempty" url:"paid_content,omitempty"` // The categorical URL of the article. ParentUrl string `json:"parent_url" url:"parent_url"` // The country where the article was published. Country *string `json:"country,omitempty" url:"country,omitempty"` // The rights information for the article. Rights *string `json:"rights,omitempty" url:"rights,omitempty"` // The rank of the article's source. Rank int `json:"rank" url:"rank"` // The media associated with the article. Media *string `json:"media,omitempty" url:"media,omitempty"` // The language in which the article is written. Language *string `json:"language,omitempty" url:"language,omitempty"` // A brief description of the article. Description *string `json:"description,omitempty" url:"description,omitempty"` // The content of the article. Content string `json:"content" url:"content"` // The word count of the article. WordCount *int `json:"word_count,omitempty" url:"word_count,omitempty"` // Indicates if the article is an opinion piece. IsOpinion *bool `json:"is_opinion,omitempty" url:"is_opinion,omitempty"` // The Twitter account associated with the article. TwitterAccount *string `json:"twitter_account,omitempty" url:"twitter_account,omitempty"` // A list of all URLs mentioned in the article. AllLinks *ArticleEntityAllLinks `json:"all_links,omitempty" url:"all_links,omitempty"` // A list of all domain URLs mentioned in the article. AllDomainLinks *ArticleEntityAllDomainLinks `json:"all_domain_links,omitempty" url:"all_domain_links,omitempty"` Nlp *NlpDataEntity `json:"nlp,omitempty" url:"nlp,omitempty"` // The unique identifier for the article. Id string `json:"id" url:"id"` // The relevance score of the article. Score float64 `json:"score" url:"score"` // An object that contains custom tags associated with an article, where each key is a taxonomy name, and the value is an array of tags. CustomTags map[string][]string `json:"custom_tags,omitempty" url:"custom_tags,omitempty"` AdditionalDomainInfo *AdditionalDomainInfoEntity `json:"additional_domain_info,omitempty" url:"additional_domain_info,omitempty"` // contains filtered or unexported fields }
The data model representing a single article in the search results.
func (*ArticleEntity) GetAdditionalDomainInfo ¶ added in v1.1.0
func (a *ArticleEntity) GetAdditionalDomainInfo() *AdditionalDomainInfoEntity
func (*ArticleEntity) GetAllDomainLinks ¶ added in v1.1.0
func (a *ArticleEntity) GetAllDomainLinks() *ArticleEntityAllDomainLinks
func (*ArticleEntity) GetAllLinks ¶ added in v1.1.0
func (a *ArticleEntity) GetAllLinks() *ArticleEntityAllLinks
func (*ArticleEntity) GetAuthor ¶ added in v1.1.0
func (a *ArticleEntity) GetAuthor() *string
func (*ArticleEntity) GetAuthors ¶ added in v1.1.0
func (a *ArticleEntity) GetAuthors() *Authors
func (*ArticleEntity) GetContent ¶ added in v1.1.0
func (a *ArticleEntity) GetContent() string
func (*ArticleEntity) GetCountry ¶ added in v1.1.0
func (a *ArticleEntity) GetCountry() *string
func (*ArticleEntity) GetCustomTags ¶ added in v1.1.0
func (a *ArticleEntity) GetCustomTags() map[string][]string
func (*ArticleEntity) GetDescription ¶ added in v1.1.0
func (a *ArticleEntity) GetDescription() *string
func (*ArticleEntity) GetDomainUrl ¶ added in v1.1.0
func (a *ArticleEntity) GetDomainUrl() string
func (*ArticleEntity) GetExtraProperties ¶ added in v1.1.0
func (a *ArticleEntity) GetExtraProperties() map[string]interface{}
func (*ArticleEntity) GetFullDomainUrl ¶ added in v1.1.0
func (a *ArticleEntity) GetFullDomainUrl() string
func (*ArticleEntity) GetId ¶ added in v1.1.0
func (a *ArticleEntity) GetId() string
func (*ArticleEntity) GetIsHeadline ¶ added in v1.1.0
func (a *ArticleEntity) GetIsHeadline() *bool
func (*ArticleEntity) GetIsOpinion ¶ added in v1.1.0
func (a *ArticleEntity) GetIsOpinion() *bool
func (*ArticleEntity) GetJournalists ¶ added in v1.1.0
func (a *ArticleEntity) GetJournalists() *Journalists
func (*ArticleEntity) GetLanguage ¶ added in v1.1.0
func (a *ArticleEntity) GetLanguage() *string
func (*ArticleEntity) GetLink ¶ added in v1.1.0
func (a *ArticleEntity) GetLink() string
func (*ArticleEntity) GetMedia ¶ added in v1.1.0
func (a *ArticleEntity) GetMedia() *string
func (*ArticleEntity) GetNameSource ¶ added in v1.1.0
func (a *ArticleEntity) GetNameSource() *string
func (*ArticleEntity) GetNlp ¶ added in v1.1.0
func (a *ArticleEntity) GetNlp() *NlpDataEntity
func (*ArticleEntity) GetPaidContent ¶ added in v1.1.0
func (a *ArticleEntity) GetPaidContent() *bool
func (*ArticleEntity) GetParentUrl ¶ added in v1.1.0
func (a *ArticleEntity) GetParentUrl() string
func (*ArticleEntity) GetParseDate ¶ added in v1.1.0
func (a *ArticleEntity) GetParseDate() *string
func (*ArticleEntity) GetPublishedDate ¶ added in v1.1.0
func (a *ArticleEntity) GetPublishedDate() *string
func (*ArticleEntity) GetPublishedDatePrecision ¶ added in v1.1.0
func (a *ArticleEntity) GetPublishedDatePrecision() *string
func (*ArticleEntity) GetRank ¶ added in v1.1.0
func (a *ArticleEntity) GetRank() int
func (*ArticleEntity) GetRights ¶ added in v1.1.0
func (a *ArticleEntity) GetRights() *string
func (*ArticleEntity) GetScore ¶ added in v1.1.0
func (a *ArticleEntity) GetScore() float64
func (*ArticleEntity) GetTitle ¶ added in v1.1.0
func (a *ArticleEntity) GetTitle() string
func (*ArticleEntity) GetTwitterAccount ¶ added in v1.1.0
func (a *ArticleEntity) GetTwitterAccount() *string
func (*ArticleEntity) GetUpdatedDate ¶ added in v1.1.0
func (a *ArticleEntity) GetUpdatedDate() *string
func (*ArticleEntity) GetUpdatedDatePrecision ¶ added in v1.1.0
func (a *ArticleEntity) GetUpdatedDatePrecision() *string
func (*ArticleEntity) GetWordCount ¶ added in v1.1.0
func (a *ArticleEntity) GetWordCount() *int
func (*ArticleEntity) String ¶ added in v1.1.0
func (a *ArticleEntity) String() string
func (*ArticleEntity) UnmarshalJSON ¶ added in v1.1.0
func (a *ArticleEntity) UnmarshalJSON(data []byte) error
type ArticleEntityAllDomainLinks ¶ added in v1.1.0
type ArticleEntityAllDomainLinks struct { StringList []string String string // contains filtered or unexported fields }
A list of all domain URLs mentioned in the article.
func NewArticleEntityAllDomainLinksFromString ¶ added in v1.1.0
func NewArticleEntityAllDomainLinksFromString(value string) *ArticleEntityAllDomainLinks
func NewArticleEntityAllDomainLinksFromStringList ¶ added in v1.1.0
func NewArticleEntityAllDomainLinksFromStringList(value []string) *ArticleEntityAllDomainLinks
func (*ArticleEntityAllDomainLinks) Accept ¶ added in v1.1.0
func (a *ArticleEntityAllDomainLinks) Accept(visitor ArticleEntityAllDomainLinksVisitor) error
func (*ArticleEntityAllDomainLinks) GetString ¶ added in v1.1.0
func (a *ArticleEntityAllDomainLinks) GetString() string
func (*ArticleEntityAllDomainLinks) GetStringList ¶ added in v1.1.0
func (a *ArticleEntityAllDomainLinks) GetStringList() []string
func (ArticleEntityAllDomainLinks) MarshalJSON ¶ added in v1.1.0
func (a ArticleEntityAllDomainLinks) MarshalJSON() ([]byte, error)
func (*ArticleEntityAllDomainLinks) UnmarshalJSON ¶ added in v1.1.0
func (a *ArticleEntityAllDomainLinks) UnmarshalJSON(data []byte) error
type ArticleEntityAllDomainLinksVisitor ¶ added in v1.1.0
type ArticleEntityAllLinks ¶ added in v1.1.0
type ArticleEntityAllLinks struct { StringList []string String string // contains filtered or unexported fields }
A list of all URLs mentioned in the article.
func NewArticleEntityAllLinksFromString ¶ added in v1.1.0
func NewArticleEntityAllLinksFromString(value string) *ArticleEntityAllLinks
func NewArticleEntityAllLinksFromStringList ¶ added in v1.1.0
func NewArticleEntityAllLinksFromStringList(value []string) *ArticleEntityAllLinks
func (*ArticleEntityAllLinks) Accept ¶ added in v1.1.0
func (a *ArticleEntityAllLinks) Accept(visitor ArticleEntityAllLinksVisitor) error
func (*ArticleEntityAllLinks) GetString ¶ added in v1.1.0
func (a *ArticleEntityAllLinks) GetString() string
func (*ArticleEntityAllLinks) GetStringList ¶ added in v1.1.0
func (a *ArticleEntityAllLinks) GetStringList() []string
func (ArticleEntityAllLinks) MarshalJSON ¶ added in v1.1.0
func (a ArticleEntityAllLinks) MarshalJSON() ([]byte, error)
func (*ArticleEntityAllLinks) UnmarshalJSON ¶ added in v1.1.0
func (a *ArticleEntityAllLinks) UnmarshalJSON(data []byte) error
type ArticleEntityAllLinksVisitor ¶ added in v1.1.0
type Articles ¶ added in v1.1.0
type Articles = []*ArticleEntity
A list of articles matching the search criteria.
type AuthorName ¶ added in v1.1.0
type AuthorName = string
The name of the author to search for. This parameter returns exact matches only.
type Authors ¶
A list of authors of the article.
func NewAuthorsFromString ¶
func (*Authors) Accept ¶
func (a *Authors) Accept(visitor AuthorsVisitor) error
func (*Authors) GetStringList ¶
func (Authors) MarshalJSON ¶
func (*Authors) UnmarshalJSON ¶
type AuthorsGetRequest ¶
type AuthorsGetRequest struct { // The name of the author to search for. This parameter returns exact matches only. AuthorName string `json:"-" url:"author_name"` // The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. // // Example: `"John Doe, Jane Doe"` NotAuthorName *string `json:"-" url:"not_author_name,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable.To specify multiple sources, use a comma-separated string. // // Examples: // - `"nytimes.com"` // - `"theguardian.com, finance.yahoo.com"` Sources *string `json:"-" url:"sources,omitempty"` // The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. // // Example: `"cnn.com, wsj.com"` NotSources *string `json:"-" url:"not_sources,omitempty"` // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string. // // Example: `"fr, de"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). NotLang *string `json:"-" url:"not_lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string. // // Example:`"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). NotCountries *string `json:"-" url:"not_countries,omitempty"` // The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. From *time.Time `json:"-" url:"from_,omitempty"` // The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. To *time.Time `json:"-" url:"to_,omitempty"` // The precision of the published date. There are three types: // - `full`: The day and time of an article is correctly identified with the appropriate timezone. // - `timezone unknown`: The day and time of an article is correctly identified without timezone. // - `date`: Only the day is identified without an exact time. PublishedDatePrecision *AuthorsGetRequestPublishedDatePrecision `json:"-" url:"published_date_precision,omitempty"` // If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object. ByParseDate *bool `json:"-" url:"by_parse_date,omitempty"` // The sorting order of the results. Possible values are: // - `relevancy`: The most relevant results first. // - `date`: The most recently published results first. // - `rank`: The results from the highest-ranked sources first. SortBy *AuthorsGetRequestSortBy `json:"-" url:"sort_by,omitempty"` // If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999. RankedOnly *bool `json:"-" url:"ranked_only,omitempty"` // The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. FromRank *int `json:"-" url:"from_rank,omitempty"` // The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. ToRank *int `json:"-" url:"to_rank,omitempty"` // If true, only returns articles that were posted on the home page of a given news domain. IsHeadline *bool `json:"-" url:"is_headline,omitempty"` // If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only. IsOpinion *bool `json:"-" url:"is_opinion,omitempty"` // If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved. IsPaidContent *bool `json:"-" url:"is_paid_content,omitempty"` // The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. // // Example: `"wsj.com/politics, wsj.com/tech"` ParentUrl *string `json:"-" url:"parent_url,omitempty"` // The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. // // Example: `"https://aiindex.stanford.edu/report, https://www.stateof.ai"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllLinks *string `json:"-" url:"all_links,omitempty"` // The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. // // Example: `"who.int, nih.gov"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllDomainLinks *string `json:"-" url:"all_domain_links,omitempty"` // The minimum number of words an article must contain. To be used for avoiding articles with small content. WordCountMin *int `json:"-" url:"word_count_min,omitempty"` // The maximum number of words an article can contain. To be used for avoiding articles with large content. WordCountMax *int `json:"-" url:"word_count_max,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` // If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition. // // The NLP layer includes: // - Theme: General topic of the article. // - Summary: A concise overview of the article content. // - Sentiment: Separate scores for title and content (range: -1 to 1). // - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). // - IPTC tags: Standardized news category tags. // - IAB tags: Content categories for digital advertising. // // **Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). IncludeNlpData *bool `json:"-" url:"include_nlp_data,omitempty"` // If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques. // // **Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). HasNlp *bool `json:"-" url:"has_nlp,omitempty"` // Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string. // // Example: `"Finance, Tech"` // // **Note**: The `theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). // // Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`. Theme *string `json:"-" url:"theme,omitempty"` // Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string. // // Example: `"Crime, Tech"` // // **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). NotTheme *string `json:"-" url:"not_theme,omitempty"` // The name of person, organization, location, product or other named entity to search for. To specify multiple names use a comma-separated string. // // Example: `"Tesla, Amazon"` NerName *string `json:"-" url:"ner_name,omitempty"` // Filters articles based on the minimum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMin *float64 `json:"-" url:"title_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMax *float64 `json:"-" url:"title_sentiment_max,omitempty"` // Filters articles based on the minimum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMin *float64 `json:"-" url:"content_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMax *float64 `json:"-" url:"content_sentiment_max,omitempty"` // Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string of tag IDs. // // Example: `"20000199, 20000209"` // // **Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). IptcTags *string `json:"-" url:"iptc_tags,omitempty"` // Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string of tag IDs. // // Example: `"20000205, 20000209"` // // **Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). NotIptcTags *string `json:"-" url:"not_iptc_tags,omitempty"` // Filters articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories, use a comma-separated string. // // Example: `"Business, Events"` // // **Note**: The `iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). IabTags *string `json:"-" url:"iab_tags,omitempty"` // Inverse of the `iab_tags` parameter. Excludes articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories to exclude, use a comma-separated string. // // Example: `"Agriculture, Metals"` // // **Note**: The `not_iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). NotIabTags *string `json:"-" url:"not_iab_tags,omitempty"` // Filters articles based on provided taxonomy that is tailored to your specific needs and is accessible only with your API key. To specify tags, use the following pattern: // // - `custom_tags.taxonomy=Tag1,Tag2,Tag3`, where `taxonomy` is the taxonomy name and `Tag1,Tag2,Tag3` is a comma-separated list of tags. // // Example: `custom_tags.industry="Manufacturing, Supply Chain, Logistics"` // // To learn more, see the [Custom tags](/docs/v3/documentation/guides-and-concepts/custom-tags). CustomTags *string `json:"-" url:"custom_tags,omitempty"` }
type AuthorsGetRequestPublishedDatePrecision ¶ added in v1.1.0
type AuthorsGetRequestPublishedDatePrecision string
const ( AuthorsGetRequestPublishedDatePrecisionFull AuthorsGetRequestPublishedDatePrecision = "full" AuthorsGetRequestPublishedDatePrecisionTimezoneUnknown AuthorsGetRequestPublishedDatePrecision = "timezone unknown" AuthorsGetRequestPublishedDatePrecisionDate AuthorsGetRequestPublishedDatePrecision = "date" )
func NewAuthorsGetRequestPublishedDatePrecisionFromString ¶ added in v1.1.0
func NewAuthorsGetRequestPublishedDatePrecisionFromString(s string) (AuthorsGetRequestPublishedDatePrecision, error)
type AuthorsGetRequestSortBy ¶ added in v1.1.0
type AuthorsGetRequestSortBy string
const ( AuthorsGetRequestSortByRelevancy AuthorsGetRequestSortBy = "relevancy" AuthorsGetRequestSortByDate AuthorsGetRequestSortBy = "date" AuthorsGetRequestSortByRank AuthorsGetRequestSortBy = "rank" )
func NewAuthorsGetRequestSortByFromString ¶ added in v1.1.0
func NewAuthorsGetRequestSortByFromString(s string) (AuthorsGetRequestSortBy, error)
func (AuthorsGetRequestSortBy) Ptr ¶ added in v1.1.0
func (a AuthorsGetRequestSortBy) Ptr() *AuthorsGetRequestSortBy
type AuthorsGetResponse ¶
type AuthorsGetResponse struct { SearchResponseDto *SearchResponseDto FailedAuthorsResponseDto *FailedAuthorsResponseDto // contains filtered or unexported fields }
func NewAuthorsGetResponseFromFailedAuthorsResponseDto ¶ added in v1.1.0
func NewAuthorsGetResponseFromFailedAuthorsResponseDto(value *FailedAuthorsResponseDto) *AuthorsGetResponse
func NewAuthorsGetResponseFromSearchResponseDto ¶ added in v1.1.0
func NewAuthorsGetResponseFromSearchResponseDto(value *SearchResponseDto) *AuthorsGetResponse
func (*AuthorsGetResponse) Accept ¶
func (a *AuthorsGetResponse) Accept(visitor AuthorsGetResponseVisitor) error
func (*AuthorsGetResponse) GetFailedAuthorsResponseDto ¶ added in v1.1.0
func (a *AuthorsGetResponse) GetFailedAuthorsResponseDto() *FailedAuthorsResponseDto
func (*AuthorsGetResponse) GetSearchResponseDto ¶ added in v1.1.0
func (a *AuthorsGetResponse) GetSearchResponseDto() *SearchResponseDto
func (AuthorsGetResponse) MarshalJSON ¶
func (a AuthorsGetResponse) MarshalJSON() ([]byte, error)
func (*AuthorsGetResponse) UnmarshalJSON ¶
func (a *AuthorsGetResponse) UnmarshalJSON(data []byte) error
type AuthorsGetResponseVisitor ¶
type AuthorsGetResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitFailedAuthorsResponseDto(*FailedAuthorsResponseDto) error }
type AuthorsPostRequest ¶ added in v1.1.0
type AuthorsPostRequest struct { AuthorName AuthorName `json:"author_name" url:"-"` NotAuthorName *NotAuthorName `json:"not_author_name,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` Sources *Sources `json:"sources,omitempty" url:"-"` NotSources *NotSources `json:"not_sources,omitempty" url:"-"` Lang *Lang `json:"lang,omitempty" url:"-"` NotLang *NotLang `json:"not_lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` NotCountries *NotCountries `json:"not_countries,omitempty" url:"-"` From *From `json:"from_,omitempty" url:"-"` To *To `json:"to_,omitempty" url:"-"` PublishedDatePrecision *PublishedDatePrecision `json:"published_date_precision,omitempty" url:"-"` ByParseDate *ByParseDate `json:"by_parse_date,omitempty" url:"-"` SortBy *SortBy `json:"sort_by,omitempty" url:"-"` RankedOnly *RankedOnly `json:"ranked_only,omitempty" url:"-"` FromRank *FromRank `json:"from_rank,omitempty" url:"-"` ToRank *ToRank `json:"to_rank,omitempty" url:"-"` IsHeadline *IsHeadline `json:"is_headline,omitempty" url:"-"` IsOpinion *IsOpinion `json:"is_opinion,omitempty" url:"-"` IsPaidContent *IsPaidContent `json:"is_paid_content,omitempty" url:"-"` ParentUrl *ParentUrl `json:"parent_url,omitempty" url:"-"` AllLinks *AllLinks `json:"all_links,omitempty" url:"-"` AllDomainLinks *AllDomainLinks `json:"all_domain_links,omitempty" url:"-"` WordCountMin *WordCountMin `json:"word_count_min,omitempty" url:"-"` WordCountMax *WordCountMax `json:"word_count_max,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` IncludeNlpData *IncludeNlpData `json:"include_nlp_data,omitempty" url:"-"` HasNlp *HasNlp `json:"has_nlp,omitempty" url:"-"` Theme *Theme `json:"theme,omitempty" url:"-"` NotTheme *NotTheme `json:"not_theme,omitempty" url:"-"` NerName *NerName `json:"ner_name,omitempty" url:"-"` TitleSentimentMin *TitleSentimentMin `json:"title_sentiment_min,omitempty" url:"-"` TitleSentimentMax *TitleSentimentMax `json:"title_sentiment_max,omitempty" url:"-"` ContentSentimentMin *ContentSentimentMin `json:"content_sentiment_min,omitempty" url:"-"` ContentSentimentMax *ContentSentimentMax `json:"content_sentiment_max,omitempty" url:"-"` IptcTags *IptcTags `json:"iptc_tags,omitempty" url:"-"` NotIptcTags *NotIptcTags `json:"not_iptc_tags,omitempty" url:"-"` IabTags *IabTags `json:"iab_tags,omitempty" url:"-"` NotIabTags *NotIabTags `json:"not_iab_tags,omitempty" url:"-"` CustomTags *CustomTags `json:"custom_tags,omitempty" url:"-"` }
type AuthorsPostResponse ¶
type AuthorsPostResponse struct { SearchResponseDto *SearchResponseDto FailedAuthorsResponseDto *FailedAuthorsResponseDto // contains filtered or unexported fields }
func NewAuthorsPostResponseFromFailedAuthorsResponseDto ¶ added in v1.1.0
func NewAuthorsPostResponseFromFailedAuthorsResponseDto(value *FailedAuthorsResponseDto) *AuthorsPostResponse
func NewAuthorsPostResponseFromSearchResponseDto ¶ added in v1.1.0
func NewAuthorsPostResponseFromSearchResponseDto(value *SearchResponseDto) *AuthorsPostResponse
func (*AuthorsPostResponse) Accept ¶
func (a *AuthorsPostResponse) Accept(visitor AuthorsPostResponseVisitor) error
func (*AuthorsPostResponse) GetFailedAuthorsResponseDto ¶ added in v1.1.0
func (a *AuthorsPostResponse) GetFailedAuthorsResponseDto() *FailedAuthorsResponseDto
func (*AuthorsPostResponse) GetSearchResponseDto ¶ added in v1.1.0
func (a *AuthorsPostResponse) GetSearchResponseDto() *SearchResponseDto
func (AuthorsPostResponse) MarshalJSON ¶
func (a AuthorsPostResponse) MarshalJSON() ([]byte, error)
func (*AuthorsPostResponse) UnmarshalJSON ¶
func (a *AuthorsPostResponse) UnmarshalJSON(data []byte) error
type AuthorsPostResponseVisitor ¶
type AuthorsPostResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitFailedAuthorsResponseDto(*FailedAuthorsResponseDto) error }
type AuthorsVisitor ¶
type BadRequestError ¶ added in v1.1.0
Bad request
func (*BadRequestError) MarshalJSON ¶ added in v1.1.0
func (b *BadRequestError) MarshalJSON() ([]byte, error)
func (*BadRequestError) UnmarshalJSON ¶ added in v1.1.0
func (b *BadRequestError) UnmarshalJSON(data []byte) error
func (*BadRequestError) Unwrap ¶ added in v1.1.0
func (b *BadRequestError) Unwrap() error
type BaseSearchResponseDto ¶ added in v1.1.0
type BaseSearchResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // contains filtered or unexported fields }
The base response model containing common fields for search operations.
func (*BaseSearchResponseDto) GetExtraProperties ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetExtraProperties() map[string]interface{}
func (*BaseSearchResponseDto) GetPage ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetPage() int
func (*BaseSearchResponseDto) GetPageSize ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetPageSize() int
func (*BaseSearchResponseDto) GetStatus ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetStatus() string
func (*BaseSearchResponseDto) GetTotalHits ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetTotalHits() int
func (*BaseSearchResponseDto) GetTotalPages ¶ added in v1.1.0
func (b *BaseSearchResponseDto) GetTotalPages() int
func (*BaseSearchResponseDto) String ¶ added in v1.1.0
func (b *BaseSearchResponseDto) String() string
func (*BaseSearchResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (b *BaseSearchResponseDto) UnmarshalJSON(data []byte) error
type ByParseDate ¶ added in v1.1.0
type ByParseDate = bool
If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object.
type ClusterEntity ¶ added in v1.1.0
type ClusterEntity struct { // The unique identifier for the cluster. ClusterId string `json:"cluster_id" url:"cluster_id"` // The number of articles in the cluster. ClusterSize int `json:"cluster_size" url:"cluster_size"` // A list of articles in the cluster. Articles []*ArticleEntity `json:"articles,omitempty" url:"articles,omitempty"` // contains filtered or unexported fields }
The data model representing a single cluster of articles.
func (*ClusterEntity) GetArticles ¶ added in v1.1.0
func (c *ClusterEntity) GetArticles() []*ArticleEntity
func (*ClusterEntity) GetClusterId ¶ added in v1.1.0
func (c *ClusterEntity) GetClusterId() string
func (*ClusterEntity) GetClusterSize ¶ added in v1.1.0
func (c *ClusterEntity) GetClusterSize() int
func (*ClusterEntity) GetExtraProperties ¶ added in v1.1.0
func (c *ClusterEntity) GetExtraProperties() map[string]interface{}
func (*ClusterEntity) String ¶ added in v1.1.0
func (c *ClusterEntity) String() string
func (*ClusterEntity) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterEntity) UnmarshalJSON(data []byte) error
type ClusteredArticlesDto ¶ added in v1.1.0
type ClusteredArticlesDto struct { // The number of clusters in the search results. ClustersCount int `json:"clusters_count" url:"clusters_count"` // A list of clusters found in the search results. Clusters []*ClusterEntity `json:"clusters,omitempty" url:"clusters,omitempty"` // contains filtered or unexported fields }
func (*ClusteredArticlesDto) GetClusters ¶ added in v1.1.0
func (c *ClusteredArticlesDto) GetClusters() []*ClusterEntity
func (*ClusteredArticlesDto) GetClustersCount ¶ added in v1.1.0
func (c *ClusteredArticlesDto) GetClustersCount() int
func (*ClusteredArticlesDto) GetExtraProperties ¶ added in v1.1.0
func (c *ClusteredArticlesDto) GetExtraProperties() map[string]interface{}
func (*ClusteredArticlesDto) String ¶ added in v1.1.0
func (c *ClusteredArticlesDto) String() string
func (*ClusteredArticlesDto) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusteredArticlesDto) UnmarshalJSON(data []byte) error
type ClusteredSearchResponseDto ¶ added in v1.1.0
type ClusteredSearchResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // The number of clusters in the search results. ClustersCount int `json:"clusters_count" url:"clusters_count"` // A list of clusters found in the search results. Clusters []*ClusterEntity `json:"clusters,omitempty" url:"clusters,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model when clustering is enabled, grouping similar articles into clusters. Applies to the `Search` and `Latest headlines` requests. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing. - To access article properties in the `articles` response array, use array index notation. For example, `articles[n].title`, where `n` is the zero-based index of the article object (0, 1, 2, etc.). - The `nlp` property within the article object `articles[n].nlp` is only available with NLP-enabled subscription plans.
func (*ClusteredSearchResponseDto) GetClusters ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetClusters() []*ClusterEntity
func (*ClusteredSearchResponseDto) GetClustersCount ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetClustersCount() int
func (*ClusteredSearchResponseDto) GetExtraProperties ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetExtraProperties() map[string]interface{}
func (*ClusteredSearchResponseDto) GetPage ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetPage() int
func (*ClusteredSearchResponseDto) GetPageSize ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetPageSize() int
func (*ClusteredSearchResponseDto) GetStatus ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetStatus() string
func (*ClusteredSearchResponseDto) GetTotalHits ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetTotalHits() int
func (*ClusteredSearchResponseDto) GetTotalPages ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetTotalPages() int
func (*ClusteredSearchResponseDto) GetUserInput ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) GetUserInput() *UserInputDto
func (*ClusteredSearchResponseDto) String ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) String() string
func (*ClusteredSearchResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusteredSearchResponseDto) UnmarshalJSON(data []byte) error
type ClusteringEnabled ¶ added in v1.1.0
type ClusteringEnabled = bool
Determines whether to group similar articles into clusters. If true, the API returns clustered results.
To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles).
type ClusteringThreshold ¶ added in v1.1.0
type ClusteringThreshold = float64
Sets the similarity threshold for grouping articles into clusters. A lower value creates more inclusive clusters, while a higher value requires greater similarity between articles.
For example: - `0.3`: Results in larger, more diverse clusters. - `0.6`: Balances cluster size and article similarity (default). - `0.9`: Creates smaller, tightly related clusters.
To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles).
type ClusteringVariable ¶ added in v1.1.0
type ClusteringVariable string
Specifies which part of the article to use for determining similarity when clustering. Possible values are: - `content`: Uses the full article content (default). - `title`: Uses only the article title. - `summary`: Uses the article summary.
To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles).
const ( ClusteringVariableContent ClusteringVariable = "content" ClusteringVariableTitle ClusteringVariable = "title" ClusteringVariableSummary ClusteringVariable = "summary" )
func NewClusteringVariableFromString ¶ added in v1.1.0
func NewClusteringVariableFromString(s string) (ClusteringVariable, error)
func (ClusteringVariable) Ptr ¶ added in v1.1.0
func (c ClusteringVariable) Ptr() *ClusteringVariable
type ContentSentimentMax ¶ added in v1.1.0
type ContentSentimentMax = float64
Filters articles based on the maximum sentiment score of their content.
Range is `-1.0` to `1.0`, where: - Negative values indicate negative sentiment. - Positive values indicate positive sentiment. - Values close to 0 indicate neutral sentiment.
**Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type ContentSentimentMin ¶ added in v1.1.0
type ContentSentimentMin = float64
Filters articles based on the minimum sentiment score of their content.
Range is `-1.0` to `1.0`, where: - Negative values indicate negative sentiment. - Positive values indicate positive sentiment. - Values close to 0 indicate neutral sentiment.
**Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type Countries ¶ added in v1.1.0
type Countries struct { String string StringList []string // contains filtered or unexported fields }
The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string or an array of strings.
Examples: - `"US,CA"` - `["US", "CA"]`
To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country).
func NewCountriesFromString ¶ added in v1.1.0
func NewCountriesFromStringList ¶ added in v1.1.0
func (*Countries) Accept ¶ added in v1.1.0
func (c *Countries) Accept(visitor CountriesVisitor) error
func (*Countries) GetStringList ¶ added in v1.1.0
func (Countries) MarshalJSON ¶ added in v1.1.0
func (*Countries) UnmarshalJSON ¶ added in v1.1.0
type CountriesVisitor ¶ added in v1.1.0
type CustomTags ¶ added in v1.1.0
type CustomTags struct { String string StringList []string // contains filtered or unexported fields }
Filters articles based on provided taxonomy that is tailored to your specific needs and is accessible only with your API key. To specify tags, use the following pattern:
- `custom_tags.taxonomy=Tag1,Tag2,Tag3`, where `taxonomy` is the taxonomy name and `Tag1,Tag2,Tag3` are comma-separated tags. For POST requests, you can also specify tags as an array of strings.
Examples: - `custom_tags.industry="Manufacturing, Supply Chain, Logistics"` - `"custom_tags.industry": ["Manufacturing", "Supply Chain", "Logistics"]`
To learn more, see the [Custom tags](/docs/v3/documentation/guides-and-concepts/custom-tags).
func NewCustomTagsFromString ¶ added in v1.1.0
func NewCustomTagsFromString(value string) *CustomTags
func NewCustomTagsFromStringList ¶ added in v1.1.0
func NewCustomTagsFromStringList(value []string) *CustomTags
func (*CustomTags) Accept ¶ added in v1.1.0
func (c *CustomTags) Accept(visitor CustomTagsVisitor) error
func (*CustomTags) GetString ¶ added in v1.1.0
func (c *CustomTags) GetString() string
func (*CustomTags) GetStringList ¶ added in v1.1.0
func (c *CustomTags) GetStringList() []string
func (CustomTags) MarshalJSON ¶ added in v1.1.0
func (c CustomTags) MarshalJSON() ([]byte, error)
func (*CustomTags) UnmarshalJSON ¶ added in v1.1.0
func (c *CustomTags) UnmarshalJSON(data []byte) error
type CustomTagsVisitor ¶ added in v1.1.0
type Error ¶ added in v1.1.0
type Error struct { // A detailed description of the error. Message string `json:"message" url:"message"` // The HTTP status code of the error. StatusCode int `json:"status_code" url:"status_code"` // A short description of the status code. Status string `json:"status" url:"status"` // contains filtered or unexported fields }
func (*Error) GetExtraProperties ¶ added in v1.1.0
func (*Error) GetMessage ¶ added in v1.1.0
func (*Error) GetStatusCode ¶ added in v1.1.0
func (*Error) UnmarshalJSON ¶ added in v1.1.0
type ExcludeDuplicates ¶ added in v1.1.0
type ExcludeDuplicates = bool
If true, excludes duplicate and highly similar articles from the search results. If false, returns all relevant articles, including duplicates.
To learn more, see [Articles deduplication](/docs/v3/documentation/guides-and-concepts/articles-deduplication).
type FailedAggregationCountResponseDto ¶ added in v1.1.0
type FailedAggregationCountResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a failed `Aggregation count` request.
func (*FailedAggregationCountResponseDto) GetExtraProperties ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetExtraProperties() map[string]interface{}
func (*FailedAggregationCountResponseDto) GetPage ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetPage() int
func (*FailedAggregationCountResponseDto) GetPageSize ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetPageSize() int
func (*FailedAggregationCountResponseDto) GetStatus ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetStatus() string
func (*FailedAggregationCountResponseDto) GetTotalHits ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetTotalHits() int
func (*FailedAggregationCountResponseDto) GetTotalPages ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetTotalPages() int
func (*FailedAggregationCountResponseDto) GetUserInput ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) GetUserInput() *UserInputDto
func (*FailedAggregationCountResponseDto) String ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) String() string
func (*FailedAggregationCountResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (f *FailedAggregationCountResponseDto) UnmarshalJSON(data []byte) error
type FailedAuthorsResponseDto ¶ added in v1.1.0
type FailedAuthorsResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // An empty list of articles, as no matches were found. Articles []map[string]interface{} `json:"articles,omitempty" url:"articles,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a failed `Authors` search request.
func (*FailedAuthorsResponseDto) GetArticles ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetArticles() []map[string]interface{}
func (*FailedAuthorsResponseDto) GetExtraProperties ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetExtraProperties() map[string]interface{}
func (*FailedAuthorsResponseDto) GetPage ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetPage() int
func (*FailedAuthorsResponseDto) GetPageSize ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetPageSize() int
func (*FailedAuthorsResponseDto) GetStatus ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetStatus() string
func (*FailedAuthorsResponseDto) GetTotalHits ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetTotalHits() int
func (*FailedAuthorsResponseDto) GetTotalPages ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetTotalPages() int
func (*FailedAuthorsResponseDto) GetUserInput ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) GetUserInput() *UserInputDto
func (*FailedAuthorsResponseDto) String ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) String() string
func (*FailedAuthorsResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (f *FailedAuthorsResponseDto) UnmarshalJSON(data []byte) error
type FailedSearchSimilarResponseDto ¶ added in v1.1.0
type FailedSearchSimilarResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // An empty list of articles, as no matches were found. Articles []map[string]interface{} `json:"articles,omitempty" url:"articles,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a failed `Search Similar` request.
func (*FailedSearchSimilarResponseDto) GetArticles ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetArticles() []map[string]interface{}
func (*FailedSearchSimilarResponseDto) GetExtraProperties ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetExtraProperties() map[string]interface{}
func (*FailedSearchSimilarResponseDto) GetPage ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetPage() int
func (*FailedSearchSimilarResponseDto) GetPageSize ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetPageSize() int
func (*FailedSearchSimilarResponseDto) GetStatus ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetStatus() string
func (*FailedSearchSimilarResponseDto) GetTotalHits ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetTotalHits() int
func (*FailedSearchSimilarResponseDto) GetTotalPages ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetTotalPages() int
func (*FailedSearchSimilarResponseDto) GetUserInput ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) GetUserInput() *UserInputDto
func (*FailedSearchSimilarResponseDto) String ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) String() string
func (*FailedSearchSimilarResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (f *FailedSearchSimilarResponseDto) UnmarshalJSON(data []byte) error
type FileParam ¶
FileParam is a file type suitable for multipart/form-data uploads.
func NewFileParam ¶
func NewFileParam( reader io.Reader, filename string, contentType string, opts ...FileParamOption, ) *FileParam
NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file upload endpoints accept a simple io.Reader, which is usually created by opening a file via os.Open.
However, some endpoints require additional metadata about the file such as a specific Content-Type or custom filename. FileParam makes it easier to create the correct type signature for these endpoints.
func (*FileParam) ContentType ¶
type FileParamOption ¶
type FileParamOption interface {
// contains filtered or unexported methods
}
FileParamOption adapts the behavior of the FileParam. No options are implemented yet, but this interface allows for future extensibility.
type ForbiddenError ¶ added in v1.1.0
Forbidden - Server refuses action
func (*ForbiddenError) MarshalJSON ¶ added in v1.1.0
func (f *ForbiddenError) MarshalJSON() ([]byte, error)
func (*ForbiddenError) UnmarshalJSON ¶ added in v1.1.0
func (f *ForbiddenError) UnmarshalJSON(data []byte) error
func (*ForbiddenError) Unwrap ¶ added in v1.1.0
func (f *ForbiddenError) Unwrap() error
type From ¶ added in v1.1.0
The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text strings. The default time zone is UTC.
Formats with examples: - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` - YYYY-MM-dd: `2024-07-01` - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` - YYYY/mm/dd: `2024/07/01` - English phrases: `1 day ago`, `today`
**Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`.
func NewFromFromDateTime ¶ added in v1.1.0
func NewFromFromString ¶ added in v1.1.0
func (*From) Accept ¶ added in v1.1.0
func (f *From) Accept(visitor FromVisitor) error
func (*From) GetDateTime ¶ added in v1.1.0
func (From) MarshalJSON ¶ added in v1.1.0
func (*From) UnmarshalJSON ¶ added in v1.1.0
type FromRank ¶ added in v1.1.0
type FromRank = int
The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.
type FromVisitor ¶ added in v1.1.0
type HasNlp ¶ added in v1.1.0
type HasNlp = bool
If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques.
**Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type IabTags ¶ added in v1.1.0
Filters articles based on Interactive Advertising Bureau (IAB) content categories.These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories, use a comma-separated string or an array of strings.
Examples: - `"Business, Events"` - `["Business", "Events"]`
**Note**: The `iab_tags` parameter is only available if tags are included in your subscription plan.
To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/).
func NewIabTagsFromString ¶ added in v1.1.0
func NewIabTagsFromStringList ¶ added in v1.1.0
func (*IabTags) Accept ¶ added in v1.1.0
func (i *IabTags) Accept(visitor IabTagsVisitor) error
func (*IabTags) GetStringList ¶ added in v1.1.0
func (IabTags) MarshalJSON ¶ added in v1.1.0
func (*IabTags) UnmarshalJSON ¶ added in v1.1.0
type IabTagsVisitor ¶ added in v1.1.0
type Ids ¶ added in v1.1.0
The Newscatcher article ID (corresponds to the `_id` field in API response) or a list of article IDs to search for. To specify multiple IDs, use a comma-separated string or an array of strings.
Examples: - `"5f8d0d55b6e45e00179c6e7e,5f8d0d55b6e45e00179c6e7f"` - `["5f8d0d55b6e45e00179c6e7e","5f8d0d55b6e45e00179c6e7f"]`
**Caution**: You can use either the `links` or the `ids` parameter, but not both at the same time.
func NewIdsFromString ¶ added in v1.1.0
func NewIdsFromStringList ¶ added in v1.1.0
func (*Ids) Accept ¶ added in v1.1.0
func (i *Ids) Accept(visitor IdsVisitor) error
func (*Ids) GetStringList ¶ added in v1.1.0
func (Ids) MarshalJSON ¶ added in v1.1.0
func (*Ids) UnmarshalJSON ¶ added in v1.1.0
type IdsVisitor ¶ added in v1.1.0
type IncludeAdditionalInfo ¶ added in v1.1.0
type IncludeAdditionalInfo = bool
If true, returns the following additional datapoints about each news source: - `nb_articles_for_7d`: The number of articles published by the source in the last week. - `country`: Source country of origin. - `rank`: SEO rank. - `is_news_domain`: Boolean indicating if the source is a news domain. - `news_domain_type`: Type of news domain (e.g., "Original Content"). - `news_type`: Category of news (e.g., "General News Outlets").
type IncludeNlpData ¶ added in v1.1.0
type IncludeNlpData = bool
If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition.
The NLP layer includes: - Theme: General topic of the article. - Summary: A concise overview of the article content. - Sentiment: Separate scores for title and content (range: -1 to 1). - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). - IPTC tags: Standardized news category tags. - IAB tags: Content categories for digital advertising.
**Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type IncludeSimilarDocuments ¶ added in v1.1.0
type IncludeSimilarDocuments = bool
If true, includes similar documents in the response.
type InternalServerError ¶ added in v1.1.0
Internal server error
func (*InternalServerError) MarshalJSON ¶ added in v1.1.0
func (i *InternalServerError) MarshalJSON() ([]byte, error)
func (*InternalServerError) UnmarshalJSON ¶ added in v1.1.0
func (i *InternalServerError) UnmarshalJSON(data []byte) error
func (*InternalServerError) Unwrap ¶ added in v1.1.0
func (i *InternalServerError) Unwrap() error
type IptcTags ¶ added in v1.1.0
type IptcTags struct { String string StringList []string // contains filtered or unexported fields }
Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string or an array of strings.
Examples: - `"20000199, 20000209"` - `["20000199", "20000209"]`
**Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan.
To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html).
func NewIptcTagsFromString ¶ added in v1.1.0
func NewIptcTagsFromStringList ¶ added in v1.1.0
func (*IptcTags) Accept ¶ added in v1.1.0
func (i *IptcTags) Accept(visitor IptcTagsVisitor) error
func (*IptcTags) GetStringList ¶ added in v1.1.0
func (IptcTags) MarshalJSON ¶ added in v1.1.0
func (*IptcTags) UnmarshalJSON ¶ added in v1.1.0
type IptcTagsVisitor ¶ added in v1.1.0
type IsHeadline ¶ added in v1.1.0
type IsHeadline = bool
If true, only returns articles that were posted on the home page of a given news domain.
type IsNewsDomain ¶ added in v1.1.0
type IsNewsDomain = bool
If true, filters results to include only news domains.
type IsOpinion ¶ added in v1.1.0
type IsOpinion = bool
If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only.
type IsPaidContent ¶ added in v1.1.0
type IsPaidContent = bool
If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved.
type Journalists ¶
type Journalists struct { StringList []string String string // contains filtered or unexported fields }
A list of journalists associated with the article.
func NewJournalistsFromString ¶
func NewJournalistsFromString(value string) *Journalists
func NewJournalistsFromStringList ¶
func NewJournalistsFromStringList(value []string) *Journalists
func (*Journalists) Accept ¶
func (j *Journalists) Accept(visitor JournalistsVisitor) error
func (*Journalists) GetString ¶
func (j *Journalists) GetString() string
func (*Journalists) GetStringList ¶
func (j *Journalists) GetStringList() []string
func (Journalists) MarshalJSON ¶
func (j Journalists) MarshalJSON() ([]byte, error)
func (*Journalists) UnmarshalJSON ¶
func (j *Journalists) UnmarshalJSON(data []byte) error
type JournalistsVisitor ¶
type Lang ¶ added in v1.1.0
The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string or an array of strings.
Examples: - `"en,es"` - `["en", "es"]`
To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang).
func NewLangFromString ¶ added in v1.1.0
func NewLangFromStringList ¶ added in v1.1.0
func (*Lang) Accept ¶ added in v1.1.0
func (l *Lang) Accept(visitor LangVisitor) error
func (*Lang) GetStringList ¶ added in v1.1.0
func (Lang) MarshalJSON ¶ added in v1.1.0
func (*Lang) UnmarshalJSON ¶ added in v1.1.0
type LangVisitor ¶ added in v1.1.0
type LatestHeadlinesGetRequest ¶
type LatestHeadlinesGetRequest struct { // The time period for which you want to get the latest headlines. // // Format examples: // - `7d`: Last seven days // - `30d`: Last 30 days // - `1h`: Last hour // - `24h`: Last 24 hours When *string `json:"-" url:"when,omitempty"` // If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object. ByParseDate *bool `json:"-" url:"by_parse_date,omitempty"` // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string. // // Example: `"fr, de"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). NotLang *string `json:"-" url:"not_lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string. // // Example:`"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). NotCountries *string `json:"-" url:"not_countries,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable.To specify multiple sources, use a comma-separated string. // // Examples: // - `"nytimes.com"` // - `"theguardian.com, finance.yahoo.com"` Sources *string `json:"-" url:"sources,omitempty"` // The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. // // Example: `"cnn.com, wsj.com"` NotSources *string `json:"-" url:"not_sources,omitempty"` // The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. // // Example: `"John Doe, Jane Doe"` NotAuthorName *string `json:"-" url:"not_author_name,omitempty"` // If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999. RankedOnly *bool `json:"-" url:"ranked_only,omitempty"` // If true, only returns articles that were posted on the home page of a given news domain. IsHeadline *bool `json:"-" url:"is_headline,omitempty"` // If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only. IsOpinion *bool `json:"-" url:"is_opinion,omitempty"` // If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved. IsPaidContent *bool `json:"-" url:"is_paid_content,omitempty"` // The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. // // Example: `"wsj.com/politics, wsj.com/tech"` ParentUrl *string `json:"-" url:"parent_url,omitempty"` // The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. // // Example: `"https://aiindex.stanford.edu/report, https://www.stateof.ai"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllLinks *string `json:"-" url:"all_links,omitempty"` // The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. // // Example: `"who.int, nih.gov"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllDomainLinks *string `json:"-" url:"all_domain_links,omitempty"` // The minimum number of words an article must contain. To be used for avoiding articles with small content. WordCountMin *int `json:"-" url:"word_count_min,omitempty"` // The maximum number of words an article can contain. To be used for avoiding articles with large content. WordCountMax *int `json:"-" url:"word_count_max,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` // Determines whether to group similar articles into clusters. If true, the API returns clustered results. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringEnabled *bool `json:"-" url:"clustering_enabled,omitempty"` // Specifies which part of the article to use for determining similarity when clustering. // // Possible values are: // - `content`: Uses the full article content (default). // - `title`: Uses only the article title. // - `summary`: Uses the article summary. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringVariable *LatestHeadlinesGetRequestClusteringVariable `json:"-" url:"clustering_variable,omitempty"` // Sets the similarity threshold for grouping articles into clusters. A lower value creates more inclusive clusters, while a higher value requires greater similarity between articles. // // Examples: // - `0.3`: Results in larger, more diverse clusters. // - `0.6`: Balances cluster size and article similarity (default). // - `0.9`: Creates smaller, tightly related clusters. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringThreshold *float64 `json:"-" url:"clustering_threshold,omitempty"` // If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition. // // The NLP layer includes: // - Theme: General topic of the article. // - Summary: A concise overview of the article content. // - Sentiment: Separate scores for title and content (range: -1 to 1). // - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). // - IPTC tags: Standardized news category tags. // - IAB tags: Content categories for digital advertising. // // **Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). IncludeNlpData *bool `json:"-" url:"include_nlp_data,omitempty"` // If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques. // // **Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). HasNlp *bool `json:"-" url:"has_nlp,omitempty"` // Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string. // // Example: `"Finance, Tech"` // // **Note**: The `theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). // // Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`. Theme *string `json:"-" url:"theme,omitempty"` // Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string. // // Example: `"Crime, Tech"` // // **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). NotTheme *string `json:"-" url:"not_theme,omitempty"` // Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string. // // Example: `"Apple, Microsoft"` // // **Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). OrgEntityName *string `json:"-" url:"ORG_entity_name,omitempty"` // Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string. // // Example: `"Elon Musk, Jeff Bezos"` // // **Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). PerEntityName *string `json:"-" url:"PER_entity_name,omitempty"` // Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string. // // Example: `"California, New York"` // // **Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). LocEntityName *string `json:"-" url:"LOC_entity_name,omitempty"` // Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string. // // Example: `"Bitcoin, Blockchain"` // // **Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). MiscEntityName *string `json:"-" url:"MISC_entity_name,omitempty"` // Filters articles based on the minimum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMin *float64 `json:"-" url:"title_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMax *float64 `json:"-" url:"title_sentiment_max,omitempty"` // Filters articles based on the minimum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMin *float64 `json:"-" url:"content_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMax *float64 `json:"-" url:"content_sentiment_max,omitempty"` // Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string of tag IDs. // // Example: `"20000199, 20000209"` // // **Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). IptcTags *string `json:"-" url:"iptc_tags,omitempty"` // Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string of tag IDs. // // Example: `"20000205, 20000209"` // // **Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). NotIptcTags *string `json:"-" url:"not_iptc_tags,omitempty"` // Filters articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories, use a comma-separated string. // // Example: `"Business, Events"` // // **Note**: The `iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). IabTags *string `json:"-" url:"iab_tags,omitempty"` // Inverse of the `iab_tags` parameter. Excludes articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories to exclude, use a comma-separated string. // // Example: `"Agriculture, Metals"` // // **Note**: The `not_iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). NotIabTags *string `json:"-" url:"not_iab_tags,omitempty"` // Filters articles based on provided taxonomy that is tailored to your specific needs and is accessible only with your API key. To specify tags, use the following pattern: // // - `custom_tags.taxonomy=Tag1,Tag2,Tag3`, where `taxonomy` is the taxonomy name and `Tag1,Tag2,Tag3` is a comma-separated list of tags. // // Example: `custom_tags.industry="Manufacturing, Supply Chain, Logistics"` // // To learn more, see the [Custom tags](/docs/v3/documentation/guides-and-concepts/custom-tags). CustomTags *string `json:"-" url:"custom_tags,omitempty"` }
type LatestHeadlinesGetRequestClusteringVariable ¶ added in v1.1.0
type LatestHeadlinesGetRequestClusteringVariable string
const ( LatestHeadlinesGetRequestClusteringVariableContent LatestHeadlinesGetRequestClusteringVariable = "content" LatestHeadlinesGetRequestClusteringVariableTitle LatestHeadlinesGetRequestClusteringVariable = "title" LatestHeadlinesGetRequestClusteringVariableSummary LatestHeadlinesGetRequestClusteringVariable = "summary" )
func NewLatestHeadlinesGetRequestClusteringVariableFromString ¶ added in v1.1.0
func NewLatestHeadlinesGetRequestClusteringVariableFromString(s string) (LatestHeadlinesGetRequestClusteringVariable, error)
type LatestHeadlinesGetResponse ¶
type LatestHeadlinesGetResponse struct { SearchResponseDto *SearchResponseDto ClusteredSearchResponseDto *ClusteredSearchResponseDto // contains filtered or unexported fields }
func NewLatestHeadlinesGetResponseFromClusteredSearchResponseDto ¶ added in v1.1.0
func NewLatestHeadlinesGetResponseFromClusteredSearchResponseDto(value *ClusteredSearchResponseDto) *LatestHeadlinesGetResponse
func NewLatestHeadlinesGetResponseFromSearchResponseDto ¶ added in v1.1.0
func NewLatestHeadlinesGetResponseFromSearchResponseDto(value *SearchResponseDto) *LatestHeadlinesGetResponse
func (*LatestHeadlinesGetResponse) Accept ¶
func (l *LatestHeadlinesGetResponse) Accept(visitor LatestHeadlinesGetResponseVisitor) error
func (*LatestHeadlinesGetResponse) GetClusteredSearchResponseDto ¶ added in v1.1.0
func (l *LatestHeadlinesGetResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
func (*LatestHeadlinesGetResponse) GetSearchResponseDto ¶ added in v1.1.0
func (l *LatestHeadlinesGetResponse) GetSearchResponseDto() *SearchResponseDto
func (LatestHeadlinesGetResponse) MarshalJSON ¶
func (l LatestHeadlinesGetResponse) MarshalJSON() ([]byte, error)
func (*LatestHeadlinesGetResponse) UnmarshalJSON ¶
func (l *LatestHeadlinesGetResponse) UnmarshalJSON(data []byte) error
type LatestHeadlinesGetResponseVisitor ¶
type LatestHeadlinesGetResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitClusteredSearchResponseDto(*ClusteredSearchResponseDto) error }
type LatestHeadlinesPostRequest ¶ added in v1.1.0
type LatestHeadlinesPostRequest struct { When *When `json:"when,omitempty" url:"-"` ByParseDate *ByParseDate `json:"by_parse_date,omitempty" url:"-"` Lang *Lang `json:"lang,omitempty" url:"-"` NotLang *NotLang `json:"not_lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` NotCountries *NotCountries `json:"not_countries,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` Sources *Sources `json:"sources,omitempty" url:"-"` NotSources *NotSources `json:"not_sources,omitempty" url:"-"` NotAuthorName *NotAuthorName `json:"not_author_name,omitempty" url:"-"` RankedOnly *RankedOnly `json:"ranked_only,omitempty" url:"-"` IsHeadline *IsHeadline `json:"is_headline,omitempty" url:"-"` IsOpinion *IsOpinion `json:"is_opinion,omitempty" url:"-"` IsPaidContent *IsPaidContent `json:"is_paid_content,omitempty" url:"-"` ParentUrl *ParentUrl `json:"parent_url,omitempty" url:"-"` AllLinks *AllLinks `json:"all_links,omitempty" url:"-"` AllDomainLinks *AllDomainLinks `json:"all_domain_links,omitempty" url:"-"` WordCountMin *WordCountMin `json:"word_count_min,omitempty" url:"-"` WordCountMax *WordCountMax `json:"word_count_max,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` ClusteringEnabled *ClusteringEnabled `json:"clustering_enabled,omitempty" url:"-"` ClusteringVariable *ClusteringVariable `json:"clustering_variable,omitempty" url:"-"` ClusteringThreshold *ClusteringThreshold `json:"clustering_threshold,omitempty" url:"-"` IncludeNlpData *IncludeNlpData `json:"include_nlp_data,omitempty" url:"-"` HasNlp *HasNlp `json:"has_nlp,omitempty" url:"-"` Theme *Theme `json:"theme,omitempty" url:"-"` NotTheme *NotTheme `json:"not_theme,omitempty" url:"-"` OrgEntityName *OrgEntityName `json:"ORG_entity_name,omitempty" url:"-"` PerEntityName *PerEntityName `json:"PER_entity_name,omitempty" url:"-"` LocEntityName *LocEntityName `json:"LOC_entity_name,omitempty" url:"-"` MiscEntityName *MiscEntityName `json:"MISC_entity_name,omitempty" url:"-"` TitleSentimentMin *TitleSentimentMin `json:"title_sentiment_min,omitempty" url:"-"` TitleSentimentMax *TitleSentimentMax `json:"title_sentiment_max,omitempty" url:"-"` ContentSentimentMin *ContentSentimentMin `json:"content_sentiment_min,omitempty" url:"-"` ContentSentimentMax *ContentSentimentMax `json:"content_sentiment_max,omitempty" url:"-"` IptcTags *IptcTags `json:"iptc_tags,omitempty" url:"-"` NotIptcTags *NotIptcTags `json:"not_iptc_tags,omitempty" url:"-"` IabTags *IabTags `json:"iab_tags,omitempty" url:"-"` NotIabTags *NotIabTags `json:"not_iab_tags,omitempty" url:"-"` CustomTags *CustomTags `json:"custom_tags,omitempty" url:"-"` }
type LatestHeadlinesPostResponse ¶
type LatestHeadlinesPostResponse struct { SearchResponseDto *SearchResponseDto ClusteredSearchResponseDto *ClusteredSearchResponseDto // contains filtered or unexported fields }
func NewLatestHeadlinesPostResponseFromClusteredSearchResponseDto ¶ added in v1.1.0
func NewLatestHeadlinesPostResponseFromClusteredSearchResponseDto(value *ClusteredSearchResponseDto) *LatestHeadlinesPostResponse
func NewLatestHeadlinesPostResponseFromSearchResponseDto ¶ added in v1.1.0
func NewLatestHeadlinesPostResponseFromSearchResponseDto(value *SearchResponseDto) *LatestHeadlinesPostResponse
func (*LatestHeadlinesPostResponse) Accept ¶
func (l *LatestHeadlinesPostResponse) Accept(visitor LatestHeadlinesPostResponseVisitor) error
func (*LatestHeadlinesPostResponse) GetClusteredSearchResponseDto ¶ added in v1.1.0
func (l *LatestHeadlinesPostResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
func (*LatestHeadlinesPostResponse) GetSearchResponseDto ¶ added in v1.1.0
func (l *LatestHeadlinesPostResponse) GetSearchResponseDto() *SearchResponseDto
func (LatestHeadlinesPostResponse) MarshalJSON ¶
func (l LatestHeadlinesPostResponse) MarshalJSON() ([]byte, error)
func (*LatestHeadlinesPostResponse) UnmarshalJSON ¶
func (l *LatestHeadlinesPostResponse) UnmarshalJSON(data []byte) error
type LatestHeadlinesPostResponseVisitor ¶
type LatestHeadlinesPostResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitClusteredSearchResponseDto(*ClusteredSearchResponseDto) error }
type Links ¶ added in v1.1.0
The article link or list of article links to search for. To specify multiple links, use a comma-separated string or an array of strings.
Examples: - `"https://nytimes.com/article1, https://bbc.com/article2"` - `["https://nytimes.com/article1", "https://bbc.com/article2"]`
**Caution**: You can use either the `links` or the `ids` parameter, but not both at the same time.
func NewLinksFromString ¶ added in v1.1.0
func NewLinksFromStringList ¶ added in v1.1.0
func (*Links) Accept ¶ added in v1.1.0
func (l *Links) Accept(visitor LinksVisitor) error
func (*Links) GetStringList ¶ added in v1.1.0
func (Links) MarshalJSON ¶ added in v1.1.0
func (*Links) UnmarshalJSON ¶ added in v1.1.0
type LinksVisitor ¶ added in v1.1.0
type LocEntityName ¶ added in v1.1.0
type LocEntityName struct { String string StringList []string // contains filtered or unexported fields }
Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string or an array of strings.
Examples: - `"California, New York"` - `["California", "New York"]`
**Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan.
To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).
func NewLocEntityNameFromString ¶ added in v1.1.0
func NewLocEntityNameFromString(value string) *LocEntityName
func NewLocEntityNameFromStringList ¶ added in v1.1.0
func NewLocEntityNameFromStringList(value []string) *LocEntityName
func (*LocEntityName) Accept ¶ added in v1.1.0
func (l *LocEntityName) Accept(visitor LocEntityNameVisitor) error
func (*LocEntityName) GetString ¶ added in v1.1.0
func (l *LocEntityName) GetString() string
func (*LocEntityName) GetStringList ¶ added in v1.1.0
func (l *LocEntityName) GetStringList() []string
func (LocEntityName) MarshalJSON ¶ added in v1.1.0
func (l LocEntityName) MarshalJSON() ([]byte, error)
func (*LocEntityName) UnmarshalJSON ¶ added in v1.1.0
func (l *LocEntityName) UnmarshalJSON(data []byte) error
type LocEntityNameVisitor ¶ added in v1.1.0
type MiscEntityName ¶ added in v1.1.0
type MiscEntityName struct { String string StringList []string // contains filtered or unexported fields }
Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string or an array of strings.
Examples: - `"Bitcoin, Blockchain"` - `["Bitcoin", "Blockchain"]`
**Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan.
To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).
func NewMiscEntityNameFromString ¶ added in v1.1.0
func NewMiscEntityNameFromString(value string) *MiscEntityName
func NewMiscEntityNameFromStringList ¶ added in v1.1.0
func NewMiscEntityNameFromStringList(value []string) *MiscEntityName
func (*MiscEntityName) Accept ¶ added in v1.1.0
func (m *MiscEntityName) Accept(visitor MiscEntityNameVisitor) error
func (*MiscEntityName) GetString ¶ added in v1.1.0
func (m *MiscEntityName) GetString() string
func (*MiscEntityName) GetStringList ¶ added in v1.1.0
func (m *MiscEntityName) GetStringList() []string
func (MiscEntityName) MarshalJSON ¶ added in v1.1.0
func (m MiscEntityName) MarshalJSON() ([]byte, error)
func (*MiscEntityName) UnmarshalJSON ¶ added in v1.1.0
func (m *MiscEntityName) UnmarshalJSON(data []byte) error
type MiscEntityNameVisitor ¶ added in v1.1.0
type NamedEntityList ¶ added in v1.1.0
type NamedEntityList = []*NamedEntityListItem
A list of named entities identified in the article.
type NamedEntityListItem ¶ added in v1.1.0
type NamedEntityListItem struct { // The name of the entity identified in the article. EntityName *string `json:"entity_name,omitempty" url:"entity_name,omitempty"` // The number of times this entity appears in the article. Count *int `json:"count,omitempty" url:"count,omitempty"` // contains filtered or unexported fields }
func (*NamedEntityListItem) GetCount ¶ added in v1.1.0
func (n *NamedEntityListItem) GetCount() *int
func (*NamedEntityListItem) GetEntityName ¶ added in v1.1.0
func (n *NamedEntityListItem) GetEntityName() *string
func (*NamedEntityListItem) GetExtraProperties ¶ added in v1.1.0
func (n *NamedEntityListItem) GetExtraProperties() map[string]interface{}
func (*NamedEntityListItem) String ¶ added in v1.1.0
func (n *NamedEntityListItem) String() string
func (*NamedEntityListItem) UnmarshalJSON ¶ added in v1.1.0
func (n *NamedEntityListItem) UnmarshalJSON(data []byte) error
type NerName ¶ added in v1.1.0
type NerName = string
The name of person, organization, location, product or other named entity to search for. To specify multiple names use a comma-separated string.
Example: `"Tesla, Amazon"`
type NewsDomainType ¶ added in v1.1.0
type NewsDomainType string
Filters results based on the news domain type. Possible values are: - `Original Content`: Sources that produce their own content. - `Aggregator`: Sources that collect content from various other sources. - `Press Releases`: Sources primarily publishing press releases. - `Republisher`: Sources that republish content from other sources. - `Other`: Sources that don't fit into main categories.
const ( NewsDomainTypeOriginalContent NewsDomainType = "Original Content" NewsDomainTypeAggregator NewsDomainType = "Aggregator" NewsDomainTypePressReleases NewsDomainType = "Press Releases" NewsDomainTypeRepublisher NewsDomainType = "Republisher" NewsDomainTypeOther NewsDomainType = "Other" )
func NewNewsDomainTypeFromString ¶ added in v1.1.0
func NewNewsDomainTypeFromString(s string) (NewsDomainType, error)
func (NewsDomainType) Ptr ¶ added in v1.1.0
func (n NewsDomainType) Ptr() *NewsDomainType
type NewsType ¶ added in v1.1.0
type NewsType struct { String string StringList []string // contains filtered or unexported fields }
Filters results based on the news type. Multiple types can be specified using a comma-separated string or an array of strings.
Examples: - `"General News Outlets,Tech News and Updates"` - `["General News Outlets", "Tech News and Updates"]`
For a complete list of available news types, see [Enumerated parameters > News type](/docs/v3/api-reference/overview/enumerated-parameters#news-type-news-type).
func NewNewsTypeFromString ¶ added in v1.1.0
func NewNewsTypeFromStringList ¶ added in v1.1.0
func (*NewsType) Accept ¶ added in v1.1.0
func (n *NewsType) Accept(visitor NewsTypeVisitor) error
func (*NewsType) GetStringList ¶ added in v1.1.0
func (NewsType) MarshalJSON ¶ added in v1.1.0
func (*NewsType) UnmarshalJSON ¶ added in v1.1.0
type NewsTypeVisitor ¶ added in v1.1.0
type NlpDataEntity ¶ added in v1.1.0
type NlpDataEntity struct { // The themes or categories identified in the article. Theme *string `json:"theme,omitempty" url:"theme,omitempty"` // A brief AI-generated summary of the article content. Summary *string `json:"summary,omitempty" url:"summary,omitempty"` Sentiment *SentimentScores `json:"sentiment,omitempty" url:"sentiment,omitempty"` // A dense 1024-dimensional vector representation of the article content, generated using the [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) model. // // **Note**: The `new_embedding` field is only available in the `v3_local_news_nlp_embeddings` subscription plan. NewEmbedding []float64 `json:"new_embedding,omitempty" url:"new_embedding,omitempty"` // Named Entity Recognition for person entities (individuals' names). NerPer *NamedEntityList `json:"ner_PER,omitempty" url:"ner_PER,omitempty"` // Named Entity Recognition for organization entities (company names, institutions). NerOrg *NamedEntityList `json:"ner_ORG,omitempty" url:"ner_ORG,omitempty"` // Named Entity Recognition for miscellaneous entities (events, nationalities, products). NerMisc *NamedEntityList `json:"ner_MISC,omitempty" url:"ner_MISC,omitempty"` // Named Entity Recognition for location entities (cities, countries, geographic features). NerLoc *NamedEntityList `json:"ner_LOC,omitempty" url:"ner_LOC,omitempty"` // IPTC media topic taxonomy paths identified in the article content. Each path represents a hierarchical category following the IPTC standard. IptcTagsName []string `json:"iptc_tags_name,omitempty" url:"iptc_tags_name,omitempty"` // IPTC media topic numeric codes identified in the article content. These codes correspond to the standardized IPTC media topic taxonomy. IptcTagsId []string `json:"iptc_tags_id,omitempty" url:"iptc_tags_id,omitempty"` // IAB content taxonomy paths identified in the article content. Each path represents a hierarchical category following the IAB content standard. IabTagsName []string `json:"iab_tags_name,omitempty" url:"iab_tags_name,omitempty"` // contains filtered or unexported fields }
Natural Language Processing data for the article.
func (*NlpDataEntity) GetExtraProperties ¶ added in v1.1.0
func (n *NlpDataEntity) GetExtraProperties() map[string]interface{}
func (*NlpDataEntity) GetIabTagsName ¶ added in v1.1.0
func (n *NlpDataEntity) GetIabTagsName() []string
func (*NlpDataEntity) GetIptcTagsId ¶ added in v1.1.0
func (n *NlpDataEntity) GetIptcTagsId() []string
func (*NlpDataEntity) GetIptcTagsName ¶ added in v1.1.0
func (n *NlpDataEntity) GetIptcTagsName() []string
func (*NlpDataEntity) GetNerLoc ¶ added in v1.1.0
func (n *NlpDataEntity) GetNerLoc() *NamedEntityList
func (*NlpDataEntity) GetNerMisc ¶ added in v1.1.0
func (n *NlpDataEntity) GetNerMisc() *NamedEntityList
func (*NlpDataEntity) GetNerOrg ¶ added in v1.1.0
func (n *NlpDataEntity) GetNerOrg() *NamedEntityList
func (*NlpDataEntity) GetNerPer ¶ added in v1.1.0
func (n *NlpDataEntity) GetNerPer() *NamedEntityList
func (*NlpDataEntity) GetNewEmbedding ¶ added in v1.1.0
func (n *NlpDataEntity) GetNewEmbedding() []float64
func (*NlpDataEntity) GetSentiment ¶ added in v1.1.0
func (n *NlpDataEntity) GetSentiment() *SentimentScores
func (*NlpDataEntity) GetSummary ¶ added in v1.1.0
func (n *NlpDataEntity) GetSummary() *string
func (*NlpDataEntity) GetTheme ¶ added in v1.1.0
func (n *NlpDataEntity) GetTheme() *string
func (*NlpDataEntity) String ¶ added in v1.1.0
func (n *NlpDataEntity) String() string
func (*NlpDataEntity) UnmarshalJSON ¶ added in v1.1.0
func (n *NlpDataEntity) UnmarshalJSON(data []byte) error
type NotAuthorName ¶ added in v1.1.0
type NotAuthorName struct { String string StringList []string // contains filtered or unexported fields }
The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string or an array of strings.
Examples: - `"John Doe, Jane Doe"` - `["John Doe", "Jane Doe"]`
func NewNotAuthorNameFromString ¶ added in v1.1.0
func NewNotAuthorNameFromString(value string) *NotAuthorName
func NewNotAuthorNameFromStringList ¶ added in v1.1.0
func NewNotAuthorNameFromStringList(value []string) *NotAuthorName
func (*NotAuthorName) Accept ¶ added in v1.1.0
func (n *NotAuthorName) Accept(visitor NotAuthorNameVisitor) error
func (*NotAuthorName) GetString ¶ added in v1.1.0
func (n *NotAuthorName) GetString() string
func (*NotAuthorName) GetStringList ¶ added in v1.1.0
func (n *NotAuthorName) GetStringList() []string
func (NotAuthorName) MarshalJSON ¶ added in v1.1.0
func (n NotAuthorName) MarshalJSON() ([]byte, error)
func (*NotAuthorName) UnmarshalJSON ¶ added in v1.1.0
func (n *NotAuthorName) UnmarshalJSON(data []byte) error
type NotAuthorNameVisitor ¶ added in v1.1.0
type NotCountries ¶ added in v1.1.0
type NotCountries struct { String string StringList []string // contains filtered or unexported fields }
The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string or an array of strings.
Examples: - `"UK,FR"` - `["UK", "FR"]`
To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country).
func NewNotCountriesFromString ¶ added in v1.1.0
func NewNotCountriesFromString(value string) *NotCountries
func NewNotCountriesFromStringList ¶ added in v1.1.0
func NewNotCountriesFromStringList(value []string) *NotCountries
func (*NotCountries) Accept ¶ added in v1.1.0
func (n *NotCountries) Accept(visitor NotCountriesVisitor) error
func (*NotCountries) GetString ¶ added in v1.1.0
func (n *NotCountries) GetString() string
func (*NotCountries) GetStringList ¶ added in v1.1.0
func (n *NotCountries) GetStringList() []string
func (NotCountries) MarshalJSON ¶ added in v1.1.0
func (n NotCountries) MarshalJSON() ([]byte, error)
func (*NotCountries) UnmarshalJSON ¶ added in v1.1.0
func (n *NotCountries) UnmarshalJSON(data []byte) error
type NotCountriesVisitor ¶ added in v1.1.0
type NotIabTags ¶ added in v1.1.0
type NotIabTags struct { String string StringList []string // contains filtered or unexported fields }
Inverse of the `iab_tags` parameter. Excludes articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories to exclude, use a comma-separated string or an array of strings.
Examples: - `"Agriculture, Metals"` - `["Agriculture", "Metals"]`
**Note**: The `not_iab_tags` parameter is only available if tags are included in your subscription plan.
To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/).
func NewNotIabTagsFromString ¶ added in v1.1.0
func NewNotIabTagsFromString(value string) *NotIabTags
func NewNotIabTagsFromStringList ¶ added in v1.1.0
func NewNotIabTagsFromStringList(value []string) *NotIabTags
func (*NotIabTags) Accept ¶ added in v1.1.0
func (n *NotIabTags) Accept(visitor NotIabTagsVisitor) error
func (*NotIabTags) GetString ¶ added in v1.1.0
func (n *NotIabTags) GetString() string
func (*NotIabTags) GetStringList ¶ added in v1.1.0
func (n *NotIabTags) GetStringList() []string
func (NotIabTags) MarshalJSON ¶ added in v1.1.0
func (n NotIabTags) MarshalJSON() ([]byte, error)
func (*NotIabTags) UnmarshalJSON ¶ added in v1.1.0
func (n *NotIabTags) UnmarshalJSON(data []byte) error
type NotIabTagsVisitor ¶ added in v1.1.0
type NotIptcTags ¶ added in v1.1.0
type NotIptcTags struct { String string StringList []string // contains filtered or unexported fields }
Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string or an array of strings.
Examples: - `"20000205, 20000209"` - `["20000205", "20000209"]`
**Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan.
To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html).
func NewNotIptcTagsFromString ¶ added in v1.1.0
func NewNotIptcTagsFromString(value string) *NotIptcTags
func NewNotIptcTagsFromStringList ¶ added in v1.1.0
func NewNotIptcTagsFromStringList(value []string) *NotIptcTags
func (*NotIptcTags) Accept ¶ added in v1.1.0
func (n *NotIptcTags) Accept(visitor NotIptcTagsVisitor) error
func (*NotIptcTags) GetString ¶ added in v1.1.0
func (n *NotIptcTags) GetString() string
func (*NotIptcTags) GetStringList ¶ added in v1.1.0
func (n *NotIptcTags) GetStringList() []string
func (NotIptcTags) MarshalJSON ¶ added in v1.1.0
func (n NotIptcTags) MarshalJSON() ([]byte, error)
func (*NotIptcTags) UnmarshalJSON ¶ added in v1.1.0
func (n *NotIptcTags) UnmarshalJSON(data []byte) error
type NotIptcTagsVisitor ¶ added in v1.1.0
type NotLang ¶ added in v1.1.0
The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string or an array of strings.
Examples: - `"fr,de"` - `["fr", "de"]`
To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang).
func NewNotLangFromString ¶ added in v1.1.0
func NewNotLangFromStringList ¶ added in v1.1.0
func (*NotLang) Accept ¶ added in v1.1.0
func (n *NotLang) Accept(visitor NotLangVisitor) error
func (*NotLang) GetStringList ¶ added in v1.1.0
func (NotLang) MarshalJSON ¶ added in v1.1.0
func (*NotLang) UnmarshalJSON ¶ added in v1.1.0
type NotLangVisitor ¶ added in v1.1.0
type NotSources ¶ added in v1.1.0
type NotSources struct { String string StringList []string // contains filtered or unexported fields }
The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string or an array of strings.
Examples: - `"cnn.com, wsj.com"` - `["cnn.com", "wsj.com"]`
func NewNotSourcesFromString ¶ added in v1.1.0
func NewNotSourcesFromString(value string) *NotSources
func NewNotSourcesFromStringList ¶ added in v1.1.0
func NewNotSourcesFromStringList(value []string) *NotSources
func (*NotSources) Accept ¶ added in v1.1.0
func (n *NotSources) Accept(visitor NotSourcesVisitor) error
func (*NotSources) GetString ¶ added in v1.1.0
func (n *NotSources) GetString() string
func (*NotSources) GetStringList ¶ added in v1.1.0
func (n *NotSources) GetStringList() []string
func (NotSources) MarshalJSON ¶ added in v1.1.0
func (n NotSources) MarshalJSON() ([]byte, error)
func (*NotSources) UnmarshalJSON ¶ added in v1.1.0
func (n *NotSources) UnmarshalJSON(data []byte) error
type NotSourcesVisitor ¶ added in v1.1.0
type NotTheme ¶ added in v1.1.0
type NotTheme struct { String string StringList []string // contains filtered or unexported fields }
Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string or an array of strings.
Examples: - `"Crime, Tech"` - `["Crime", "Tech"]`
**Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
func NewNotThemeFromString ¶ added in v1.1.0
func NewNotThemeFromStringList ¶ added in v1.1.0
func (*NotTheme) Accept ¶ added in v1.1.0
func (n *NotTheme) Accept(visitor NotThemeVisitor) error
func (*NotTheme) GetStringList ¶ added in v1.1.0
func (NotTheme) MarshalJSON ¶ added in v1.1.0
func (*NotTheme) UnmarshalJSON ¶ added in v1.1.0
type NotThemeVisitor ¶ added in v1.1.0
type OrgEntityName ¶ added in v1.1.0
type OrgEntityName struct { String string StringList []string // contains filtered or unexported fields }
Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string or an array of strings.
Examples: - `"Apple, Microsoft"` - `["Apple", "Microsoft"]`
**Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan.
To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).
func NewOrgEntityNameFromString ¶ added in v1.1.0
func NewOrgEntityNameFromString(value string) *OrgEntityName
func NewOrgEntityNameFromStringList ¶ added in v1.1.0
func NewOrgEntityNameFromStringList(value []string) *OrgEntityName
func (*OrgEntityName) Accept ¶ added in v1.1.0
func (o *OrgEntityName) Accept(visitor OrgEntityNameVisitor) error
func (*OrgEntityName) GetString ¶ added in v1.1.0
func (o *OrgEntityName) GetString() string
func (*OrgEntityName) GetStringList ¶ added in v1.1.0
func (o *OrgEntityName) GetStringList() []string
func (OrgEntityName) MarshalJSON ¶ added in v1.1.0
func (o OrgEntityName) MarshalJSON() ([]byte, error)
func (*OrgEntityName) UnmarshalJSON ¶ added in v1.1.0
func (o *OrgEntityName) UnmarshalJSON(data []byte) error
type OrgEntityNameVisitor ¶ added in v1.1.0
type Page ¶ added in v1.1.0
type Page = int
The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles.
For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets).
type ParentUrl ¶ added in v1.1.0
type ParentUrl struct { String string StringList []string // contains filtered or unexported fields }
The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string or an array of strings.
Examples: - `"wsj.com/politics,wsj.com/tech"` - `["wsj.com/politics", "wsj.com/tech"]`
func NewParentUrlFromString ¶ added in v1.1.0
func NewParentUrlFromStringList ¶ added in v1.1.0
func (*ParentUrl) Accept ¶ added in v1.1.0
func (p *ParentUrl) Accept(visitor ParentUrlVisitor) error
func (*ParentUrl) GetStringList ¶ added in v1.1.0
func (ParentUrl) MarshalJSON ¶ added in v1.1.0
func (*ParentUrl) UnmarshalJSON ¶ added in v1.1.0
type ParentUrlVisitor ¶ added in v1.1.0
type PerEntityName ¶ added in v1.1.0
type PerEntityName struct { String string StringList []string // contains filtered or unexported fields }
Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string or an array of strings.
Examples: - `"Elon Musk, Jeff Bezos"` - `["Elon Musk", "Jeff Bezos"]`
**Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan.
To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity).
func NewPerEntityNameFromString ¶ added in v1.1.0
func NewPerEntityNameFromString(value string) *PerEntityName
func NewPerEntityNameFromStringList ¶ added in v1.1.0
func NewPerEntityNameFromStringList(value []string) *PerEntityName
func (*PerEntityName) Accept ¶ added in v1.1.0
func (p *PerEntityName) Accept(visitor PerEntityNameVisitor) error
func (*PerEntityName) GetString ¶ added in v1.1.0
func (p *PerEntityName) GetString() string
func (*PerEntityName) GetStringList ¶ added in v1.1.0
func (p *PerEntityName) GetStringList() []string
func (PerEntityName) MarshalJSON ¶ added in v1.1.0
func (p PerEntityName) MarshalJSON() ([]byte, error)
func (*PerEntityName) UnmarshalJSON ¶ added in v1.1.0
func (p *PerEntityName) UnmarshalJSON(data []byte) error
type PerEntityNameVisitor ¶ added in v1.1.0
type PredefinedSources ¶ added in v1.1.0
type PredefinedSources struct { String string StringList []string // contains filtered or unexported fields }
Predefined top news sources per country.
Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string or an array of strings.
Examples: - `"top 100 US"` - `"top 33 AT"` - `"top 50 US, top 20 GB"` - `["top 50 US", "top 20 GB"]`
func NewPredefinedSourcesFromString ¶ added in v1.1.0
func NewPredefinedSourcesFromString(value string) *PredefinedSources
func NewPredefinedSourcesFromStringList ¶ added in v1.1.0
func NewPredefinedSourcesFromStringList(value []string) *PredefinedSources
func (*PredefinedSources) Accept ¶ added in v1.1.0
func (p *PredefinedSources) Accept(visitor PredefinedSourcesVisitor) error
func (*PredefinedSources) GetString ¶ added in v1.1.0
func (p *PredefinedSources) GetString() string
func (*PredefinedSources) GetStringList ¶ added in v1.1.0
func (p *PredefinedSources) GetStringList() []string
func (PredefinedSources) MarshalJSON ¶ added in v1.1.0
func (p PredefinedSources) MarshalJSON() ([]byte, error)
func (*PredefinedSources) UnmarshalJSON ¶ added in v1.1.0
func (p *PredefinedSources) UnmarshalJSON(data []byte) error
type PredefinedSourcesVisitor ¶ added in v1.1.0
type PublishedDatePrecision ¶ added in v1.1.0
type PublishedDatePrecision string
The precision of the published date. There are three types: - `full`: The day and time of an article is correctly identified with the appropriate timezone. - `timezone unknown`: The day and time of an article is correctly identified without timezone. - `date`: Only the day is identified without an exact time.
const ( PublishedDatePrecisionFull PublishedDatePrecision = "full" PublishedDatePrecisionTimezoneUnknown PublishedDatePrecision = "timezone unknown" PublishedDatePrecisionDate PublishedDatePrecision = "date" )
func NewPublishedDatePrecisionFromString ¶ added in v1.1.0
func NewPublishedDatePrecisionFromString(s string) (PublishedDatePrecision, error)
func (PublishedDatePrecision) Ptr ¶ added in v1.1.0
func (p PublishedDatePrecision) Ptr() *PublishedDatePrecision
type Q ¶ added in v1.1.0
type Q = string
The keyword(s) to search for in articles. Query syntax supports logical operators (`AND`, `OR`, `NOT`) and wildcards:
- For an exact match, use double quotes. For example, `"technology news"`. - Use `*` to search for any keyword. - Use `+` to include and `-` to exclude specific words or phrases. For example, `+Apple`, `-Google`. - Use `AND`, `OR`, and `NOT` to refine search results. For example, `technology AND (Apple OR Microsoft) NOT Google`.
For more details, see [Advanced querying](/docs/v3/documentation/guides-and-concepts/advanced-querying).
type RankedOnly ¶ added in v1.1.0
type RankedOnly = bool
If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999.
type RequestTimeoutError ¶ added in v1.1.0
Request timeout
func (*RequestTimeoutError) MarshalJSON ¶ added in v1.1.0
func (r *RequestTimeoutError) MarshalJSON() ([]byte, error)
func (*RequestTimeoutError) UnmarshalJSON ¶ added in v1.1.0
func (r *RequestTimeoutError) UnmarshalJSON(data []byte) error
func (*RequestTimeoutError) Unwrap ¶ added in v1.1.0
func (r *RequestTimeoutError) Unwrap() error
type SearchGetRequest ¶
type SearchGetRequest struct { // The keyword(s) to search for in articles. Query syntax supports logical operators (`AND`, `OR`, `NOT`) and wildcards: // // - For an exact match, use double quotes. For example, `"technology news"`. // - Use `*` to search for any keyword. // - Use `+` to include and `-` to exclude specific words or phrases. // For example, `+Apple`, `-Google`. // - Use `AND`, `OR`, and `NOT` to refine search results. // For example, `technology AND (Apple OR Microsoft) NOT Google`. // // For more details, see [Advanced querying](/docs/v3/documentation/guides-and-concepts/advanced-querying). Q string `json:"-" url:"q"` // The article fields to search in. To search in multiple fields, use a comma-separated string. // // Example: `"title, summary"` // // **Note**: The `summary` option is available if NLP is enabled in your plan. // // Available options: `title`, `summary`, `content`. SearchIn *string `json:"-" url:"search_in,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // Word or phrase to search within the source names. To specify multiple values, use a comma-separated string. // // Example: `"sport, tech"` // // **Note**: The search doesn't require an exact match and returns sources containing the specified terms in their names. You can use any word or phrase, like `"sport"` or `"new york times"`. For example, `"sport"` returns sources such as `"Motorsport"`, `"Dot Esport"`, and `"Tuttosport"`. SourceName *string `json:"-" url:"source_name,omitempty"` // One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable.To specify multiple sources, use a comma-separated string. // // Examples: // - `"nytimes.com"` // - `"theguardian.com, finance.yahoo.com"` Sources *string `json:"-" url:"sources,omitempty"` // The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. // // Example: `"cnn.com, wsj.com"` NotSources *string `json:"-" url:"not_sources,omitempty"` // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string. // // Example: `"fr, de"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). NotLang *string `json:"-" url:"not_lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string. // // Example:`"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). NotCountries *string `json:"-" url:"not_countries,omitempty"` // The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. // // Example: `"John Doe, Jane Doe"` NotAuthorName *string `json:"-" url:"not_author_name,omitempty"` // The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. From *time.Time `json:"-" url:"from_,omitempty"` // The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. To *time.Time `json:"-" url:"to_,omitempty"` // The precision of the published date. There are three types: // - `full`: The day and time of an article is correctly identified with the appropriate timezone. // - `timezone unknown`: The day and time of an article is correctly identified without timezone. // - `date`: Only the day is identified without an exact time. PublishedDatePrecision *SearchGetRequestPublishedDatePrecision `json:"-" url:"published_date_precision,omitempty"` // If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object. ByParseDate *bool `json:"-" url:"by_parse_date,omitempty"` // The sorting order of the results. Possible values are: // - `relevancy`: The most relevant results first. // - `date`: The most recently published results first. // - `rank`: The results from the highest-ranked sources first. SortBy *SearchGetRequestSortBy `json:"-" url:"sort_by,omitempty"` // If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999. RankedOnly *bool `json:"-" url:"ranked_only,omitempty"` // The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. FromRank *int `json:"-" url:"from_rank,omitempty"` // The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. ToRank *int `json:"-" url:"to_rank,omitempty"` // If true, only returns articles that were posted on the home page of a given news domain. IsHeadline *bool `json:"-" url:"is_headline,omitempty"` // If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only. IsOpinion *bool `json:"-" url:"is_opinion,omitempty"` // If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved. IsPaidContent *bool `json:"-" url:"is_paid_content,omitempty"` // The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. // // Example: `"wsj.com/politics, wsj.com/tech"` ParentUrl *string `json:"-" url:"parent_url,omitempty"` // The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. // // Example: `"https://aiindex.stanford.edu/report, https://www.stateof.ai"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllLinks *string `json:"-" url:"all_links,omitempty"` // The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. // // Example: `"who.int, nih.gov"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllDomainLinks *string `json:"-" url:"all_domain_links,omitempty"` // If true, includes additional domain information in the response for each article: // - `is_news_domain`: Boolean indicating if the source is a news domain. // - `news_domain_type`: Type of news domain (e.g., `"Original Content"`). // - `news_type`: Category of news (e.g., `"News and Blogs"`). AdditionalDomainInfo *bool `json:"-" url:"additional_domain_info,omitempty"` // If true, filters results to include only news domains. IsNewsDomain *bool `json:"-" url:"is_news_domain,omitempty"` // Filters results based on the news domain type. Possible values are: // - `Original Content`: Sources that produce their own content. // - `Aggregator`: Sources that collect content from various other sources. // - `Press Releases`: Sources primarily publishing press releases. // - `Republisher`: Sources that republish content from other sources. // - `Other`: Sources that don't fit into main categories. NewsDomainType *SearchGetRequestNewsDomainType `json:"-" url:"news_domain_type,omitempty"` // Filters results based on the news type. Multiple types can be specified using a comma-separated string. // // Example: `"General News Outlets,Tech News and Updates"` // // For a complete list of available news types, see [Enumerated parameters > News type](/docs/v3/api-reference/overview/enumerated-parameters#news-type-news-type). NewsType *string `json:"-" url:"news_type,omitempty"` // The minimum number of words an article must contain. To be used for avoiding articles with small content. WordCountMin *int `json:"-" url:"word_count_min,omitempty"` // The maximum number of words an article can contain. To be used for avoiding articles with large content. WordCountMax *int `json:"-" url:"word_count_max,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` // Determines whether to group similar articles into clusters. If true, the API returns clustered results. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringEnabled *bool `json:"-" url:"clustering_enabled,omitempty"` // Specifies which part of the article to use for determining similarity when clustering. // // Possible values are: // - `content`: Uses the full article content (default). // - `title`: Uses only the article title. // - `summary`: Uses the article summary. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringVariable *SearchGetRequestClusteringVariable `json:"-" url:"clustering_variable,omitempty"` // Sets the similarity threshold for grouping articles into clusters. A lower value creates more inclusive clusters, while a higher value requires greater similarity between articles. // // Examples: // - `0.3`: Results in larger, more diverse clusters. // - `0.6`: Balances cluster size and article similarity (default). // - `0.9`: Creates smaller, tightly related clusters. // // To learn more, see [Clustering news articles](/docs/v3/documentation/guides-and-concepts/clustering-news-articles). ClusteringThreshold *float64 `json:"-" url:"clustering_threshold,omitempty"` // If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition. // // The NLP layer includes: // - Theme: General topic of the article. // - Summary: A concise overview of the article content. // - Sentiment: Separate scores for title and content (range: -1 to 1). // - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). // - IPTC tags: Standardized news category tags. // - IAB tags: Content categories for digital advertising. // // **Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). IncludeNlpData *bool `json:"-" url:"include_nlp_data,omitempty"` // If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques. // // **Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). HasNlp *bool `json:"-" url:"has_nlp,omitempty"` // Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string. // // Example: `"Finance, Tech"` // // **Note**: The `theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). // // Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`. Theme *string `json:"-" url:"theme,omitempty"` // Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string. // // Example: `"Crime, Tech"` // // **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). NotTheme *string `json:"-" url:"not_theme,omitempty"` // Filters articles that mention specific organization names, as identified by NLP analysis. To specify multiple organizations, use a comma-separated string. // // Example: `"Apple, Microsoft"` // // **Note**: The `ORG_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). OrgEntityName *string `json:"-" url:"ORG_entity_name,omitempty"` // Filters articles that mention specific person names, as identified by NLP analysis. To specify multiple names, use a comma-separated string. // // Example: `"Elon Musk, Jeff Bezos"` // // **Note**: The `PER_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). PerEntityName *string `json:"-" url:"PER_entity_name,omitempty"` // Filters articles that mention specific location names, as identified by NLP analysis. To specify multiple locations, use a comma-separated string. // // Example: `"California, New York"` // // **Note**: The `LOC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). LocEntityName *string `json:"-" url:"LOC_entity_name,omitempty"` // Filters articles that mention other named entities not falling under person, organization, or location categories. Includes events, nationalities, products, works of art, and more. To specify multiple entities, use a comma-separated string. // // Example: `"Bitcoin, Blockchain"` // // **Note**: The `MISC_entity_name` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [Search by entity](/docs/v3/documentation/how-to/search-by-entity). MiscEntityName *string `json:"-" url:"MISC_entity_name,omitempty"` // Filters articles based on the minimum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMin *float64 `json:"-" url:"title_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMax *float64 `json:"-" url:"title_sentiment_max,omitempty"` // Filters articles based on the minimum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMin *float64 `json:"-" url:"content_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMax *float64 `json:"-" url:"content_sentiment_max,omitempty"` // Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string of tag IDs. // // Example: `"20000199, 20000209"` // // **Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). IptcTags *string `json:"-" url:"iptc_tags,omitempty"` // Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string of tag IDs. // // Example: `"20000205, 20000209"` // // **Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). NotIptcTags *string `json:"-" url:"not_iptc_tags,omitempty"` // Filters articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories, use a comma-separated string. // // Example: `"Business, Events"` // // **Note**: The `iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). IabTags *string `json:"-" url:"iab_tags,omitempty"` // Inverse of the `iab_tags` parameter. Excludes articles based on Interactive Advertising Bureau (IAB) content categories. These tags provide a standardized taxonomy for digital advertising content categorization. To specify multiple IAB categories to exclude, use a comma-separated string. // // Example: `"Agriculture, Metals"` // // **Note**: The `not_iab_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see the [IAB Content taxonomy](https://iabtechlab.com/standards/content-taxonomy/). NotIabTags *string `json:"-" url:"not_iab_tags,omitempty"` // Filters articles based on provided taxonomy that is tailored to your specific needs and is accessible only with your API key. To specify tags, use the following pattern: // // - `custom_tags.taxonomy=Tag1,Tag2,Tag3`, where `taxonomy` is the taxonomy name and `Tag1,Tag2,Tag3` is a comma-separated list of tags. // // Example: `custom_tags.industry="Manufacturing, Supply Chain, Logistics"` // // To learn more, see the [Custom tags](/docs/v3/documentation/guides-and-concepts/custom-tags). CustomTags *string `json:"-" url:"custom_tags,omitempty"` // If true, excludes duplicate and highly similar articles from the search results. If false, returns all relevant articles, including duplicates. // // To learn more, see [Articles deduplication](/docs/v3/documentation/guides-and-concepts/articles-deduplication). ExcludeDuplicates *bool `json:"-" url:"exclude_duplicates,omitempty"` }
type SearchGetRequestClusteringVariable ¶ added in v1.1.0
type SearchGetRequestClusteringVariable string
const ( SearchGetRequestClusteringVariableContent SearchGetRequestClusteringVariable = "content" SearchGetRequestClusteringVariableTitle SearchGetRequestClusteringVariable = "title" SearchGetRequestClusteringVariableSummary SearchGetRequestClusteringVariable = "summary" )
func NewSearchGetRequestClusteringVariableFromString ¶ added in v1.1.0
func NewSearchGetRequestClusteringVariableFromString(s string) (SearchGetRequestClusteringVariable, error)
func (SearchGetRequestClusteringVariable) Ptr ¶ added in v1.1.0
func (s SearchGetRequestClusteringVariable) Ptr() *SearchGetRequestClusteringVariable
type SearchGetRequestNewsDomainType ¶ added in v1.1.0
type SearchGetRequestNewsDomainType string
const ( SearchGetRequestNewsDomainTypeOriginalContent SearchGetRequestNewsDomainType = "Original Content" SearchGetRequestNewsDomainTypeAggregator SearchGetRequestNewsDomainType = "Aggregator" SearchGetRequestNewsDomainTypePressReleases SearchGetRequestNewsDomainType = "Press Releases" SearchGetRequestNewsDomainTypeRepublisher SearchGetRequestNewsDomainType = "Republisher" SearchGetRequestNewsDomainTypeOther SearchGetRequestNewsDomainType = "Other" )
func NewSearchGetRequestNewsDomainTypeFromString ¶ added in v1.1.0
func NewSearchGetRequestNewsDomainTypeFromString(s string) (SearchGetRequestNewsDomainType, error)
func (SearchGetRequestNewsDomainType) Ptr ¶ added in v1.1.0
func (s SearchGetRequestNewsDomainType) Ptr() *SearchGetRequestNewsDomainType
type SearchGetRequestPublishedDatePrecision ¶ added in v1.1.0
type SearchGetRequestPublishedDatePrecision string
const ( SearchGetRequestPublishedDatePrecisionFull SearchGetRequestPublishedDatePrecision = "full" SearchGetRequestPublishedDatePrecisionTimezoneUnknown SearchGetRequestPublishedDatePrecision = "timezone unknown" SearchGetRequestPublishedDatePrecisionDate SearchGetRequestPublishedDatePrecision = "date" )
func NewSearchGetRequestPublishedDatePrecisionFromString ¶ added in v1.1.0
func NewSearchGetRequestPublishedDatePrecisionFromString(s string) (SearchGetRequestPublishedDatePrecision, error)
type SearchGetRequestSortBy ¶ added in v1.1.0
type SearchGetRequestSortBy string
const ( SearchGetRequestSortByRelevancy SearchGetRequestSortBy = "relevancy" SearchGetRequestSortByDate SearchGetRequestSortBy = "date" SearchGetRequestSortByRank SearchGetRequestSortBy = "rank" )
func NewSearchGetRequestSortByFromString ¶ added in v1.1.0
func NewSearchGetRequestSortByFromString(s string) (SearchGetRequestSortBy, error)
func (SearchGetRequestSortBy) Ptr ¶ added in v1.1.0
func (s SearchGetRequestSortBy) Ptr() *SearchGetRequestSortBy
type SearchGetResponse ¶
type SearchGetResponse struct { SearchResponseDto *SearchResponseDto ClusteredSearchResponseDto *ClusteredSearchResponseDto // contains filtered or unexported fields }
func NewSearchGetResponseFromClusteredSearchResponseDto ¶ added in v1.1.0
func NewSearchGetResponseFromClusteredSearchResponseDto(value *ClusteredSearchResponseDto) *SearchGetResponse
func NewSearchGetResponseFromSearchResponseDto ¶ added in v1.1.0
func NewSearchGetResponseFromSearchResponseDto(value *SearchResponseDto) *SearchGetResponse
func (*SearchGetResponse) Accept ¶
func (s *SearchGetResponse) Accept(visitor SearchGetResponseVisitor) error
func (*SearchGetResponse) GetClusteredSearchResponseDto ¶ added in v1.1.0
func (s *SearchGetResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
func (*SearchGetResponse) GetSearchResponseDto ¶ added in v1.1.0
func (s *SearchGetResponse) GetSearchResponseDto() *SearchResponseDto
func (SearchGetResponse) MarshalJSON ¶
func (s SearchGetResponse) MarshalJSON() ([]byte, error)
func (*SearchGetResponse) UnmarshalJSON ¶
func (s *SearchGetResponse) UnmarshalJSON(data []byte) error
type SearchGetResponseVisitor ¶
type SearchGetResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitClusteredSearchResponseDto(*ClusteredSearchResponseDto) error }
type SearchIn ¶ added in v1.1.0
type SearchIn = string
The article fields to search in. To search in multiple fields, use a comma-separated string.
Example: `"title, summary"`
**Note**: The `summary` option is available if NLP is enabled in your plan.
Available options: `title`, `summary`, `content`.
type SearchPostRequest ¶ added in v1.1.0
type SearchPostRequest struct { Q Q `json:"q" url:"-"` SearchIn *SearchIn `json:"search_in,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` SourceName *SourceName `json:"source_name,omitempty" url:"-"` Sources *Sources `json:"sources,omitempty" url:"-"` NotSources *NotSources `json:"not_sources,omitempty" url:"-"` Lang *Lang `json:"lang,omitempty" url:"-"` NotLang *NotLang `json:"not_lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` NotCountries *NotCountries `json:"not_countries,omitempty" url:"-"` NotAuthorName *NotAuthorName `json:"not_author_name,omitempty" url:"-"` From *From `json:"from_,omitempty" url:"-"` To *To `json:"to_,omitempty" url:"-"` PublishedDatePrecision *PublishedDatePrecision `json:"published_date_precision,omitempty" url:"-"` ByParseDate *ByParseDate `json:"by_parse_date,omitempty" url:"-"` SortBy *SortBy `json:"sort_by,omitempty" url:"-"` RankedOnly *RankedOnly `json:"ranked_only,omitempty" url:"-"` FromRank *FromRank `json:"from_rank,omitempty" url:"-"` ToRank *ToRank `json:"to_rank,omitempty" url:"-"` IsHeadline *IsHeadline `json:"is_headline,omitempty" url:"-"` IsOpinion *IsOpinion `json:"is_opinion,omitempty" url:"-"` IsPaidContent *IsPaidContent `json:"is_paid_content,omitempty" url:"-"` ParentUrl *ParentUrl `json:"parent_url,omitempty" url:"-"` AllLinks *AllLinks `json:"all_links,omitempty" url:"-"` AllDomainLinks *AllDomainLinks `json:"all_domain_links,omitempty" url:"-"` AdditionalDomainInfo *AdditionalDomainInfo `json:"additional_domain_info,omitempty" url:"-"` IsNewsDomain *IsNewsDomain `json:"is_news_domain,omitempty" url:"-"` NewsDomainType *NewsDomainType `json:"news_domain_type,omitempty" url:"-"` NewsType *NewsType `json:"news_type,omitempty" url:"-"` WordCountMin *WordCountMin `json:"word_count_min,omitempty" url:"-"` WordCountMax *WordCountMax `json:"word_count_max,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` ClusteringEnabled *ClusteringEnabled `json:"clustering_enabled,omitempty" url:"-"` ClusteringVariable *ClusteringVariable `json:"clustering_variable,omitempty" url:"-"` ClusteringThreshold *ClusteringThreshold `json:"clustering_threshold,omitempty" url:"-"` IncludeNlpData *IncludeNlpData `json:"include_nlp_data,omitempty" url:"-"` HasNlp *HasNlp `json:"has_nlp,omitempty" url:"-"` Theme *Theme `json:"theme,omitempty" url:"-"` NotTheme *NotTheme `json:"not_theme,omitempty" url:"-"` OrgEntityName *OrgEntityName `json:"ORG_entity_name,omitempty" url:"-"` PerEntityName *PerEntityName `json:"PER_entity_name,omitempty" url:"-"` LocEntityName *LocEntityName `json:"LOC_entity_name,omitempty" url:"-"` MiscEntityName *MiscEntityName `json:"MISC_entity_name,omitempty" url:"-"` TitleSentimentMin *TitleSentimentMin `json:"title_sentiment_min,omitempty" url:"-"` TitleSentimentMax *TitleSentimentMax `json:"title_sentiment_max,omitempty" url:"-"` ContentSentimentMin *ContentSentimentMin `json:"content_sentiment_min,omitempty" url:"-"` ContentSentientMax *ContentSentimentMax `json:"content_sentient_max,omitempty" url:"-"` IptcTags *IptcTags `json:"iptc_tags,omitempty" url:"-"` NotIptcTags *NotIptcTags `json:"not_iptc_tags,omitempty" url:"-"` IabTags *IabTags `json:"iab_tags,omitempty" url:"-"` NotIabTags *NotIabTags `json:"not_iab_tags,omitempty" url:"-"` CustomTags *CustomTags `json:"custom_tags,omitempty" url:"-"` ExcludeDuplicates *ExcludeDuplicates `json:"exclude_duplicates,omitempty" url:"-"` }
type SearchPostResponse ¶
type SearchPostResponse struct { SearchResponseDto *SearchResponseDto ClusteredSearchResponseDto *ClusteredSearchResponseDto // contains filtered or unexported fields }
func NewSearchPostResponseFromClusteredSearchResponseDto ¶ added in v1.1.0
func NewSearchPostResponseFromClusteredSearchResponseDto(value *ClusteredSearchResponseDto) *SearchPostResponse
func NewSearchPostResponseFromSearchResponseDto ¶ added in v1.1.0
func NewSearchPostResponseFromSearchResponseDto(value *SearchResponseDto) *SearchPostResponse
func (*SearchPostResponse) Accept ¶
func (s *SearchPostResponse) Accept(visitor SearchPostResponseVisitor) error
func (*SearchPostResponse) GetClusteredSearchResponseDto ¶ added in v1.1.0
func (s *SearchPostResponse) GetClusteredSearchResponseDto() *ClusteredSearchResponseDto
func (*SearchPostResponse) GetSearchResponseDto ¶ added in v1.1.0
func (s *SearchPostResponse) GetSearchResponseDto() *SearchResponseDto
func (SearchPostResponse) MarshalJSON ¶
func (s SearchPostResponse) MarshalJSON() ([]byte, error)
func (*SearchPostResponse) UnmarshalJSON ¶
func (s *SearchPostResponse) UnmarshalJSON(data []byte) error
type SearchPostResponseVisitor ¶
type SearchPostResponseVisitor interface { VisitSearchResponseDto(*SearchResponseDto) error VisitClusteredSearchResponseDto(*ClusteredSearchResponseDto) error }
type SearchResponseDto ¶ added in v1.1.0
type SearchResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` Articles *Articles `json:"articles,omitempty" url:"articles,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for the search requests applies to the `Search`, `Latest Headlines`, `Search by link`, and `Authors` endpoints. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing. - To access article properties in the `articles` response array, use array index notation. For example, `articles[n].title`, where `n` is the zero-based index of the article object (0, 1, 2, etc.). - The `nlp` property within the article object `articles[n].nlp` is only available with NLP-enabled subscription plans.
func (*SearchResponseDto) GetArticles ¶ added in v1.1.0
func (s *SearchResponseDto) GetArticles() *Articles
func (*SearchResponseDto) GetExtraProperties ¶ added in v1.1.0
func (s *SearchResponseDto) GetExtraProperties() map[string]interface{}
func (*SearchResponseDto) GetPage ¶ added in v1.1.0
func (s *SearchResponseDto) GetPage() int
func (*SearchResponseDto) GetPageSize ¶ added in v1.1.0
func (s *SearchResponseDto) GetPageSize() int
func (*SearchResponseDto) GetStatus ¶ added in v1.1.0
func (s *SearchResponseDto) GetStatus() string
func (*SearchResponseDto) GetTotalHits ¶ added in v1.1.0
func (s *SearchResponseDto) GetTotalHits() int
func (*SearchResponseDto) GetTotalPages ¶ added in v1.1.0
func (s *SearchResponseDto) GetTotalPages() int
func (*SearchResponseDto) GetUserInput ¶ added in v1.1.0
func (s *SearchResponseDto) GetUserInput() *UserInputDto
func (*SearchResponseDto) String ¶ added in v1.1.0
func (s *SearchResponseDto) String() string
func (*SearchResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (s *SearchResponseDto) UnmarshalJSON(data []byte) error
type SearchSimilarGetRequest ¶
type SearchSimilarGetRequest struct { // The keyword(s) to search for in articles. Query syntax supports logical operators (`AND`, `OR`, `NOT`) and wildcards: // // - For an exact match, use double quotes. For example, `"technology news"`. // - Use `*` to search for any keyword. // - Use `+` to include and `-` to exclude specific words or phrases. // For example, `+Apple`, `-Google`. // - Use `AND`, `OR`, and `NOT` to refine search results. // For example, `technology AND (Apple OR Microsoft) NOT Google`. // // For more details, see [Advanced querying](/docs/v3/documentation/guides-and-concepts/advanced-querying). Q string `json:"-" url:"q"` // The article fields to search in. To search in multiple fields, use a comma-separated string. // // Example: `"title, summary"` // // **Note**: The `summary` option is available if NLP is enabled in your plan. // // Available options: `title`, `summary`, `content`. SearchIn *string `json:"-" url:"search_in,omitempty"` // If true, includes similar documents in the response. IncludeSimilarDocuments *bool `json:"-" url:"include_similar_documents,omitempty"` // The number of similar documents to return. SimilarDocumentsNumber *int `json:"-" url:"similar_documents_number,omitempty"` // The fields to consider for finding similar documents. SimilarDocumentsFields *string `json:"-" url:"similar_documents_fields,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable.To specify multiple sources, use a comma-separated string. // // Examples: // - `"nytimes.com"` // - `"theguardian.com, finance.yahoo.com"` Sources *string `json:"-" url:"sources,omitempty"` // The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. // // Example: `"cnn.com, wsj.com"` NotSources *string `json:"-" url:"not_sources,omitempty"` // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The language(s) to exclude from the search. The accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To exclude multiple languages, use a comma-separated string. // // Example: `"fr, de"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). NotLang *string `json:"-" url:"not_lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // The publisher location countries to exclude from the search. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To exclude multiple countries, use a comma-separated string. // // Example:`"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). NotCountries *string `json:"-" url:"not_countries,omitempty"` // The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. From *time.Time `json:"-" url:"from_,omitempty"` // The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` // // **Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`. To *time.Time `json:"-" url:"to_,omitempty"` // If true, the `from_` and `to_` parameters use article parse dates instead of published dates. Additionally, the `parse_date` variable is added to the output for each article object. ByParseDate *bool `json:"-" url:"by_parse_date,omitempty"` // The precision of the published date. There are three types: // - `full`: The day and time of an article is correctly identified with the appropriate timezone. // - `timezone unknown`: The day and time of an article is correctly identified without timezone. // - `date`: Only the day is identified without an exact time. PublishedDatePrecision *SearchSimilarGetRequestPublishedDatePrecision `json:"-" url:"published_date_precision,omitempty"` // The sorting order of the results. Possible values are: // - `relevancy`: The most relevant results first. // - `date`: The most recently published results first. // - `rank`: The results from the highest-ranked sources first. SortBy *SearchSimilarGetRequestSortBy `json:"-" url:"sort_by,omitempty"` // If true, limits the search to sources ranked in the top 1 million online websites. If false, includes unranked sources which are assigned a rank of 999999. RankedOnly *bool `json:"-" url:"ranked_only,omitempty"` // The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. FromRank *int `json:"-" url:"from_rank,omitempty"` // The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. ToRank *int `json:"-" url:"to_rank,omitempty"` // If true, only returns articles that were posted on the home page of a given news domain. IsHeadline *bool `json:"-" url:"is_headline,omitempty"` // If true, returns only opinion pieces. If false, excludes opinion-based articles and returns news only. IsOpinion *bool `json:"-" url:"is_opinion,omitempty"` // If false, returns only articles that have publicly available complete content. Some publishers partially block content, so this setting ensures that only full articles are retrieved. IsPaidContent *bool `json:"-" url:"is_paid_content,omitempty"` // The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. // // Example: `"wsj.com/politics, wsj.com/tech"` ParentUrl *string `json:"-" url:"parent_url,omitempty"` // The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. // // Example: `"https://aiindex.stanford.edu/report, https://www.stateof.ai"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllLinks *string `json:"-" url:"all_links,omitempty"` // The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. // // Example: `"who.int, nih.gov"` // // For more details, see [Search by URL](/docs/v3/documentation/how-to/search-by-url). AllDomainLinks *string `json:"-" url:"all_domain_links,omitempty"` // The minimum number of words an article must contain. To be used for avoiding articles with small content. WordCountMin *int `json:"-" url:"word_count_min,omitempty"` // The maximum number of words an article can contain. To be used for avoiding articles with large content. WordCountMax *int `json:"-" url:"word_count_max,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` // If true, includes an NLP layer with each article in the response. This layer provides enhanced information such as theme classification, article summary, sentiment analysis, tags, and named entity recognition. // // The NLP layer includes: // - Theme: General topic of the article. // - Summary: A concise overview of the article content. // - Sentiment: Separate scores for title and content (range: -1 to 1). // - Named entities: Identified persons (PER), organizations (ORG), locations (LOC), and miscellaneous entities (MISC). // - IPTC tags: Standardized news category tags. // - IAB tags: Content categories for digital advertising. // // **Note**: The `include_nlp_data` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). IncludeNlpData *bool `json:"-" url:"include_nlp_data,omitempty"` // If true, filters the results to include only articles with an NLP layer. This allows you to focus on articles that have been processed with advanced NLP techniques. // // **Note**: The `has_nlp` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). HasNlp *bool `json:"-" url:"has_nlp,omitempty"` // Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string. // // Example: `"Finance, Tech"` // // **Note**: The `theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). // // Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`. Theme *string `json:"-" url:"theme,omitempty"` // Inverse of the `theme` parameter. Excludes articles based on their general topic, as determined by NLP analysis. To exclude multiple themes, use a comma-separated string. // // Example: `"Crime, Tech"` // // **Note**: The `not_theme` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). NotTheme *string `json:"-" url:"not_theme,omitempty"` // The name of person, organization, location, product or other named entity to search for. To specify multiple names use a comma-separated string. // // Example: `"Tesla, Amazon"` NerName *string `json:"-" url:"ner_name,omitempty"` // Filters articles based on the minimum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMin *float64 `json:"-" url:"title_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their titles. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). TitleSentimentMax *float64 `json:"-" url:"title_sentiment_max,omitempty"` // Filters articles based on the minimum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_min` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMin *float64 `json:"-" url:"content_sentiment_min,omitempty"` // Filters articles based on the maximum sentiment score of their content. // // Range is `-1.0` to `1.0`, where: // - Negative values indicate negative sentiment. // - Positive values indicate positive sentiment. // - Values close to 0 indicate neutral sentiment. // // **Note**: The `content_sentiment_max` parameter is only available if NLP is included in your subscription plan. // // To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features). ContentSentimentMax *float64 `json:"-" url:"content_sentiment_max,omitempty"` // Filters articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags, use a comma-separated string of tag IDs. // // Example: `"20000199, 20000209"` // // **Note**: The `iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). IptcTags *string `json:"-" url:"iptc_tags,omitempty"` // Inverse of the `iptc_tags` parameter. Excludes articles based on International Press Telecommunications Council (IPTC) media topic tags. To specify multiple IPTC tags to exclude, use a comma-separated string of tag IDs. // // Example: `"20000205, 20000209"` // // **Note**: The `not_iptc_tags` parameter is only available if tags are included in your subscription plan. // // To learn more, see [IPTC Media Topic NewsCodes](https://www.iptc.org/std/NewsCodes/treeview/mediatopic/mediatopic-en-GB.html). NotIptcTags *string `json:"-" url:"not_iptc_tags,omitempty"` // Filters articles based on provided taxonomy that is tailored to your specific needs and is accessible only with your API key. To specify tags, use the following pattern: // // - `custom_tags.taxonomy=Tag1,Tag2,Tag3`, where `taxonomy` is the taxonomy name and `Tag1,Tag2,Tag3` is a comma-separated list of tags. // // Example: `custom_tags.industry="Manufacturing, Supply Chain, Logistics"` // // To learn more, see the [Custom tags](/docs/v3/documentation/guides-and-concepts/custom-tags). CustomTags *string `json:"-" url:"custom_tags,omitempty"` }
type SearchSimilarGetRequestPublishedDatePrecision ¶ added in v1.1.0
type SearchSimilarGetRequestPublishedDatePrecision string
const ( SearchSimilarGetRequestPublishedDatePrecisionFull SearchSimilarGetRequestPublishedDatePrecision = "full" SearchSimilarGetRequestPublishedDatePrecisionTimezoneUnknown SearchSimilarGetRequestPublishedDatePrecision = "timezone unknown" SearchSimilarGetRequestPublishedDatePrecisionDate SearchSimilarGetRequestPublishedDatePrecision = "date" )
func NewSearchSimilarGetRequestPublishedDatePrecisionFromString ¶ added in v1.1.0
func NewSearchSimilarGetRequestPublishedDatePrecisionFromString(s string) (SearchSimilarGetRequestPublishedDatePrecision, error)
type SearchSimilarGetRequestSortBy ¶ added in v1.1.0
type SearchSimilarGetRequestSortBy string
const ( SearchSimilarGetRequestSortByRelevancy SearchSimilarGetRequestSortBy = "relevancy" SearchSimilarGetRequestSortByDate SearchSimilarGetRequestSortBy = "date" SearchSimilarGetRequestSortByRank SearchSimilarGetRequestSortBy = "rank" )
func NewSearchSimilarGetRequestSortByFromString ¶ added in v1.1.0
func NewSearchSimilarGetRequestSortByFromString(s string) (SearchSimilarGetRequestSortBy, error)
func (SearchSimilarGetRequestSortBy) Ptr ¶ added in v1.1.0
func (s SearchSimilarGetRequestSortBy) Ptr() *SearchSimilarGetRequestSortBy
type SearchSimilarGetResponse ¶
type SearchSimilarGetResponse struct { SearchSimilarResponseDto *SearchSimilarResponseDto FailedSearchSimilarResponseDto *FailedSearchSimilarResponseDto // contains filtered or unexported fields }
func NewSearchSimilarGetResponseFromFailedSearchSimilarResponseDto ¶ added in v1.1.0
func NewSearchSimilarGetResponseFromFailedSearchSimilarResponseDto(value *FailedSearchSimilarResponseDto) *SearchSimilarGetResponse
func NewSearchSimilarGetResponseFromSearchSimilarResponseDto ¶ added in v1.1.0
func NewSearchSimilarGetResponseFromSearchSimilarResponseDto(value *SearchSimilarResponseDto) *SearchSimilarGetResponse
func (*SearchSimilarGetResponse) Accept ¶
func (s *SearchSimilarGetResponse) Accept(visitor SearchSimilarGetResponseVisitor) error
func (*SearchSimilarGetResponse) GetFailedSearchSimilarResponseDto ¶ added in v1.1.0
func (s *SearchSimilarGetResponse) GetFailedSearchSimilarResponseDto() *FailedSearchSimilarResponseDto
func (*SearchSimilarGetResponse) GetSearchSimilarResponseDto ¶ added in v1.1.0
func (s *SearchSimilarGetResponse) GetSearchSimilarResponseDto() *SearchSimilarResponseDto
func (SearchSimilarGetResponse) MarshalJSON ¶
func (s SearchSimilarGetResponse) MarshalJSON() ([]byte, error)
func (*SearchSimilarGetResponse) UnmarshalJSON ¶
func (s *SearchSimilarGetResponse) UnmarshalJSON(data []byte) error
type SearchSimilarGetResponseVisitor ¶
type SearchSimilarGetResponseVisitor interface { VisitSearchSimilarResponseDto(*SearchSimilarResponseDto) error VisitFailedSearchSimilarResponseDto(*FailedSearchSimilarResponseDto) error }
type SearchSimilarPostRequest ¶ added in v1.1.0
type SearchSimilarPostRequest struct { Q Q `json:"q" url:"-"` SearchIn *SearchIn `json:"search_in,omitempty" url:"-"` IncludeSimilarDocuments *IncludeSimilarDocuments `json:"include_similar_documents,omitempty" url:"-"` SimilarDocumentsNumber *SimilarDocumentsNumber `json:"similar_documents_number,omitempty" url:"-"` SimilarDocumentsFields *SimilarDocumentsFields `json:"similar_documents_fields,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` Sources *Sources `json:"sources,omitempty" url:"-"` NotSources *NotSources `json:"not_sources,omitempty" url:"-"` Lang *Lang `json:"lang,omitempty" url:"-"` NotLang *NotLang `json:"not_lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` NotCountries *NotCountries `json:"not_countries,omitempty" url:"-"` From *From `json:"from_,omitempty" url:"-"` To *To `json:"to_,omitempty" url:"-"` ByParseDate *ByParseDate `json:"by_parse_date,omitempty" url:"-"` PublishedDatePrecision *PublishedDatePrecision `json:"published_date_precision,omitempty" url:"-"` SortBy *SortBy `json:"sort_by,omitempty" url:"-"` RankedOnly *RankedOnly `json:"ranked_only,omitempty" url:"-"` FromRank *FromRank `json:"from_rank,omitempty" url:"-"` ToRank *ToRank `json:"to_rank,omitempty" url:"-"` IsHeadline *IsHeadline `json:"is_headline,omitempty" url:"-"` IsOpinion *IsOpinion `json:"is_opinion,omitempty" url:"-"` IsPaidContent *IsPaidContent `json:"is_paid_content,omitempty" url:"-"` ParentUrl *ParentUrl `json:"parent_url,omitempty" url:"-"` AllLinks *AllLinks `json:"all_links,omitempty" url:"-"` AllDomainLinks *AllDomainLinks `json:"all_domain_links,omitempty" url:"-"` WordCountMin *WordCountMin `json:"word_count_min,omitempty" url:"-"` WordCountMax *WordCountMax `json:"word_count_max,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` IncludeNlpData *IncludeNlpData `json:"include_nlp_data,omitempty" url:"-"` HasNlp *HasNlp `json:"has_nlp,omitempty" url:"-"` Theme *Theme `json:"theme,omitempty" url:"-"` NotTheme *NotTheme `json:"not_theme,omitempty" url:"-"` NerName *NerName `json:"ner_name,omitempty" url:"-"` TitleSentimentMin *TitleSentimentMin `json:"title_sentiment_min,omitempty" url:"-"` TitleSentimentMax *TitleSentimentMax `json:"title_sentiment_max,omitempty" url:"-"` ContentSentimentMin *ContentSentimentMin `json:"content_sentiment_min,omitempty" url:"-"` ContentSentimentMax *ContentSentimentMax `json:"content_sentiment_max,omitempty" url:"-"` IptcTags *IptcTags `json:"iptc_tags,omitempty" url:"-"` NotIptcTags *NotIptcTags `json:"not_iptc_tags,omitempty" url:"-"` CustomTags *CustomTags `json:"custom_tags,omitempty" url:"-"` }
type SearchSimilarPostResponse ¶
type SearchSimilarPostResponse struct { SearchSimilarResponseDto *SearchSimilarResponseDto FailedSearchSimilarResponseDto *FailedSearchSimilarResponseDto // contains filtered or unexported fields }
func NewSearchSimilarPostResponseFromFailedSearchSimilarResponseDto ¶ added in v1.1.0
func NewSearchSimilarPostResponseFromFailedSearchSimilarResponseDto(value *FailedSearchSimilarResponseDto) *SearchSimilarPostResponse
func NewSearchSimilarPostResponseFromSearchSimilarResponseDto ¶ added in v1.1.0
func NewSearchSimilarPostResponseFromSearchSimilarResponseDto(value *SearchSimilarResponseDto) *SearchSimilarPostResponse
func (*SearchSimilarPostResponse) Accept ¶
func (s *SearchSimilarPostResponse) Accept(visitor SearchSimilarPostResponseVisitor) error
func (*SearchSimilarPostResponse) GetFailedSearchSimilarResponseDto ¶ added in v1.1.0
func (s *SearchSimilarPostResponse) GetFailedSearchSimilarResponseDto() *FailedSearchSimilarResponseDto
func (*SearchSimilarPostResponse) GetSearchSimilarResponseDto ¶ added in v1.1.0
func (s *SearchSimilarPostResponse) GetSearchSimilarResponseDto() *SearchSimilarResponseDto
func (SearchSimilarPostResponse) MarshalJSON ¶
func (s SearchSimilarPostResponse) MarshalJSON() ([]byte, error)
func (*SearchSimilarPostResponse) UnmarshalJSON ¶
func (s *SearchSimilarPostResponse) UnmarshalJSON(data []byte) error
type SearchSimilarPostResponseVisitor ¶
type SearchSimilarPostResponseVisitor interface { VisitSearchSimilarResponseDto(*SearchSimilarResponseDto) error VisitFailedSearchSimilarResponseDto(*FailedSearchSimilarResponseDto) error }
type SearchSimilarResponseDto ¶ added in v1.1.0
type SearchSimilarResponseDto struct { // The status of the response. Status string `json:"status" url:"status"` // The total number of articles matching the search criteria. TotalHits int `json:"total_hits" url:"total_hits"` // The current page number of the results. Page int `json:"page" url:"page"` // The total number of pages available for the given search criteria. TotalPages int `json:"total_pages" url:"total_pages"` // The number of articles per page. PageSize int `json:"page_size" url:"page_size"` // A list of articles matching the search criteria. Articles []*SimilarArticleEntity `json:"articles,omitempty" url:"articles,omitempty"` UserInput *UserInputDto `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a successful `Search similar` request. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing. - To access article properties in the `articles` response array, use array index notation. For example, `articles[n].title`, where `n` is the zero-based index of the article object (0, 1, 2, etc.). - The `nlp` property within the article object `articles[n].nlp` is only available with NLP-enabled subscription plans.
func (*SearchSimilarResponseDto) GetArticles ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetArticles() []*SimilarArticleEntity
func (*SearchSimilarResponseDto) GetExtraProperties ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetExtraProperties() map[string]interface{}
func (*SearchSimilarResponseDto) GetPage ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetPage() int
func (*SearchSimilarResponseDto) GetPageSize ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetPageSize() int
func (*SearchSimilarResponseDto) GetStatus ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetStatus() string
func (*SearchSimilarResponseDto) GetTotalHits ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetTotalHits() int
func (*SearchSimilarResponseDto) GetTotalPages ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetTotalPages() int
func (*SearchSimilarResponseDto) GetUserInput ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) GetUserInput() *UserInputDto
func (*SearchSimilarResponseDto) String ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) String() string
func (*SearchSimilarResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (s *SearchSimilarResponseDto) UnmarshalJSON(data []byte) error
type SearchUrlGetRequest ¶
type SearchUrlGetRequest struct { // The Newscatcher article ID (corresponds to the `_id` field in API response) or a list of article IDs to search for. To specify multiple IDs, use a comma-separated string. // // Example: `"1234567890abcdef, abcdef1234567890"` // // **Caution**: You can use either the `links` or the `ids` parameter, but not both at the same time. Ids *string `json:"-" url:"ids,omitempty"` // The article link or list of article links to search for. To specify multiple links, use a comma-separated string. // // Example: `"https://example.com/article1, https://example.com/article2"` // // **Caution**: You can use either the `links` or the `ids` parameter, but not both at the same time. Links *string `json:"-" url:"links,omitempty"` From *From `json:"-" url:"from_,omitempty"` To *To `json:"-" url:"to_,omitempty"` // The page number to scroll through the results. Use for pagination, as a single API response can return up to 1,000 articles. // // For details, see [How to paginate large datasets](https://www.newscatcherapi.com/docs/v3/documentation/how-to/paginate-large-datasets). Page *int `json:"-" url:"page,omitempty"` // The number of articles to return per page. PageSize *int `json:"-" url:"page_size,omitempty"` }
type SearchUrlPostRequest ¶ added in v1.1.0
type SearchUrlPostRequest struct { Ids *Ids `json:"ids,omitempty" url:"-"` Links *Links `json:"links,omitempty" url:"-"` // The starting point in time to search from. Accepts date-time strings in ISO 8601 format and plain text strings. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` From *From `json:"from_,omitempty" url:"-"` // The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text strings. The default time zone is UTC. // // Formats with examples: // - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` // - YYYY-MM-dd: `2024-07-01` // - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` // - YYYY/mm/dd: `2024/07/01` // - English phrases: `1 day ago`, `today` To *To `json:"to_,omitempty" url:"-"` Page *Page `json:"page,omitempty" url:"-"` PageSize *PageSize `json:"page_size,omitempty" url:"-"` }
type SentimentScores ¶ added in v1.1.0
type SentimentScores struct { // The sentiment score for the article title (-1.0 to 1.0). Title *float64 `json:"title,omitempty" url:"title,omitempty"` // The sentiment score for the article content (-1.0 to 1.0). Content *float64 `json:"content,omitempty" url:"content,omitempty"` // contains filtered or unexported fields }
Sentiment scores for the article's title and content.
func (*SentimentScores) GetContent ¶ added in v1.1.0
func (s *SentimentScores) GetContent() *float64
func (*SentimentScores) GetExtraProperties ¶ added in v1.1.0
func (s *SentimentScores) GetExtraProperties() map[string]interface{}
func (*SentimentScores) GetTitle ¶ added in v1.1.0
func (s *SentimentScores) GetTitle() *float64
func (*SentimentScores) String ¶ added in v1.1.0
func (s *SentimentScores) String() string
func (*SentimentScores) UnmarshalJSON ¶ added in v1.1.0
func (s *SentimentScores) UnmarshalJSON(data []byte) error
type SimilarArticleEntity ¶ added in v1.1.0
type SimilarArticleEntity struct { // The title of the article. Title string `json:"title" url:"title"` // The primary author of the article. Author *string `json:"author,omitempty" url:"author,omitempty"` // A list of authors of the article. Authors *Authors `json:"authors,omitempty" url:"authors,omitempty"` // A list of journalists associated with the article. Journalists *Journalists `json:"journalists,omitempty" url:"journalists,omitempty"` // The date the article was published. PublishedDate *string `json:"published_date,omitempty" url:"published_date,omitempty"` // The precision of the published date. PublishedDatePrecision *string `json:"published_date_precision,omitempty" url:"published_date_precision,omitempty"` // The date the article was last updated. UpdatedDate *string `json:"updated_date,omitempty" url:"updated_date,omitempty"` // The precision of the updated date. UpdatedDatePrecision *string `json:"updated_date_precision,omitempty" url:"updated_date_precision,omitempty"` // The date the article was parsed. ParseDate *string `json:"parse_date,omitempty" url:"parse_date,omitempty"` // The URL link to the article. Link string `json:"link" url:"link"` // The domain URL of the article. DomainUrl string `json:"domain_url" url:"domain_url"` // The full domain URL of the article. FullDomainUrl string `json:"full_domain_url" url:"full_domain_url"` // The name of the source where the article was published. NameSource *string `json:"name_source,omitempty" url:"name_source,omitempty"` // Indicates if the article is a headline. IsHeadline *bool `json:"is_headline,omitempty" url:"is_headline,omitempty"` // Indicates if the article is paid content. PaidContent *bool `json:"paid_content,omitempty" url:"paid_content,omitempty"` // The categorical URL of the article. ParentUrl string `json:"parent_url" url:"parent_url"` // The country where the article was published. Country *string `json:"country,omitempty" url:"country,omitempty"` // The rights information for the article. Rights *string `json:"rights,omitempty" url:"rights,omitempty"` // The rank of the article's source. Rank int `json:"rank" url:"rank"` // The media associated with the article. Media *string `json:"media,omitempty" url:"media,omitempty"` // The language in which the article is written. Language *string `json:"language,omitempty" url:"language,omitempty"` // A brief description of the article. Description *string `json:"description,omitempty" url:"description,omitempty"` // The content of the article. Content string `json:"content" url:"content"` // The word count of the article. WordCount *int `json:"word_count,omitempty" url:"word_count,omitempty"` // Indicates if the article is an opinion piece. IsOpinion *bool `json:"is_opinion,omitempty" url:"is_opinion,omitempty"` // The Twitter account associated with the article. TwitterAccount *string `json:"twitter_account,omitempty" url:"twitter_account,omitempty"` // A list of all URLs mentioned in the article. AllLinks *ArticleEntityAllLinks `json:"all_links,omitempty" url:"all_links,omitempty"` // A list of all domain URLs mentioned in the article. AllDomainLinks *ArticleEntityAllDomainLinks `json:"all_domain_links,omitempty" url:"all_domain_links,omitempty"` Nlp *NlpDataEntity `json:"nlp,omitempty" url:"nlp,omitempty"` // The unique identifier for the article. Id string `json:"id" url:"id"` // The relevance score of the article. Score float64 `json:"score" url:"score"` // An object that contains custom tags associated with an article, where each key is a taxonomy name, and the value is an array of tags. CustomTags map[string][]string `json:"custom_tags,omitempty" url:"custom_tags,omitempty"` AdditionalDomainInfo *AdditionalDomainInfoEntity `json:"additional_domain_info,omitempty" url:"additional_domain_info,omitempty"` // A list of documents similar to the article. SimilarDocuments []*SimilarDocument `json:"similar_documents,omitempty" url:"similar_documents,omitempty"` // contains filtered or unexported fields }
The data model for an article result in the `Search similar` articles request. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing.
func (*SimilarArticleEntity) GetAdditionalDomainInfo ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetAdditionalDomainInfo() *AdditionalDomainInfoEntity
func (*SimilarArticleEntity) GetAllDomainLinks ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetAllDomainLinks() *ArticleEntityAllDomainLinks
func (*SimilarArticleEntity) GetAllLinks ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetAllLinks() *ArticleEntityAllLinks
func (*SimilarArticleEntity) GetAuthor ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetAuthor() *string
func (*SimilarArticleEntity) GetAuthors ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetAuthors() *Authors
func (*SimilarArticleEntity) GetContent ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetContent() string
func (*SimilarArticleEntity) GetCountry ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetCountry() *string
func (*SimilarArticleEntity) GetCustomTags ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetCustomTags() map[string][]string
func (*SimilarArticleEntity) GetDescription ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetDescription() *string
func (*SimilarArticleEntity) GetDomainUrl ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetDomainUrl() string
func (*SimilarArticleEntity) GetExtraProperties ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetExtraProperties() map[string]interface{}
func (*SimilarArticleEntity) GetFullDomainUrl ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetFullDomainUrl() string
func (*SimilarArticleEntity) GetId ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetId() string
func (*SimilarArticleEntity) GetIsHeadline ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetIsHeadline() *bool
func (*SimilarArticleEntity) GetIsOpinion ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetIsOpinion() *bool
func (*SimilarArticleEntity) GetJournalists ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetJournalists() *Journalists
func (*SimilarArticleEntity) GetLanguage ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetLanguage() *string
func (*SimilarArticleEntity) GetLink ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetLink() string
func (*SimilarArticleEntity) GetMedia ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetMedia() *string
func (*SimilarArticleEntity) GetNameSource ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetNameSource() *string
func (*SimilarArticleEntity) GetNlp ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetNlp() *NlpDataEntity
func (*SimilarArticleEntity) GetPaidContent ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetPaidContent() *bool
func (*SimilarArticleEntity) GetParentUrl ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetParentUrl() string
func (*SimilarArticleEntity) GetParseDate ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetParseDate() *string
func (*SimilarArticleEntity) GetPublishedDate ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetPublishedDate() *string
func (*SimilarArticleEntity) GetPublishedDatePrecision ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetPublishedDatePrecision() *string
func (*SimilarArticleEntity) GetRank ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetRank() int
func (*SimilarArticleEntity) GetRights ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetRights() *string
func (*SimilarArticleEntity) GetScore ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetScore() float64
func (*SimilarArticleEntity) GetSimilarDocuments ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetSimilarDocuments() []*SimilarDocument
func (*SimilarArticleEntity) GetTitle ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetTitle() string
func (*SimilarArticleEntity) GetTwitterAccount ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetTwitterAccount() *string
func (*SimilarArticleEntity) GetUpdatedDate ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetUpdatedDate() *string
func (*SimilarArticleEntity) GetUpdatedDatePrecision ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetUpdatedDatePrecision() *string
func (*SimilarArticleEntity) GetWordCount ¶ added in v1.1.0
func (s *SimilarArticleEntity) GetWordCount() *int
func (*SimilarArticleEntity) String ¶ added in v1.1.0
func (s *SimilarArticleEntity) String() string
func (*SimilarArticleEntity) UnmarshalJSON ¶ added in v1.1.0
func (s *SimilarArticleEntity) UnmarshalJSON(data []byte) error
type SimilarDocument ¶
type SimilarDocument struct { // The unique identifier of the similar document. Id string `json:"id" url:"id"` // The relevance score of the similar document. Score float64 `json:"score" url:"score"` // The title of the similar document. Title string `json:"title" url:"title"` // The link to the similar document. Link string `json:"link" url:"link"` // contains filtered or unexported fields }
The data model for a similar document in the `Search similar` articles request.
func (*SimilarDocument) GetExtraProperties ¶
func (s *SimilarDocument) GetExtraProperties() map[string]interface{}
func (*SimilarDocument) GetId ¶
func (s *SimilarDocument) GetId() string
func (*SimilarDocument) GetLink ¶
func (s *SimilarDocument) GetLink() string
func (*SimilarDocument) GetScore ¶
func (s *SimilarDocument) GetScore() float64
func (*SimilarDocument) GetTitle ¶
func (s *SimilarDocument) GetTitle() string
func (*SimilarDocument) String ¶
func (s *SimilarDocument) String() string
func (*SimilarDocument) UnmarshalJSON ¶
func (s *SimilarDocument) UnmarshalJSON(data []byte) error
type SimilarDocumentsFields ¶ added in v1.1.0
type SimilarDocumentsFields = string
The fields to consider for finding similar documents.
type SimilarDocumentsNumber ¶ added in v1.1.0
type SimilarDocumentsNumber = int
The number of similar documents to return.
type SortBy ¶ added in v1.1.0
type SortBy string
The sorting order of the results. Possible values are: - `relevancy`: The most relevant results first. - `date`: The most recently published results first. - `rank`: The results from the highest-ranked sources first.
func NewSortByFromString ¶ added in v1.1.0
type SourceInfo ¶
type SourceInfo struct { // The name of the news source. NameSource *string `json:"name_source,omitempty" url:"name_source,omitempty"` // The domain URL of the news source. DomainUrl string `json:"domain_url" url:"domain_url"` // The logo of the news source. Logo *string `json:"logo,omitempty" url:"logo,omitempty"` AdditionalInfo *AdditionalSourceInfo `json:"additional_info,omitempty" url:"additional_info,omitempty"` // contains filtered or unexported fields }
The data model for information about a news source.
func (*SourceInfo) GetAdditionalInfo ¶
func (s *SourceInfo) GetAdditionalInfo() *AdditionalSourceInfo
func (*SourceInfo) GetDomainUrl ¶
func (s *SourceInfo) GetDomainUrl() string
func (*SourceInfo) GetExtraProperties ¶
func (s *SourceInfo) GetExtraProperties() map[string]interface{}
func (*SourceInfo) GetLogo ¶
func (s *SourceInfo) GetLogo() *string
func (*SourceInfo) GetNameSource ¶
func (s *SourceInfo) GetNameSource() *string
func (*SourceInfo) String ¶
func (s *SourceInfo) String() string
func (*SourceInfo) UnmarshalJSON ¶
func (s *SourceInfo) UnmarshalJSON(data []byte) error
type SourceName ¶ added in v1.1.0
type SourceName struct { String string StringList []string // contains filtered or unexported fields }
Specifies terms to search within the source names. To specify multiple terms, use a comma-separated string or an array of strings.
Examples: - `"sport, tech"` - `["sport", "tech"]`
**Note**: The search does not require an exact match and returns all sources that include the specified terms anywhere in their names. You can use any word, phrase, or outlet name, such as `"sport"`, or `"new york times"`. For example, using `"sport"` as a term returns sources like `"Motorsport"`, `"Dot Esport"`, and `"Tuttosport"`.
func NewSourceNameFromString ¶ added in v1.1.0
func NewSourceNameFromString(value string) *SourceName
func NewSourceNameFromStringList ¶ added in v1.1.0
func NewSourceNameFromStringList(value []string) *SourceName
func (*SourceName) Accept ¶ added in v1.1.0
func (s *SourceName) Accept(visitor SourceNameVisitor) error
func (*SourceName) GetString ¶ added in v1.1.0
func (s *SourceName) GetString() string
func (*SourceName) GetStringList ¶ added in v1.1.0
func (s *SourceName) GetStringList() []string
func (SourceName) MarshalJSON ¶ added in v1.1.0
func (s SourceName) MarshalJSON() ([]byte, error)
func (*SourceName) UnmarshalJSON ¶ added in v1.1.0
func (s *SourceName) UnmarshalJSON(data []byte) error
type SourceNameVisitor ¶ added in v1.1.0
type SourceUrl ¶ added in v1.1.0
type SourceUrl struct { String string StringList []string // contains filtered or unexported fields }
The domains of the news publication to search for. To specify multiple news sources, use a comma-separated string or an array of strings.
Examples: - `"bbc.com, nytimes.com"` - `["bbc.com", "nytimes.com"]`
**Caution**: When specifying the `source_url` parameter, you can only use `include_additional_info` as an extra parameter.
func NewSourceUrlFromString ¶ added in v1.1.0
func NewSourceUrlFromStringList ¶ added in v1.1.0
func (*SourceUrl) Accept ¶ added in v1.1.0
func (s *SourceUrl) Accept(visitor SourceUrlVisitor) error
func (*SourceUrl) GetStringList ¶ added in v1.1.0
func (SourceUrl) MarshalJSON ¶ added in v1.1.0
func (*SourceUrl) UnmarshalJSON ¶ added in v1.1.0
type SourceUrlVisitor ¶ added in v1.1.0
type Sources ¶ added in v1.1.0
One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as `finance.yahoo.com`, are also acceptable. To specify multiple sources, use a comma-separated string or an array of strings.
Examples: - `"nytimes.com, theguardian.com"` - `["nytimes.com", "theguardian.com"]`
func NewSourcesFromString ¶ added in v1.1.0
func NewSourcesFromStringList ¶ added in v1.1.0
func (*Sources) Accept ¶ added in v1.1.0
func (s *Sources) Accept(visitor SourcesVisitor) error
func (*Sources) GetStringList ¶ added in v1.1.0
func (Sources) MarshalJSON ¶ added in v1.1.0
func (*Sources) UnmarshalJSON ¶ added in v1.1.0
type SourcesGetRequest ¶
type SourcesGetRequest struct { // The language(s) of the search. The only accepted format is the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) code. To select multiple languages, use a comma-separated string. // // Example: `"en, es"` // // To learn more, see [Enumerated parameters > Language](/docs/v3/api-reference/overview/enumerated-parameters#language-lang-and-not-lang). Lang *string `json:"-" url:"lang,omitempty"` // The countries where the news publisher is located. The accepted format is the two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. To select multiple countries, use a comma-separated string. // // Example: `"US, CA"` // // To learn more, see [Enumerated parameters > Country](/docs/v3/api-reference/overview/enumerated-parameters#country-country-and-not-country). Countries *string `json:"-" url:"countries,omitempty"` // Predefined top news sources per country. // // Format: start with the word `top`, followed by the number of desired sources, and then the two-letter country code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Multiple countries with the number of top sources can be specified as a comma-separated string. // // Examples: // - `"top 100 US"` // - `"top 33 AT"` // - `"top 50 US, top 20 GB"` // - `"top 33 AT, top 50 IT"` PredefinedSources *string `json:"-" url:"predefined_sources,omitempty"` // Word or phrase to search within the source names. To specify multiple values, use a comma-separated string. // // Example: `"sport, tech"` // // **Note**: The search doesn't require an exact match and returns sources containing the specified terms in their names. You can use any word or phrase, like `"sport"` or `"new york times"`. For example, `"sport"` returns sources such as `"Motorsport"`, `"Dot Esport"`, and `"Tuttosport"`. SourceName *string `json:"-" url:"source_name,omitempty"` // The domain(s) of the news publication to search for. // // **Caution**: When specifying the `source_url` parameter, // you can only use `include_additional_info` as an extra parameter. SourceUrl *string `json:"-" url:"source_url,omitempty"` // If true, returns the following additional datapoints about each news source: // - `nb_articles_for_7d`: The number of articles published by the source in the last week. // - `country`: Source country of origin. // - `rank`: SEO rank. // - `is_news_domain`: Boolean indicating if the source is a news domain. // - `news_domain_type`: Type of news domain (e.g., "Original Content"). // - `news_type`: Category of news (e.g., "General News Outlets"). IncludeAdditionalInfo *bool `json:"-" url:"include_additional_info,omitempty"` // If true, filters results to include only news domains. IsNewsDomain *bool `json:"-" url:"is_news_domain,omitempty"` // Filters results based on the news domain type. Possible values are: // - `Original Content`: Sources that produce their own content. // - `Aggregator`: Sources that collect content from various other sources. // - `Press Releases`: Sources primarily publishing press releases. // - `Republisher`: Sources that republish content from other sources. // - `Other`: Sources that don't fit into main categories. NewsDomainType *SourcesGetRequestNewsDomainType `json:"-" url:"news_domain_type,omitempty"` // Filters results based on the news type. Multiple types can be specified using a comma-separated string. // // Example: `"General News Outlets,Tech News and Updates"` // // For a complete list of available news types, see [Enumerated parameters > News type](/docs/v3/api-reference/overview/enumerated-parameters#news-type-news-type). NewsType *string `json:"-" url:"news_type,omitempty"` // The lowest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. FromRank *int `json:"-" url:"from_rank,omitempty"` // The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source. ToRank *int `json:"-" url:"to_rank,omitempty"` }
type SourcesGetRequestNewsDomainType ¶ added in v1.1.0
type SourcesGetRequestNewsDomainType string
const ( SourcesGetRequestNewsDomainTypeOriginalContent SourcesGetRequestNewsDomainType = "Original Content" SourcesGetRequestNewsDomainTypeAggregator SourcesGetRequestNewsDomainType = "Aggregator" SourcesGetRequestNewsDomainTypePressReleases SourcesGetRequestNewsDomainType = "Press Releases" SourcesGetRequestNewsDomainTypeRepublisher SourcesGetRequestNewsDomainType = "Republisher" SourcesGetRequestNewsDomainTypeOther SourcesGetRequestNewsDomainType = "Other" )
func NewSourcesGetRequestNewsDomainTypeFromString ¶ added in v1.1.0
func NewSourcesGetRequestNewsDomainTypeFromString(s string) (SourcesGetRequestNewsDomainType, error)
func (SourcesGetRequestNewsDomainType) Ptr ¶ added in v1.1.0
func (s SourcesGetRequestNewsDomainType) Ptr() *SourcesGetRequestNewsDomainType
type SourcesPostRequest ¶ added in v1.1.0
type SourcesPostRequest struct { Lang *Lang `json:"lang,omitempty" url:"-"` Countries *Countries `json:"countries,omitempty" url:"-"` PredefinedSources *PredefinedSources `json:"predefined_sources,omitempty" url:"-"` SourceName *SourceName `json:"source_name,omitempty" url:"-"` SourceUrl *SourceUrl `json:"source_url,omitempty" url:"-"` IncludeAdditionalInfo *IncludeAdditionalInfo `json:"include_additional_info,omitempty" url:"-"` IsNewsDomain *IsNewsDomain `json:"is_news_domain,omitempty" url:"-"` NewsDomainType *NewsDomainType `json:"news_domain_type,omitempty" url:"-"` NewsType *NewsType `json:"news_type,omitempty" url:"-"` FromRank *FromRank `json:"from_rank,omitempty" url:"-"` ToRank *ToRank `json:"to_rank,omitempty" url:"-"` }
type SourcesResponseDto ¶ added in v1.1.0
type SourcesResponseDto struct { // A message indicating the result of the request. Message string `json:"message" url:"message"` // A list of news sources that match the specified criteria. Sources []*SourcesResponseDtoSourcesItem `json:"sources,omitempty" url:"sources,omitempty"` // The user input parameters for the request. UserInput map[string]interface{} `json:"user_input,omitempty" url:"user_input,omitempty"` // contains filtered or unexported fields }
The response model for a successful `Sources` request retrieving news sources matching the specified criteria. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing.
func (*SourcesResponseDto) GetExtraProperties ¶ added in v1.1.0
func (s *SourcesResponseDto) GetExtraProperties() map[string]interface{}
func (*SourcesResponseDto) GetMessage ¶ added in v1.1.0
func (s *SourcesResponseDto) GetMessage() string
func (*SourcesResponseDto) GetSources ¶ added in v1.1.0
func (s *SourcesResponseDto) GetSources() []*SourcesResponseDtoSourcesItem
func (*SourcesResponseDto) GetUserInput ¶ added in v1.1.0
func (s *SourcesResponseDto) GetUserInput() map[string]interface{}
func (*SourcesResponseDto) String ¶ added in v1.1.0
func (s *SourcesResponseDto) String() string
func (*SourcesResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (s *SourcesResponseDto) UnmarshalJSON(data []byte) error
type SourcesResponseDtoSourcesItem ¶ added in v1.1.0
type SourcesResponseDtoSourcesItem struct { SourceInfo *SourceInfo String string // contains filtered or unexported fields }
func NewSourcesResponseDtoSourcesItemFromSourceInfo ¶ added in v1.1.0
func NewSourcesResponseDtoSourcesItemFromSourceInfo(value *SourceInfo) *SourcesResponseDtoSourcesItem
func NewSourcesResponseDtoSourcesItemFromString ¶ added in v1.1.0
func NewSourcesResponseDtoSourcesItemFromString(value string) *SourcesResponseDtoSourcesItem
func (*SourcesResponseDtoSourcesItem) Accept ¶ added in v1.1.0
func (s *SourcesResponseDtoSourcesItem) Accept(visitor SourcesResponseDtoSourcesItemVisitor) error
func (*SourcesResponseDtoSourcesItem) GetSourceInfo ¶ added in v1.1.0
func (s *SourcesResponseDtoSourcesItem) GetSourceInfo() *SourceInfo
func (*SourcesResponseDtoSourcesItem) GetString ¶ added in v1.1.0
func (s *SourcesResponseDtoSourcesItem) GetString() string
func (SourcesResponseDtoSourcesItem) MarshalJSON ¶ added in v1.1.0
func (s SourcesResponseDtoSourcesItem) MarshalJSON() ([]byte, error)
func (*SourcesResponseDtoSourcesItem) UnmarshalJSON ¶ added in v1.1.0
func (s *SourcesResponseDtoSourcesItem) UnmarshalJSON(data []byte) error
type SourcesResponseDtoSourcesItemVisitor ¶ added in v1.1.0
type SourcesResponseDtoSourcesItemVisitor interface { VisitSourceInfo(*SourceInfo) error VisitString(string) error }
type SourcesVisitor ¶ added in v1.1.0
type SubscriptionResponseDto ¶ added in v1.1.0
type SubscriptionResponseDto struct { // Indicates whether the subscription is currently active. Active bool `json:"active" url:"active"` // The number of API calls allowed per second allowed in the current plan. ConcurrentCalls int `json:"concurrent_calls" url:"concurrent_calls"` // The name of the subscription plan. Plan string `json:"plan" url:"plan"` // The total number of API calls assigned to the current subscription. PlanCalls int `json:"plan_calls" url:"plan_calls"` // The number of API calls remaining for the current subscription period. RemainingCalls int `json:"remaining_calls" url:"remaining_calls"` // The number of historical days accessible under the current subscription plan. HistoricalDays int `json:"historical_days" url:"historical_days"` // contains filtered or unexported fields }
Response model for a successful `Subscription` request retrieving plan information. Response field behavior: - Required fields are guaranteed to be present and non-null. - Optional fields may be `null`/`undefined` if the data couldn't be extracted during processing.
func (*SubscriptionResponseDto) GetActive ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetActive() bool
func (*SubscriptionResponseDto) GetConcurrentCalls ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetConcurrentCalls() int
func (*SubscriptionResponseDto) GetExtraProperties ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetExtraProperties() map[string]interface{}
func (*SubscriptionResponseDto) GetHistoricalDays ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetHistoricalDays() int
func (*SubscriptionResponseDto) GetPlan ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetPlan() string
func (*SubscriptionResponseDto) GetPlanCalls ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetPlanCalls() int
func (*SubscriptionResponseDto) GetRemainingCalls ¶ added in v1.1.0
func (s *SubscriptionResponseDto) GetRemainingCalls() int
func (*SubscriptionResponseDto) String ¶ added in v1.1.0
func (s *SubscriptionResponseDto) String() string
func (*SubscriptionResponseDto) UnmarshalJSON ¶ added in v1.1.0
func (s *SubscriptionResponseDto) UnmarshalJSON(data []byte) error
type Theme ¶ added in v1.1.0
Filters articles based on their general topic, as determined by NLP analysis. To select multiple themes, use a comma-separated string or an array of strings.
Examples: - `"Finance, Tech"` - `["Finance", "Tech"]`
**Note**: The `theme` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
Available options: `Business`, `Economics`, `Entertainment`, `Finance`, `Health`, `Politics`, `Science`, `Sports`, `Tech`, `Crime`, `Financial Crime`, `Lifestyle`, `Automotive`, `Travel`, `Weather`, `General`.
func NewThemeFromString ¶ added in v1.1.0
func NewThemeFromStringList ¶ added in v1.1.0
func (*Theme) Accept ¶ added in v1.1.0
func (t *Theme) Accept(visitor ThemeVisitor) error
func (*Theme) GetStringList ¶ added in v1.1.0
func (Theme) MarshalJSON ¶ added in v1.1.0
func (*Theme) UnmarshalJSON ¶ added in v1.1.0
type ThemeVisitor ¶ added in v1.1.0
type TimeFrameCount ¶ added in v1.1.0
type TimeFrameCount struct { // The timestamp for the aggregation period in format "YYYY-MM-DD HH:mm:ss" TimeFrame time.Time `json:"time_frame" url:"time_frame"` // The number of articles published during this time frame ArticleCount int `json:"article_count" url:"article_count"` // contains filtered or unexported fields }
Represents the article count for a specific time frame.
func (*TimeFrameCount) GetArticleCount ¶ added in v1.1.0
func (t *TimeFrameCount) GetArticleCount() int
func (*TimeFrameCount) GetExtraProperties ¶ added in v1.1.0
func (t *TimeFrameCount) GetExtraProperties() map[string]interface{}
func (*TimeFrameCount) GetTimeFrame ¶ added in v1.1.0
func (t *TimeFrameCount) GetTimeFrame() time.Time
func (*TimeFrameCount) MarshalJSON ¶ added in v1.1.0
func (t *TimeFrameCount) MarshalJSON() ([]byte, error)
func (*TimeFrameCount) String ¶ added in v1.1.0
func (t *TimeFrameCount) String() string
func (*TimeFrameCount) UnmarshalJSON ¶ added in v1.1.0
func (t *TimeFrameCount) UnmarshalJSON(data []byte) error
type TitleSentimentMax ¶ added in v1.1.0
type TitleSentimentMax = float64
Filters articles based on the maximum sentiment score of their titles.
Range is `-1.0` to `1.0`, where: - Negative values indicate negative sentiment. - Positive values indicate positive sentiment. - Values close to 0 indicate neutral sentiment.
**Note**: The `title_sentiment_max` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type TitleSentimentMin ¶ added in v1.1.0
type TitleSentimentMin = float64
Filters articles based on the minimum sentiment score of their titles.
Range is `-1.0` to `1.0`, where: - Negative values indicate negative sentiment. - Positive values indicate positive sentiment. - Values close to 0 indicate neutral sentiment.
**Note**: The `title_sentiment_min` parameter is only available if NLP is included in your subscription plan.
To learn more, see [NLP features](/docs/v3/documentation/guides-and-concepts/nlp-features).
type To ¶ added in v1.1.0
The ending point in time to search up to. Accepts date-time strings in ISO 8601 format and plain text strings. The default time zone is UTC.
Formats with examples: - YYYY-mm-ddTHH:MM:SS: `2024-07-01T00:00:00` - YYYY-MM-dd: `2024-07-01` - YYYY/mm/dd HH:MM:SS: `2024/07/01 00:00:00` - YYYY/mm/dd: `2024/07/01` - English phrases: `1 day ago`, `today`
**Note**: By default, applied to the publication date of the article. To use the article's parse date instead, set the `by_parse_date` parameter to `true`.
func NewToFromDateTime ¶ added in v1.1.0
func NewToFromString ¶ added in v1.1.0
func (*To) GetDateTime ¶ added in v1.1.0
func (To) MarshalJSON ¶ added in v1.1.0
func (*To) UnmarshalJSON ¶ added in v1.1.0
type ToRank ¶ added in v1.1.0
type ToRank = int
The highest boundary of the rank of a news website to filter by. A lower rank indicates a more popular source.
type TooManyRequestsError ¶ added in v1.1.0
Too many requests - Rate limit exceeded
func (*TooManyRequestsError) MarshalJSON ¶ added in v1.1.0
func (t *TooManyRequestsError) MarshalJSON() ([]byte, error)
func (*TooManyRequestsError) UnmarshalJSON ¶ added in v1.1.0
func (t *TooManyRequestsError) UnmarshalJSON(data []byte) error
func (*TooManyRequestsError) Unwrap ¶ added in v1.1.0
func (t *TooManyRequestsError) Unwrap() error
type UnauthorizedError ¶ added in v1.1.0
type UnauthorizedError struct {}
Unauthorized - Authentication failed
func (*UnauthorizedError) MarshalJSON ¶ added in v1.1.0
func (u *UnauthorizedError) MarshalJSON() ([]byte, error)
func (*UnauthorizedError) UnmarshalJSON ¶ added in v1.1.0
func (u *UnauthorizedError) UnmarshalJSON(data []byte) error
func (*UnauthorizedError) Unwrap ¶ added in v1.1.0
func (u *UnauthorizedError) Unwrap() error
type UnprocessableEntityError ¶
Validation error
func (*UnprocessableEntityError) MarshalJSON ¶
func (u *UnprocessableEntityError) MarshalJSON() ([]byte, error)
func (*UnprocessableEntityError) UnmarshalJSON ¶
func (u *UnprocessableEntityError) UnmarshalJSON(data []byte) error
func (*UnprocessableEntityError) Unwrap ¶
func (u *UnprocessableEntityError) Unwrap() error
type UserInputDto ¶ added in v1.1.0
type UserInputDto = map[string]interface{}
The user input parameters for the request.
type When ¶ added in v1.1.0
type When = string
The time period for which you want to get the latest headlines.
Format examples: - `7d`: Last seven days - `30d`: Last 30 days - `1h`: Last hour - `24h`: Last 24 hours
type WordCountMax ¶ added in v1.1.0
type WordCountMax = int
The maximum number of words an article can contain. To be used for avoiding articles with large content.
type WordCountMin ¶ added in v1.1.0
type WordCountMin = int
The minimum number of words an article must contain. To be used for avoiding articles with small content.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Operations to aggregate news counts.
|
Operations to aggregate news counts. |
Operations to search by author.
|
Operations to search by author. |
Operations to retrieve latest headlines.
|
Operations to retrieve latest headlines. |
Operations to search for articles.
|
Operations to search for articles. |
Operations to search by link or ID.
|
Operations to search by link or ID. |
Operations to find similar articles.
|
Operations to find similar articles. |
Operations to retrieve news sources.
|
Operations to retrieve news sources. |
Operations to get subscription info.
|
Operations to get subscription info. |