How can we find the as-set of asn?
For Example I have the asn:32934. I want the as-set?
As I understand it, you're looking for a way to determine the set of ASNs advertised by a BGP peer, and as a result the total set of prefixes advertised by this peer, both originated from the peer ASN and its downstreams.
As far as I'm aware, there is no single source of truth for querying which BGP is peer advertising which AS-set. Three sources come to mind:
peeringDB. A lot of networks do register this information there, but there is not that much checking, so anyone can claim to advertise any set. Thanks to the peeringDB API querying this information is easy.
routing registry information (whois data) for the peer ASN. This may contain some information, mostly in freeform text as remarks, about AS-SET the peer advertises. Just as peeringDB, not really reliable since there's no verification, and harder to parse because output is not standardised.
RPSL data in routing registries. If a peer registered its routing policies in RPSL format, you may be able to determine their policy for your peering session based on what they're advertising to other peers. RPSL data is in a standardised format so it's easier to parse, but again there's no verification and also you can't be sure you can deduce the policy from other policies.
Bottomline: it's hard to get reliable data and this is hard to automate building prefix lists to filter incorrect advertisements (I guess that's your ultimate goal here?). So what can help you here?