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
Copy file name to clipboardExpand all lines: README.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,7 +264,7 @@ Custom parameters aside from the common `GET` Request parameters:
264
264
api = API(USERNAME, KEY)
265
265
api.nod(endpoint="feed", **kwargs)
266
266
```
267
-
-`header_authentication`: by default, we're using API Header Authentication. Set this False if you want to use API Key and Secret Authentication. Apparently, you can't use APIHeader Authentication for`download` endpoints so this will be defaulted to `False`even without explicitly setting it.
267
+
-`header_authentication`: by default, allRTTF endpoints (both `feed`and`download`) use APIHeader Authentication, sending the APIkey via the `X-Api-Key` header. Set this to `False`to pass the API key as a query parameter instead.
268
268
```python
269
269
api = API(USERNAME, KEY, header_authentication=False)
270
270
api.nod(**kwargs)
@@ -275,7 +275,7 @@ Custom parameters aside from the common `GET` Request parameters:
275
275
api.nod(output_format="csv", **kwargs)
276
276
```
277
277
278
-
The Feed APIstandard access pattern is to periodically request the most recent feed data,as often as every 60 seconds. Specify the range of data you receive in one of two ways:
278
+
The `feed` endpoint streams live NDJSON data. The standard access pattern is to pollas often as every 60 seconds. Specify the range of data you receive in one of two ways:
279
279
280
280
1. With `sessionID`: Make a call and provide a new `sessionID` parameter of your choosing. The API will return the last hour of data by default.
281
281
- Each subsequent call to the API using your `sessionID` will returnall data since the last.
@@ -284,6 +284,16 @@ The Feed API standard access pattern is to periodically request the most recent
284
284
- Either an `after=-60` query parameter, where (in this example) -60 indicates the previous 60 seconds.
285
285
- Or `after`and`before` query parameters for a time range, with each parameter accepting an ISO-8601UTC formatted timestamp (a UTC date and time of the formatYYYY-MM-DDThh:mm:ssZ)
286
286
287
+
The `download` endpoint returns a standard JSON response (not a stream) listing available S3 batch files. Time parameters (`sessionID`, `after`, `before`) are **not** required for download calls.
288
+
289
+
```python
290
+
api = API(USERNAME, KEY)
291
+
result = api.nod(endpoint="download", limit=5)
292
+
print(result["download_name"])
293
+
for f in result["files"]:
294
+
print(f["name"], f["url"])
295
+
```
296
+
287
297
### Feed parameters
288
298
289
299
The feed methods accept the following parameters, grouped by purpose. Availability depends on the feed (see the notes below the table).
@@ -325,11 +335,24 @@ The feed methods accept the following parameters, grouped by purpose. Availabili
325
335
326
336
-`output_format`: `csv`or`jsonl` (default `jsonl`). Not available on the `domainrdap` feed. `csv`isnot available for`download` endpoints.
327
337
-`headers`: When `csv` output is used, adds a header row to the first line of the response.
328
-
-`top`: Positive integer from`1` to `1,000,000,000` limiting the number of results in the response payload.
338
+
-`top`: Positive integer from`1` to `1,000,000,000` limiting the number of results in the response payload. Ignored for the `download` endpoint.
339
+
340
+
#### Download-only parameters
341
+
342
+
These parameters are only accepted when `endpoint="download"`. They are ignored for the `feed` endpoint.
343
+
344
+
-`limit`: Maximum number of files to returnin the response.
345
+
-`page`: Zero-indexed page of results to return. Available on `realtime_domain_risk`, `domainhotlist`, `iphotlist`, and`iprisk`.
346
+
-`prefix`: Filter files by date prefix (e.g. `"2026-08-"`). Available on `realtime_domain_risk`, `domainhotlist`, `iphotlist`, and`iprisk`.
## Handling iterative response from RTUF endpoints:
353
+
## Handling iterative response from RTTF endpoints:
331
354
332
-
Since we may dealing with large feeds datasets, the python wrapper uses `generator`for efficient memory handling. Therefore, we need to iterate through the `generator`if we're accessing the partial results of the feeds data.
355
+
Since we may be dealing with large feeds datasets, the python wrapper uses `generator`for efficient memory handling. Therefore, we need to iterate through the `generator`if we're accessing the partial results of the feeds data.
333
356
334
357
### Single request because the requested data is within the maximum result:
0 commit comments