The Streaming API is an HTTP-based service that returns a real-time stream of data collected by Shodan. The stream returns the information as a JSON-encoded string using 2 output formats that can be set using the "t" URL parameter:
Each item is separated by a newline. For example, the Banners stream returns 1 banner per line where the banner contains all of the data that was just collected for a given service on the Internet.
Outputs the JSON data using the Server-Sent Events protocol, making it easy to consume directly in the browser.
The base URL for all of these methods is:
https://stream.shodan.io
This stream provides a filtered, bandwidth-saving view of the Banners stream in case you are only interested in devices located in certain ASNs.
https://stream.shodan.io/shodan/asn/3303,32475?key={YOUR_API_KEY}
{"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:04.093341", "hostnames": ["cm-188.126.200.80.customer.telag.net"], "org": "TEL-AG CMTS Grimstad", "guid": "3162425424:e4327222-7e78-11e3-8080-808080808080", "data": "\u0005\ufffd\u0000ServerName;WIN-NVAAFR9N703;InstanceName;SQLEXPRESS;IsClustered;No;Version;10.0.1600.22;tcp;49166;np;\\\\WIN-NVAAFR9N703\\pipe\\MSSQL$SQLEXPRESS\\sql\\query;via;WIN-NVAAFR9N703,0:1433;;", "port": 1434, "info": "ServerName: WIN-NVAAFR9N703; TCPPort: 49166", "isp": "TEL-AG AS", "cpe": "o:microsoft:windows", "asn": "AS51135", "version": "10.0.1600.22", "location": {"country_code3": "NOR", "city": "Grimstad", "postal_code": null, "longitude": 8.588600000000014, "country_code": "NO", "latitude": 58.340599999999995, "country_name": "Norway", "area_code": null, "dma_code": null, "region_code": null}, "ip": 3162425424, "domains": ["telag.net"], "ip_str": "188.126.200.80", "os": null, "opts": {}} {"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:11.536314", "hostnames": ["mahendras.securehostdns.com"], "org": "Limestone Networks", "guid": "1066345474:e8a22744-7e78-11e3-8080-808080808080", "data": "\u0005P\u0001ServerName;MAHENDRAS;InstanceName;SQLEXPRESS;IsClustered;No;Version;9.00.3042.00;;ServerName;MAHENDRAS;InstanceName;MSSQLSERVER;IsClustered;No;Version;10.50.1600.1;tcp;1533;np;\\\\MAHENDRAS\\pipe\\sql\\query;;ServerName;MAHENDRAS;InstanceName;PROJECT;IsClustered;No;Version;10.0.1600.22;tcp;1433;np;\\\\MAHENDRAS\\pipe\\MSSQL$PROJECT\\sql\\query;;", "port": 1434, "info": "ServerName: MAHENDRAS", "isp": "Limestone Networks", "cpe": "o:microsoft:windows", "asn": "AS46475", "version": "9.00.3042.00", "location": {"country_code3": "USA", "city": "Dallas", "postal_code": "75202", "longitude": -96.8028, "country_code": "US", "latitude": 32.7791, "country_name": "United States", "area_code": 214, "dma_code": 623, "region_code": null}, "ip": 1066345474, "domains": ["securehostdns.com"], "ip_str": "63.143.36.2", "os": null, "opts": {}}
This stream provides a filtered, bandwidth-saving view of the Banners stream in case you are only interested in devices located in certain countries.
https://stream.shodan.io/shodan/countries/DE,US?key={YOUR_API_KEY}
{"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:04.093341", "hostnames": ["cm-188.126.200.80.customer.telag.net"], "org": "TEL-AG CMTS Grimstad", "guid": "3162425424:e4327222-7e78-11e3-8080-808080808080", "data": "\u0005\ufffd\u0000ServerName;WIN-NVAAFR9N703;InstanceName;SQLEXPRESS;IsClustered;No;Version;10.0.1600.22;tcp;49166;np;\\\\WIN-NVAAFR9N703\\pipe\\MSSQL$SQLEXPRESS\\sql\\query;via;WIN-NVAAFR9N703,0:1433;;", "port": 1434, "info": "ServerName: WIN-NVAAFR9N703; TCPPort: 49166", "isp": "TEL-AG AS", "cpe": "o:microsoft:windows", "asn": "AS51135", "version": "10.0.1600.22", "location": {"country_code3": "NOR", "city": "Grimstad", "postal_code": null, "longitude": 8.588600000000014, "country_code": "NO", "latitude": 58.340599999999995, "country_name": "Norway", "area_code": null, "dma_code": null, "region_code": null}, "ip": 3162425424, "domains": ["telag.net"], "ip_str": "188.126.200.80", "os": null, "opts": {}} {"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:11.536314", "hostnames": ["mahendras.securehostdns.com"], "org": "Limestone Networks", "guid": "1066345474:e8a22744-7e78-11e3-8080-808080808080", "data": "\u0005P\u0001ServerName;MAHENDRAS;InstanceName;SQLEXPRESS;IsClustered;No;Version;9.00.3042.00;;ServerName;MAHENDRAS;InstanceName;MSSQLSERVER;IsClustered;No;Version;10.50.1600.1;tcp;1533;np;\\\\MAHENDRAS\\pipe\\sql\\query;;ServerName;MAHENDRAS;InstanceName;PROJECT;IsClustered;No;Version;10.0.1600.22;tcp;1433;np;\\\\MAHENDRAS\\pipe\\MSSQL$PROJECT\\sql\\query;;", "port": 1434, "info": "ServerName: MAHENDRAS", "isp": "Limestone Networks", "cpe": "o:microsoft:windows", "asn": "AS46475", "version": "9.00.3042.00", "location": {"country_code3": "USA", "city": "Dallas", "postal_code": "75202", "longitude": -96.8028, "country_code": "US", "latitude": 32.7791, "country_name": "United States", "area_code": 214, "dma_code": 623, "region_code": null}, "ip": 1066345474, "domains": ["securehostdns.com"], "ip_str": "63.143.36.2", "os": null, "opts": {}}
Only returns banner data for the list of specified ports. This stream provides a filtered, bandwidth-saving view of the Banners stream in case you are only interested in a specific list of ports.
https://stream.shodan.io/shodan/ports/1434,27017,6379?key={YOUR_API_KEY}
{"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:04.093341", "hostnames": ["cm-188.126.200.80.customer.telag.net"], "org": "TEL-AG CMTS Grimstad", "guid": "3162425424:e4327222-7e78-11e3-8080-808080808080", "data": "\u0005\ufffd\u0000ServerName;WIN-NVAAFR9N703;InstanceName;SQLEXPRESS;IsClustered;No;Version;10.0.1600.22;tcp;49166;np;\\\\WIN-NVAAFR9N703\\pipe\\MSSQL$SQLEXPRESS\\sql\\query;via;WIN-NVAAFR9N703,0:1433;;", "port": 1434, "info": "ServerName: WIN-NVAAFR9N703; TCPPort: 49166", "isp": "TEL-AG AS", "cpe": "o:microsoft:windows", "asn": "AS51135", "version": "10.0.1600.22", "location": {"country_code3": "NOR", "city": "Grimstad", "postal_code": null, "longitude": 8.588600000000014, "country_code": "NO", "latitude": 58.340599999999995, "country_name": "Norway", "area_code": null, "dma_code": null, "region_code": null}, "ip": 3162425424, "domains": ["telag.net"], "ip_str": "188.126.200.80", "os": null, "opts": {}} {"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:11.536314", "hostnames": ["mahendras.securehostdns.com"], "org": "Limestone Networks", "guid": "1066345474:e8a22744-7e78-11e3-8080-808080808080", "data": "\u0005P\u0001ServerName;MAHENDRAS;InstanceName;SQLEXPRESS;IsClustered;No;Version;9.00.3042.00;;ServerName;MAHENDRAS;InstanceName;MSSQLSERVER;IsClustered;No;Version;10.50.1600.1;tcp;1533;np;\\\\MAHENDRAS\\pipe\\sql\\query;;ServerName;MAHENDRAS;InstanceName;PROJECT;IsClustered;No;Version;10.0.1600.22;tcp;1433;np;\\\\MAHENDRAS\\pipe\\MSSQL$PROJECT\\sql\\query;;", "port": 1434, "info": "ServerName: MAHENDRAS", "isp": "Limestone Networks", "cpe": "o:microsoft:windows", "asn": "AS46475", "version": "9.00.3042.00", "location": {"country_code3": "USA", "city": "Dallas", "postal_code": "75202", "longitude": -96.8028, "country_code": "US", "latitude": 32.7791, "country_name": "United States", "area_code": 214, "dma_code": 623, "region_code": null}, "ip": 1066345474, "domains": ["securehostdns.com"], "ip_str": "63.143.36.2", "os": null, "opts": {}}
Subscribe to banners discovered on all IP ranges described in the network alerts.
https://stream.shodan.io/shodan/alert?key={YOUR_API_KEY}
{"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:04.093341", "hostnames": ["cm-188.126.200.80.customer.telag.net"], "org": "TEL-AG CMTS Grimstad", "guid": "3162425424:e4327222-7e78-11e3-8080-808080808080", "data": "\u0005\ufffd\u0000ServerName;WIN-NVAAFR9N703;InstanceName;SQLEXPRESS;IsClustered;No;Version;10.0.1600.22;tcp;49166;np;\\\\WIN-NVAAFR9N703\\pipe\\MSSQL$SQLEXPRESS\\sql\\query;via;WIN-NVAAFR9N703,0:1433;;", "port": 1434, "info": "ServerName: WIN-NVAAFR9N703; TCPPort: 49166", "isp": "TEL-AG AS", "cpe": "o:microsoft:windows", "asn": "AS51135", "version": "10.0.1600.22", "location": {"country_code3": "NOR", "city": "Grimstad", "postal_code": null, "longitude": 8.588600000000014, "country_code": "NO", "latitude": 58.340599999999995, "country_name": "Norway", "area_code": null, "dma_code": null, "region_code": null}, "ip": 3162425424, "domains": ["telag.net"], "ip_str": "188.126.200.80", "os": null, "opts": {}} {"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:11.536314", "hostnames": ["mahendras.securehostdns.com"], "org": "Limestone Networks", "guid": "1066345474:e8a22744-7e78-11e3-8080-808080808080", "data": "\u0005P\u0001ServerName;MAHENDRAS;InstanceName;SQLEXPRESS;IsClustered;No;Version;9.00.3042.00;;ServerName;MAHENDRAS;InstanceName;MSSQLSERVER;IsClustered;No;Version;10.50.1600.1;tcp;1533;np;\\\\MAHENDRAS\\pipe\\sql\\query;;ServerName;MAHENDRAS;InstanceName;PROJECT;IsClustered;No;Version;10.0.1600.22;tcp;1433;np;\\\\MAHENDRAS\\pipe\\MSSQL$PROJECT\\sql\\query;;", "port": 1434, "info": "ServerName: MAHENDRAS", "isp": "Limestone Networks", "cpe": "o:microsoft:windows", "asn": "AS46475", "version": "9.00.3042.00", "location": {"country_code3": "USA", "city": "Dallas", "postal_code": "75202", "longitude": -96.8028, "country_code": "US", "latitude": 32.7791, "country_name": "United States", "area_code": 214, "dma_code": 623, "region_code": null}, "ip": 1066345474, "domains": ["securehostdns.com"], "ip_str": "63.143.36.2", "os": null, "opts": {}}
Subscribe to banners discovered on the IP range defined in a specific network alert.
https://stream.shodan.io/shodan/alert/HKVGAIRWD79Z7W2T?key={YOUR_API_KEY}
{"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:04.093341", "hostnames": ["cm-188.126.200.80.customer.telag.net"], "org": "TEL-AG CMTS Grimstad", "guid": "3162425424:e4327222-7e78-11e3-8080-808080808080", "data": "\u0005\ufffd\u0000ServerName;WIN-NVAAFR9N703;InstanceName;SQLEXPRESS;IsClustered;No;Version;10.0.1600.22;tcp;49166;np;\\\\WIN-NVAAFR9N703\\pipe\\MSSQL$SQLEXPRESS\\sql\\query;via;WIN-NVAAFR9N703,0:1433;;", "port": 1434, "info": "ServerName: WIN-NVAAFR9N703; TCPPort: 49166", "isp": "TEL-AG AS", "cpe": "o:microsoft:windows", "asn": "AS51135", "version": "10.0.1600.22", "location": {"country_code3": "NOR", "city": "Grimstad", "postal_code": null, "longitude": 8.588600000000014, "country_code": "NO", "latitude": 58.340599999999995, "country_name": "Norway", "area_code": null, "dma_code": null, "region_code": null}, "ip": 3162425424, "domains": ["telag.net"], "ip_str": "188.126.200.80", "os": null, "opts": {}} {"product": "Microsoft SQL Server", "timestamp": "2014-01-16T06:39:11.536314", "hostnames": ["mahendras.securehostdns.com"], "org": "Limestone Networks", "guid": "1066345474:e8a22744-7e78-11e3-8080-808080808080", "data": "\u0005P\u0001ServerName;MAHENDRAS;InstanceName;SQLEXPRESS;IsClustered;No;Version;9.00.3042.00;;ServerName;MAHENDRAS;InstanceName;MSSQLSERVER;IsClustered;No;Version;10.50.1600.1;tcp;1533;np;\\\\MAHENDRAS\\pipe\\sql\\query;;ServerName;MAHENDRAS;InstanceName;PROJECT;IsClustered;No;Version;10.0.1600.22;tcp;1433;np;\\\\MAHENDRAS\\pipe\\MSSQL$PROJECT\\sql\\query;;", "port": 1434, "info": "ServerName: MAHENDRAS", "isp": "Limestone Networks", "cpe": "o:microsoft:windows", "asn": "AS46475", "version": "9.00.3042.00", "location": {"country_code3": "USA", "city": "Dallas", "postal_code": "75202", "longitude": -96.8028, "country_code": "US", "latitude": 32.7791, "country_name": "United States", "area_code": 214, "dma_code": 623, "region_code": null}, "ip": 1066345474, "domains": ["securehostdns.com"], "ip_str": "63.143.36.2", "os": null, "opts": {}}