{"uid":"cap_YY9RIdKXb5rCeA-jZ_idH","slug":"api-strale-io-f28d3d9f","name":"TCP Port Checker","description":"Check if TCP ports are open on a host. Scans up to 20 ports with configurable timeout. Returns open/closed status with latency.","url":"https://api.strale.io/x402/port-check","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["host"],"properties":{"host":{"type":"string"},"ports":{"description":"Array of port numbers or comma-separated string"},"timeout_ms":{"type":"integer"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"host":"google.com","ports":"80,443,22","timeout_ms":5000},"response":{"host":"google.com","_meta":{"payment":{"method":"x402","price_usd":0.054000000000000006,"settlement_id":"0x49386d73850fdb870f98a3f3e599cfce2e129d51344f8a4e2ef6438772aa9f7e"},"capability":"port-check","latency_ms":5001,"provenance":{"source":"tcp-connect","fetched_at":"2026-06-13T04:24:31.555Z"}},"open_count":2,"open_ports":[{"open":true,"port":80,"service":"HTTP","latency_ms":2},{"open":true,"port":443,"service":"HTTPS","latency_ms":2}],"closed_count":1,"closed_ports":[{"open":false,"port":22,"service":"SSH","latency_ms":5000}],"ports_scanned":3,"scan_timeout_ms":5000}},"exampleRequest":{"host":"google.com","ports":"80,443,22","timeout_ms":5000},"tags":["x402"],"displayCostAmount":"0.054001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.054001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.054","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yHEnXK8pM8jhGANDA9T_D","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.054","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether specified TCP ports are open or closed on a given host, returning status and latency for up to 20 ports.","exampleAgentPrompt":"Can you check if ports 80, 443, 22, and 3306 are open on api.example.com, with a 3000ms timeout?","exampleUseCases":[{"title":"Verify production server port accessibility","prompt":"I need to check if our database server at db.prod.internal is listening on ports 3306 and 5432, and also verify that SSH port 22 is reachable. Can you test those three ports with a 5 second timeout?"},{"title":"Validate firewall rules after deployment","prompt":"We just updated our firewall configuration. Can you quickly verify that ports 443 and 8443 are open on our load balancer at lb.example.com, but port 22 is blocked? Use a 2 second timeout please."},{"title":"Check third-party service connectivity","prompt":"Our integration with the payment processor at payments.vendor.com isn't working. Can you scan ports 443, 8443, 9443, and 80 to see which ones are open and what the latency looks like? That'll help us figure out if it's a network connectivity issue."}],"resultDescription":"Returns a list of checked ports with open/closed status and measured latency in milliseconds for each port on the given host.","failureModes":["Host unreachable or invalid hostname returns error","Requesting more than 20 ports exceeds scan limit","Timeout too low causes false negatives for slow hosts","Invalid port number format returns validation error","Network-level blocks may cause incorrect closed status"],"whenToPreferThis":"Use this endpoint when you need to quickly verify TCP port reachability on a remote host without setting up local tooling, especially in automated workflows, infrastructure monitoring, or firewall verification tasks. Ideal for checking up to 20 ports in a single call with configurable timeout.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T13:07:22.198Z","isFirstParty":false}