{"_id":"581a1a9d1a63870f008b61f1","__v":0,"project":"5615790c0f5ed00d00483dd1","user":"560b40145148ba0d009bd0b5","category":{"_id":"5615790d0f5ed00d00483dd5","__v":19,"pages":["5615790e0f5ed00d00483dd7","561d48e46386060d00e06003","561d48fe31d9630d001eb5bd","561d49b657165b0d00aa5d8b","561d4a879463520d00cd11e2","561d67f48ca8b90d00210234","561d6a0bf0cff80d00ca22c3","561d6c5b071cd60d000d3221","562f9c2543c5570d001fe6bd","56311c99eae7ef0d00270e3d","56311d6702aff217007dba23","56311f96f1c0580d00fac719","563120b7242cda1900198b79","5631229bf1c0580d00fac721","563131559ead230d00a188f6","563134a324014b0d00bd9a4f","5631392082d96a0d00b0fb1d","56313c584b36120d00fdebfb","5642658ef424a10d00118360"],"project":"5615790c0f5ed00d00483dd1","version":"5615790d0f5ed00d00483dd4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-07T19:57:01.871Z","from_sync":false,"order":0,"slug":"opendns-investigate-rest-api","title":"Umbrella Investigate REST API"},"parentDoc":null,"version":{"_id":"5615790d0f5ed00d00483dd4","__v":6,"project":"5615790c0f5ed00d00483dd1","createdAt":"2015-10-07T19:57:01.307Z","releaseDate":"2015-10-07T19:57:01.307Z","categories":["5615790d0f5ed00d00483dd5","56157b2af432910d0000f9fe","56157cfb0f5ed00d00483ddb","562684d95db46b1700fd4f48","573b7ea9ef164e2900a2b8ff","582e285d8373c20f00810608"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-02T16:55:57.236Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":14,"body":"To help better understand how IP addresses are related to each other and to the regional registries, the API can provide data about ASN and IP relationships. You can also find out more about the IP space associated with an AS with this endpoint and correlate BGP routing information between AS.\n\nThis area of the API is functionally similar to the [AS View](https://investigate.umbrella.com/as-view).\n\n## ASN for an IP Address ##\n\nIt can be helpful when querying IP to find which AS (Autonomous System) an IP address is associated with. The AS is part of the BGP routing for that IP.\n\nTo return the AS information for an IP, use the endpoint /bgp_routes/ip/. A valid result will return an array of hash references. The hash reference will contain information about the AS such as the ASN, the CIDR prefix of the AS, the Internet Registry (RIR) number (0 through 6), the Description of the AS and the creation date for the AS.\n\nAn empty response will return an empty array reference: [ ]\n\n### The IR number corresponds to one of the 5 Regional Internet Registries (RIR). ###\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Registry Number\",\n    \"h-1\": \"Region\",\n    \"0-0\": \"Registry 1\",\n    \"1-0\": \"Registry 2\",\n    \"2-0\": \"Registry 3\",\n    \"3-0\": \"Registry 4\",\n    \"4-0\": \"Registry 5\",\n    \"5-0\": \"Registry 0\",\n    \"0-1\": \"AfriNIC: Africa\",\n    \"1-1\": \"APNIC: Asia, Australia, New Zealand, and neighboring countries.\",\n    \"2-1\": \"ARIN: United States, Canada, several parts of the Caribbean region, and Antarctica.\",\n    \"3-1\": \"LACNIC: Latin America and parts of the Caribbean region.\",\n    \"4-1\": \"RIPE NCC: Europe, Russia, the Middle East, and Central Asia.\",\n    \"5-1\": \"Unknown / Not Available\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\nsample query:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Bearer %YourToken%\\\" \\\"https://investigate.api.umbrella.com/bgp_routes/ip/123.173.23.234/as_for_ip.json\\\"\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n### Parameter for input ###\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"ip\",\n    \"0-1\": \"string\",\n    \"0-2\": \"IPv4 IP address for which to obtain the AS information\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n### Returned value for output if Success 200 ###\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"creation_date\",\n    \"0-1\": \"string\",\n    \"2-1\": \"string\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string\",\n    \"1-1\": \"integer\",\n    \"1-0\": \"ir\",\n    \"2-0\": \"description\",\n    \"3-0\": \"asn\",\n    \"4-0\": \"cidr\",\n    \"0-2\": \"Date when AS was first created.\",\n    \"1-2\": \"The IR number corresponds to one of the 5 Regional Internet Registries (RIR). Please see table above for mappings.\",\n    \"2-2\": \"Network Owner Description as provided by the network owner.\",\n    \"3-2\": \"Autonomous System Number (ASN) associated with this IP address.\",\n    \"4-2\": \"IP CIDR for the ASN.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-code-block\\\">\\n  <div class=\\\"api-code-block__header\\\">\\n    <span class=\\\"api-code-block__header__label\\\">GET</span> https://investigate.api.umbrella.com/bgp_routes/ip/ip/as_for_ip.json\\n  </div>\\n  <div class=\\\"api-code-block__section\\\">\\n    <div class=\\\"api-code-block__section__header\\\">REQUEST</div>\\n    <pre>curl --include \\\\\\n     --header \\\"Authorization: Bearer %YourToken%\\\" \\\\\\nhttps://investigate.api.umbrella.com/bgp_routes/ip/{ip}/as_for_ip.json\\n    </pre>\\n  </div>\\n  <div class=\\\"api-code-block__section\\\">\\n    <div class=\\\"api-code-block__section__header\\\">RESPONSE <em>(HTTP 200, Content-Type: application/json)</em>\\n    </div>\\n    <pre>\\n[\\n  {\\n    \\\"creation_date\\\": \\\"2002-08-01\\\",\\n    \\\"ir\\\": 2,\\n    \\\"description\\\": \\\"CHINANET-BACKBONE No.31,Jin-rong Street,CN 86400\\\",\\n    \\\"asn\\\": 4134,\\n    \\\"cidr\\\": \\\"123.172.0.0/15\\\"\\n  }\\n]\\n    </pre>\\n  </div>\\n</div>\"\n}\n[/block]\n## Prefix routing information for an AS ##\n\nQueries can also be about a specific AS (Autonomous System) to find which CIDR and Geolocations are associated with that AS.\n\nTo return the IP and Geolocation information for an AS, use the endpoint /bgp_routes/asn/.\n\nA found response to a valid ASN will return an array of hash references. Each hash reference will contain two keys: geo and cidr. Geo is a hash reference with the country name and country code (the code corresponds to the IPv4 list for ISO-3166 in alphabetized order and can usually be ignored). CIDR contains the IP prefix for this ASN.\n\nAn empty response will return an empty array reference: [ ]\n\nSample query:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Bearer %YourToken%\\\" \\\"https://investigate.api.umbrella.com/bgp_routes/asn/11425/prefixes_for_asn.json\\\"\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n### Parameter for input ###\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"asn\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Autonomous System Number (ASN) for the AS.\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n### Returned value for output if Success 200 ###\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"cdir\",\n    \"0-1\": \"array\",\n    \"0-2\": \"Array of the CIDR Range of IP addresses associated with this AS.\",\n    \"1-2\": \"Geo is a hash reference with the country name and country code (the code corresponds to the IPv4 list for ISO-3166 in alphabetized order and can usually be ignored).\",\n    \"1-1\": \"array\",\n    \"1-0\": \"geo\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-code-block\\\">\\n  <div class=\\\"api-code-block__header\\\">\\n    <span class=\\\"api-code-block__header__label\\\">GET</span> https://investigate.api.umbrella.com/bgp_routes/asn/asn/as_for_ip.json\\n  </div>\\n  <div class=\\\"api-code-block__section\\\">\\n    <div class=\\\"api-code-block__section__header\\\">REQUEST</div>\\n    <pre>curl --include \\\\\\n     --header \\\"Authorization: Bearer %YourToken%\\\" \\\\\\nhttps://investigate.api.umbrella.com/bgp_routes/asn/{asn}/as_for_ip.json\\n    </pre>\\n  </div>\\n  <div class=\\\"api-code-block__section\\\">\\n    <div class=\\\"api-code-block__section__header\\\">RESPONSE <em>(HTTP 200, Content-Type: application/json)</em>\\n    </div>\\n    <pre>\\n[\\n  {\\n    \\\"cidr\\\": \\\"98.143.32.0/20\\\",\\n    \\\"geo\\\": {\\n      \\\"country_name\\\": \\\"United States\\\",\\n      \\\"country_code\\\": 225\\n    }\\n  }\\n]\\n    </pre>\\n  </div>\\n</div>\"\n}\n[/block]\n---\n[DNS RR History for an IP Address](https://docs.umbrella.com/developer/investigate-api/dns-rr-history-for-an-ip-address-1/) < **AS Information for a Domain** > [WHOIS Information for a Domain](https://docs.umbrella.com/developer/investigate-api/whois-information-for-a-domain-1/)","excerpt":"","slug":"as-information-for-a-domain-1","type":"basic","title":"AS Information for a Domain"}

AS Information for a Domain


To help better understand how IP addresses are related to each other and to the regional registries, the API can provide data about ASN and IP relationships. You can also find out more about the IP space associated with an AS with this endpoint and correlate BGP routing information between AS. This area of the API is functionally similar to the [AS View](https://investigate.umbrella.com/as-view). ## ASN for an IP Address ## It can be helpful when querying IP to find which AS (Autonomous System) an IP address is associated with. The AS is part of the BGP routing for that IP. To return the AS information for an IP, use the endpoint /bgp_routes/ip/. A valid result will return an array of hash references. The hash reference will contain information about the AS such as the ASN, the CIDR prefix of the AS, the Internet Registry (RIR) number (0 through 6), the Description of the AS and the creation date for the AS. An empty response will return an empty array reference: [ ] ### The IR number corresponds to one of the 5 Regional Internet Registries (RIR). ### [block:parameters] { "data": { "h-0": "Registry Number", "h-1": "Region", "0-0": "Registry 1", "1-0": "Registry 2", "2-0": "Registry 3", "3-0": "Registry 4", "4-0": "Registry 5", "5-0": "Registry 0", "0-1": "AfriNIC: Africa", "1-1": "APNIC: Asia, Australia, New Zealand, and neighboring countries.", "2-1": "ARIN: United States, Canada, several parts of the Caribbean region, and Antarctica.", "3-1": "LACNIC: Latin America and parts of the Caribbean region.", "4-1": "RIPE NCC: Europe, Russia, the Middle East, and Central Asia.", "5-1": "Unknown / Not Available" }, "cols": 2, "rows": 6 } [/block] sample query: [block:code] { "codes": [ { "code": "curl -H \"Authorization: Bearer %YourToken%\" \"https://investigate.api.umbrella.com/bgp_routes/ip/123.173.23.234/as_for_ip.json\"", "language": "text" } ] } [/block] ### Parameter for input ### [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "ip", "0-1": "string", "0-2": "IPv4 IP address for which to obtain the AS information" }, "cols": 3, "rows": 1 } [/block] ### Returned value for output if Success 200 ### [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "creation_date", "0-1": "string", "2-1": "string", "3-1": "string", "4-1": "string", "1-1": "integer", "1-0": "ir", "2-0": "description", "3-0": "asn", "4-0": "cidr", "0-2": "Date when AS was first created.", "1-2": "The IR number corresponds to one of the 5 Regional Internet Registries (RIR). Please see table above for mappings.", "2-2": "Network Owner Description as provided by the network owner.", "3-2": "Autonomous System Number (ASN) associated with this IP address.", "4-2": "IP CIDR for the ASN." }, "cols": 3, "rows": 5 } [/block] [block:html] { "html": "<div class=\"api-code-block\">\n <div class=\"api-code-block__header\">\n <span class=\"api-code-block__header__label\">GET</span> https://investigate.api.umbrella.com/bgp_routes/ip/ip/as_for_ip.json\n </div>\n <div class=\"api-code-block__section\">\n <div class=\"api-code-block__section__header\">REQUEST</div>\n <pre>curl --include \\\n --header \"Authorization: Bearer %YourToken%\" \\\nhttps://investigate.api.umbrella.com/bgp_routes/ip/{ip}/as_for_ip.json\n </pre>\n </div>\n <div class=\"api-code-block__section\">\n <div class=\"api-code-block__section__header\">RESPONSE <em>(HTTP 200, Content-Type: application/json)</em>\n </div>\n <pre>\n[\n {\n \"creation_date\": \"2002-08-01\",\n \"ir\": 2,\n \"description\": \"CHINANET-BACKBONE No.31,Jin-rong Street,CN 86400\",\n \"asn\": 4134,\n \"cidr\": \"123.172.0.0/15\"\n }\n]\n </pre>\n </div>\n</div>" } [/block] ## Prefix routing information for an AS ## Queries can also be about a specific AS (Autonomous System) to find which CIDR and Geolocations are associated with that AS. To return the IP and Geolocation information for an AS, use the endpoint /bgp_routes/asn/. A found response to a valid ASN will return an array of hash references. Each hash reference will contain two keys: geo and cidr. Geo is a hash reference with the country name and country code (the code corresponds to the IPv4 list for ISO-3166 in alphabetized order and can usually be ignored). CIDR contains the IP prefix for this ASN. An empty response will return an empty array reference: [ ] Sample query: [block:code] { "codes": [ { "code": "curl -H \"Authorization: Bearer %YourToken%\" \"https://investigate.api.umbrella.com/bgp_routes/asn/11425/prefixes_for_asn.json\"", "language": "text" } ] } [/block] ### Parameter for input ### [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "asn", "0-1": "string", "0-2": "Autonomous System Number (ASN) for the AS." }, "cols": 3, "rows": 1 } [/block] ### Returned value for output if Success 200 ### [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "cdir", "0-1": "array", "0-2": "Array of the CIDR Range of IP addresses associated with this AS.", "1-2": "Geo is a hash reference with the country name and country code (the code corresponds to the IPv4 list for ISO-3166 in alphabetized order and can usually be ignored).", "1-1": "array", "1-0": "geo" }, "cols": 3, "rows": 2 } [/block] [block:html] { "html": "<div class=\"api-code-block\">\n <div class=\"api-code-block__header\">\n <span class=\"api-code-block__header__label\">GET</span> https://investigate.api.umbrella.com/bgp_routes/asn/asn/as_for_ip.json\n </div>\n <div class=\"api-code-block__section\">\n <div class=\"api-code-block__section__header\">REQUEST</div>\n <pre>curl --include \\\n --header \"Authorization: Bearer %YourToken%\" \\\nhttps://investigate.api.umbrella.com/bgp_routes/asn/{asn}/as_for_ip.json\n </pre>\n </div>\n <div class=\"api-code-block__section\">\n <div class=\"api-code-block__section__header\">RESPONSE <em>(HTTP 200, Content-Type: application/json)</em>\n </div>\n <pre>\n[\n {\n \"cidr\": \"98.143.32.0/20\",\n \"geo\": {\n \"country_name\": \"United States\",\n \"country_code\": 225\n }\n }\n]\n </pre>\n </div>\n</div>" } [/block] --- [DNS RR History for an IP Address](https://docs.umbrella.com/developer/investigate-api/dns-rr-history-for-an-ip-address-1/) < **AS Information for a Domain** > [WHOIS Information for a Domain](https://docs.umbrella.com/developer/investigate-api/whois-information-for-a-domain-1/)