You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Search through millions of articles from over 150,000 large and small news sources and blogs. [See the documentation](https://newsapi.org/docs/endpoints/everything)",
8
+
version: "0.0.1",
9
+
type: "action",
10
+
props: {
11
+
newsapi,
12
+
q: {
13
+
propDefinition: [
14
+
newsapi,
15
+
"q",
16
+
],
17
+
},
18
+
searchin: {
19
+
propDefinition: [
20
+
newsapi,
21
+
"searchin",
22
+
],
23
+
},
24
+
sourceIds: {
25
+
propDefinition: [
26
+
newsapi,
27
+
"sourceIds",
28
+
],
29
+
},
30
+
domains: {
31
+
type: "string[]",
32
+
label: "Domains",
33
+
description: "An array of domains to restrict the search to",
34
+
optional: true,
35
+
},
36
+
excludeDomains: {
37
+
type: "string[]",
38
+
label: "Exclude Domains",
39
+
description: "An array of domains to remove from the results",
40
+
optional: true,
41
+
},
42
+
from: {
43
+
type: "string",
44
+
label: "From",
45
+
description: "A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. `2024-11-01` or `2024-11-01T17:27:47`)",
46
+
optional: true,
47
+
},
48
+
to: {
49
+
type: "string",
50
+
label: "To",
51
+
description: "A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. `2024-11-01` or `2024-11-01T17:27:47`)",
description: "Retrieve live top and breaking headlines for a category, single source, multiple sources, or keywords. [See the documentation](https://newsapi.org/docs/endpoints/top-headlines)",
9
+
version: "0.0.1",
10
+
type: "action",
11
+
props: {
12
+
newsapi,
13
+
q: {
14
+
propDefinition: [
15
+
newsapi,
16
+
"q",
17
+
],
18
+
optional: true,
19
+
},
20
+
category: {
21
+
type: "string",
22
+
label: "Category",
23
+
description: "The category you want to get headlines for. Possible options: `business` `entertainment` `general` `health` `science` `sports` `technology`. Note: you can't mix this param with the `sources` param.",
24
+
optional: true,
25
+
},
26
+
sourceIds: {
27
+
propDefinition: [
28
+
newsapi,
29
+
"sourceIds",
30
+
],
31
+
},
32
+
maxResults: {
33
+
propDefinition: [
34
+
newsapi,
35
+
"maxResults",
36
+
],
37
+
},
38
+
},
39
+
asyncrun({ $ }){
40
+
if(this.category&&this.sourceIds){
41
+
thrownewConfigurationError("Please specify only one of `Category` or `SourceIds`");
42
+
}
43
+
44
+
constparams={
45
+
q: this.q,
46
+
category: this.category,
47
+
sources: utils.joinArray(this.sourceIds),
48
+
pageSize: this.maxResults,
49
+
};
50
+
51
+
// The only available country is "us", but it can't be specified along with category or sources.
52
+
// At least one of q, category, sources, or country must be entered, so adding in country if
0 commit comments