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
newsdataapi allows you to create a library for accessing http services easily, in a centralized way. An API defined by newsdataapi will return a JSON object when called.
@@ -42,17 +43,17 @@ api = NewsDataApiClient(apikey="API key")
42
43
response = api.news_api()
43
44
44
45
```
45
-
`API key` : Your private Newsdata API key.
46
+
`API key` : Your private Newsdata API key.
46
47
47
-
`country` : You can pass a comma seperated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
48
+
`country` : You can pass a comma seperated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
48
49
49
50
`category` : A comma seperated string of categories (maximum 5) to restrict the search to. Possible Options: `top`, `business`, `science`, `technology`, `sports`, `health`, `entertainment`
50
51
51
52
`language` : A comma seperated string of languages (maximum 5) to restrict the search to. Possible Options: `en`, `ar`, `jp`, `in`, `es`, `fr`
52
53
53
54
`domain` : A comma seperated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.
54
-
55
-
`q` : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search "Social Pizza" q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza
55
+
56
+
`q` : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search "Social Pizza" q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza
56
57
57
58
`qInTitle` : Keywords or phrases to search for in the news title only.
58
59
@@ -76,9 +77,9 @@ api = NewsDataApiClient(apikey="API key")
76
77
response = api.archive_api()
77
78
78
79
```
79
-
`API key` : Your private Newsdata API key.
80
+
`API key` : Your private Newsdata API key.
80
81
81
-
`country` : You can pass a comma seperated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
82
+
`country` : You can pass a comma seperated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
82
83
83
84
`category` : A comma seperated string of categories (maximum 5) to restrict the search to. Possible Options: `top`, `business`, `science`, `technology`, `sports`, `health`, `entertainment`
84
85
@@ -89,8 +90,8 @@ response = api.archive_api()
89
90
`from_date` : A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. `2021-04-18` or `2021-04-18T04:04:34`)
90
91
91
92
`to_date` : A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. `2021-04-18` or `2021-04-18T04:04:34`)
92
-
93
-
`q` : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search "Social Pizza" q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza
93
+
94
+
`q` : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Social q=social, Search "Social Pizza" q=social pizza, Search Social but not with pizza. social -pizza q=social -pizza, Search Social but not with pizza and wildfire. social -pizza -wildfire q=social -pizza -wildfire, Search multiple keyword with AND operator. social AND pizza q=social AND pizza
94
95
95
96
`qInTitle` : Keywords or phrases to search for in the news title only.
96
97
@@ -115,14 +116,45 @@ api = NewsDataApiClient(apikey="API key")
115
116
response = api.sources_api()
116
117
117
118
```
118
-
`API key` : Your private Newsdata API key.
119
+
`API key` : Your private Newsdata API key.
119
120
120
-
`country` : Find sources that display news in a specific country. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
121
+
`country` : Find sources that display news in a specific country. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
121
122
122
123
`category` : Find sources that display news of this category. Possible Options: `top`, `business`, `science`, `technology`, `sports`, `health`, `entertainment`
123
124
124
125
`language` : Find sources that display news in a specific language. Possible Options: `en`, `ar`, `jp`, `in`, `es`, `fr`
125
126
127
+
<br />
128
+
129
+
### Crypto News API
130
+
131
+
`GET /1/crypto`
132
+
133
+
```
134
+
from newsdataapi import NewsDataApiClient
135
+
136
+
# API key authorization, Initialize the client with your API key
137
+
api = NewsDataApiClient(apikey="API key")
138
+
139
+
# You can pass empty or with request parameters {ex. (country = "us")}
140
+
response = api.crypto_api()
141
+
142
+
```
143
+
`API key` : Your private Newsdata API key.
144
+
145
+
`country` : You can pass a comma seperated string of 2-letter ISO 3166-1 countries (maximum 5) to restrict the search to. Possible Options: `us``gb``in``jp``ae``sa``au``ca``sg`
146
+
147
+
`language` : A comma seperated string of languages (maximum 5) to restrict the search to. Possible Options: `en`, `ar`, `jp`, `in`, `es`, `fr`
148
+
149
+
`domain` : A comma seperated string of domains (maximum 5) to restrict the search to. Use the /domains endpoint to find top sources id.
150
+
151
+
`q` : Keywords or phrases to search for in the news title and content. The value must be URL-encoded. Advance search options: Search Bitcoin q=bitcoin Search "Bitcoin Ethereum" q=bitcoin ethereum Search Bitcoin but not with Ethereum q=bitcoin -ethereum Search Bitcoin but not with Ethereum and Dogecoin bitcoin -ethereum -dogecoin q=bitcoin -ethereum -dogecoin Search multiple keyword with AND operator bitcoin AND ethereum q=bitcoin AND ethereum .
152
+
153
+
`qInTitle` : Keywords or phrases to search for in the news title only.
154
+
155
+
`page` : Use this to page through the results if the total results found is greater than the page size.
156
+
157
+
126
158
<br />
127
159
128
160
## License
@@ -136,4 +168,4 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
136
168
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
137
169
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
138
170
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments