flowiq
A Python client and a command for the FlowIQ REST API. Python 3.9 or later, no other packages.
What the API does, in one file for programs: https://flowiq-labs.com/api/openapi.json. The query language: https://flowiq-labs.com/help.
Install
pip install flowiq
Your key
Put it in the environment. The command has no option for it, because an argument can be read by every other process on the machine and stays in the shell's history.
export FLOWIQ_API_KEY=sk_live_...
The key is sent in a header, only to https (or to your own machine), and never to wherever a redirect points.
In Python
from flowiq import FlowIQ
fq = FlowIQ()
fq.count("protocol:mongodb country:BR")["total_found"]
for s in fq.search("protocol:mongodb country:BR -tags:honeypot", limit=500, fields=["ip", "port", "org"]):
print(s["ip"], s["port"], s["org"])
fq.host("203.0.113.5")["services"]
[n["name"] for n in fq.domain("example.com", limit=1000)]
fq.breakdown("asn", "protocol:mongodb country:BR", limit=20)["buckets"]
fq.fields() # what breakdown accepts
fq.account()["credits_remaining"]
fq.export("protocol:mongodb", "mongo.ndjson", limit=50000)
search and domain fetch a page at a time as you read, so stopping early costs only what was fetched.
limit=None reads to the end. The object they return knows total_found, notes and next_after; give
next_after back as after= to continue a search later.
Read notes. A field name the server does not know is not an error: it searches titles for it, finds
nothing, and says so there.
What it costs
| call | credits |
|---|---|
search |
1 a record, at least 1 a page |
count |
1 |
host |
1 a service on the host, at least 1. You do not choose how many that is; count(ip) says first |
domain |
1 a name, at least 1 a page |
breakdown |
1 a value returned, at least 1 |
export |
1 a record in the file |
account, fields, export status and download |
none |
When it fails
Everything raised is a FlowIQError. An answer from the server is an APIError with status, message
(the server's own sentence) and refused, and has a class of its own: BadRequest, Unauthorized,
Forbidden, NotFound, NotReady, Gone, RateLimited, ServerError, ServiceUnavailable.
- 429 and 503 are tried again, waiting as long as the server says, or 1, 2, 4 ... seconds when it does not
say. A try that ends in 503 can cost one credit.
FlowIQ(retries=0)turns this off. - A connection lost while waiting is tried again only where asking twice is free. Anywhere else the server
may have run the call and charged for it, so you get
ConnectionFailedand decide. IncompleteResponsemeans the answer began and stopped. Nothing half-read is ever returned as if whole.
Exports
export starts it, waits and downloads. The bytes go to FILE.part and take the name FILE only when the
file is whole. If it is interrupted, export_download(id, path) continues where it stopped, unless the file
on the server was rebuilt in the meantime, in which case it is fetched again. The four steps are also
methods of their own: export_start, export_status, export_wait, export_download.
The command
flowiq count 'protocol:mongodb country:BR'
flowiq search 'protocol:mongodb country:BR' --limit 500 --fields ip,port,org -o csv > mongo.csv
flowiq host 203.0.113.5
flowiq domain example.com --resolved --limit 1000 -o ndjson
flowiq breakdown asn 'protocol:mongodb country:BR' --limit 20
flowiq export 'protocol:mongodb' --limit 50000 -O mongo.ndjson --yes
flowiq export --resume 4711 -O mongo.ndjson
flowiq account
flowiq fields
-o is json, ndjson, csv or table; without it you get a table on a terminal and JSON elsewhere.
A call that can cost more than 1,000 credits says what it costs and what you have left, and stops unless you
add --yes. --all counts first, for one credit.
Titles, banners and names were written by whoever runs the service. On a terminal they are shown without control characters, so they cannot move the cursor or hide text; in CSV a cell that a spreadsheet would run as a formula gets a leading apostrophe. JSON keeps the exact value.
FlowIQ records what a service returned. It makes no claim that a host is vulnerable, and last_seen is the
last time a service answered, not a statement that it is up.
Exit codes: 0 done, 1 an error (the reason is on the error stream), 2 wrong arguments or --yes needed,
3 the export is not ready, 130 interrupted.
Tests
cd clients/python
python -m unittest
They use a small server on a local port and no network. tests/test_spec.py holds that server, the limits
and the types to openapi.json at the top of the repository (set FLOWIQ_OPENAPI to its path), the document the server publishes at https://flowiq-labs.com/api/openapi.json.
Metadata
Release files for flowiq 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flowiq-0.1.0.tar.gz | 32.5 kB | With provenance | Details for flowiq-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flowiq-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for flowiq-0.1.0-py3-none-any.whl |
Total release size: 55.6 kB
Release files / flowiq-0.1.0.tar.gz
| Download URL | flowiq-0.1.0.tar.gz |
|---|---|
| Size | 32.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b113b59fd9a8c36f8c3cd311ad6998fdb6368770464a948188789d91b774388
|
|
BLAKE2b-256 checksum How to use checksums |
e71e6f3c7be19e0261e1e4fbf950e38af2d94e9fa6daddd81aabd7e697015336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / flowiq-0.1.0-py3-none-any.whl
| Download URL | flowiq-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6968117943f77c1b0f3d60d92d59d8473f4676f7925eb1b15e5d897ef778a820
|
|
BLAKE2b-256 checksum How to use checksums |
64457bd1cb0afdd0cad06a7491f79e1027dc9b704e57aaa75bbadc7ca98c476d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for flowiq 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flowiq-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.