NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

SRV Record Parser API

POST

Extract services, protocols, and domains from any DNS SRV record.

SRV Record Parser analyzes DNS SRV records and extracts service location information including priority, weight, port, and target server details.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/srvparser
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "raw_record": "_http._tcp.example.com. 86400 IN SRV 10 60 80 server.example.com.",
    "parsed": {
      "name": "_http._tcp.example.com.",
      "service": "_http",
      "protocol": "tcp",
      "domain": "example.com.",
      "ttl": 86400,
      "class": "IN",
      "priority": 10,
      "weight": 60,
      "port": 80,
      "target": "server.example.com"
    },
    "service_info": {
      "name": "HTTP",
      "description": "Web service",
      "default_port": 80
    },
    "interpretation": {
      "priority_explanation": "Priority level 10 (lower is better)",
      "weight_explanation": "Weight 60 for load balancing",
      "target_explanation": "Connect to server.example.com:80"
    },
    "is_valid": true
  }
}

About the SRV Record Parser API

An SRV record parser API that breaks a DNS service record into its parts and explains what each one means. Paste an SRV record such as _minecraft._tcp.example.com. 3600 IN SRV 0 5 25565 mc.example.com. to see each field explained, including the service, protocol, port and target, along with the TTL and DNS class.

It is useful wherever SRV records are written by hand or read from a zone file: checking a record for a game server, VoIP or SIP trunk, XMPP chat, Kerberos or LDAP before it goes live, documenting existing records, or building a DNS management screen that shows records in plain language.

The Free plan returns the record name split into service, protocol and domain, plus the TTL, class and a validity flag. Paid plans add the priority, weight, port and target host, recognition of common services like HTTP, XMPP, SIP and the mail protocols with their usual default ports, and short plain-English explanations of the priority, weight and connection target.

How it works

SRV Record Parser splits the record string on whitespace and accepts three layouts: the full zone-file form (name TTL class SRV priority weight port target), the name followed only by the four values, or the four values alone. When the first token starts with an underscore it is taken as the record name. A number after it is read as the TTL only when a class or SRV keyword follows, or when three more numbers follow it, so _sip._tcp.host 10 60 5060 target is not mistaken for a TTL of 10. The class may be IN, CH or HS and defaults to IN.

priority, weight and port must be integers from 0 to 65535 or the call returns a 400 naming the bad field, as it does when fewer than four values remain. The name is split on dots into service (such as _http), protocol (with its underscore removed) and domain. When no name is given these are null. The trailing dot is stripped from target.

service_info looks up the service and protocol pair in a built-in list of 19 entries covering HTTP, HTTPS, FTP, LDAP, LDAPS, XMPP client and server, SIP and SIPS, SMTP, IMAP, POP3 and their TLS variants, Kerberos, CalDAV and CardDAV. It is null for anything else, such as _minecraft._tcp. interpretation turns the numbers into text: priority 0 is described as highest priority, weight 0 as no preference, and a target of . reports that the service is deliberately not available, as RFC 2782 defines.

is_valid is true on every successful parse; malformed input returns an error instead. On the Free plan priority, weight, port, target, service_info and interpretation are removed.

What people use it for

Service Discovery
Parse DNS SRV records for service discovery in distributed systems, microservices, and load-balanced environments
Network Diagnostics
Build network diagnostic tools that analyze SRV records for troubleshooting connectivity and service availability issues
Configuration Analysis
Analyze service configuration in DNS including priority, weight, port, and target information for optimization
Record Validation
Validate SRV record formatting and structure to ensure compliance with RFC 2782 standards and best practices

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use SRV Record Parser

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the SRV Record Parser API.

Read the docs →
Which protocols and service types does the parser identify?
It identifies common protocols including HTTP, XMPP, SIP, and email services. When a known service is recognized, the parser supplies human-readable service descriptions and default port details alongside protocol and domain information.
What would parsing 50,000 SRV records a month cost me?
Each parse costs 2 credits, so 50,000 records consume 100,000 credits each month. That uses half of the 200,000 credits included with the Starter plan, working out to about $0.30 per 1,000 parses. If you just need to test, the Free plan includes 100 parses every month.
Do I get the target host and port on the Free plan?
No. The target host, port number, priority, weight, recognized service info, and human-readable explanations are premium fields unlocked on Starter and above. The Free plan provides basic record details including service identifier, protocol, domain, TTL, and validation status.
How does the API handle malformed or invalid SRV records?
The response includes an is_valid field indicating whether the string matches valid SRV syntax. If a string cannot be parsed correctly into standard DNS components, this flag signals the formatting issue so your application can flag or reject bad input.
Can I use parsed SRV data inside my commercial monitoring tools?
Yes, provided you are on a paid plan. You can use the parsed records, priority rankings, and service details inside your commercial network diagnostics, discovery tools, or SaaS platforms. You cannot redistribute or resell the raw parser output directly as a standalone dataset.

Ready to build with SRV Record Parser? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs