Skip to main content

Random Internet Data API

MOCK DATA

Random internet building blocks — valid IPv4/IPv6 addresses, locally-administered MACs, non-resolvable .test domains and URLs, slugs, ports and TLDs.

Generated test data for fixtures and development

Base URL
/api/internet
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/internet

Live requestRuns against the public API
No key required
GET/api/internet?count=5&seed=42

Request parameters

No route-specific input is required.
Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/internet?seed=42&count=5"
const res = await fetch("https://randomapi.dev/api/internet?seed=42&count=5");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/internet?seed=42&count=5").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/internet?seed=42&count=5"
), true);
$data = $json["data"];
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=ipv4,ipv6
exclude list

Return all fields except these (comma-separated).

example: exclude=tld
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
ipv4 string (IPv4)

Valid dotted-quad IPv4. First octet is 1–223 and never 10 (private class A) or 127 (loopback); multicast/reserved first octets (224–255) never occur.

example: 84.231.17.92

ipv6 string (IPv6)

Fully-expanded IPv6: 8 groups of exactly 4 lowercase hex digits, no '::' compression.

example: 2b3c:09f1:7a2e:441d:8c05:e7b9:1f63:a04d

mac string (MAC-48)

Lowercase colon-separated MAC with the locally-administered bit set and the multicast bit clear (second hex digit always 2, 6, a or e) — never collides with a vendor-assigned (OUI) address.

example: 8e:2f:6a:b1:09:d4

domain string (domain)

Two hyphenated English words under a reserved TLD (.test or .example, RFC 2606/6761) — non-resolvable by design.

example: fuzzy-socket.test

url string (URL)

HTTPS URL built from this record's own domain and slug: https://<domain>/<slug>.

example: https://fuzzy-socket.test/quarterly-revenue-report

slug string

Kebab-case slug of 2–4 English words (lowercase a–z/0–9 and single hyphens only).

example: quarterly-revenue-report

port integer

Port in 1024–65535 — the registered/ephemeral range, never a privileged port below 1024.

example: 8443

tld string

A common real top-level domain: com, net, org, io, dev, app or co. Independent of 'domain', which always uses .test/.example.

example: io

Documented examples

Build-generated requests and complete responses
3
Reproducible records for CI
GET /api/internet?seed=42&count=5
{
  "data": [
    {
      "ipv4": "107.173.153.81",
      "ipv6": "8778:09d5:128b:6831:c755:f168:b393:64cc",
      "mac": "a6:5d:cc:8b:51:e2",
      "domain": "puzzled-programme.example",
      "url": "https://puzzled-programme.example/ameliorate-wholly-easily-snappy",
      "slug": "ameliorate-wholly-easily-snappy",
      "port": 22116,
      "tld": "io"
    },
    {
      "ipv4": "9.1.114.134",
      "ipv6": "fd38:2c43:49cc:8665:a42c:bbce:e622:cd9f",
      "mac": "ca:b4:aa:63:f1:d1",
      "domain": "thorough-technologist.test",
      "url": "https://thorough-technologist.test/lady-ravioli-bob",
      "slug": "lady-ravioli-bob",
      "port": 57184,
      "tld": "co"
    },
    {
      "ipv4": "192.30.89.119",
      "ipv6": "9096:012a:975e:0855:25c9:cd37:023e:581b",
      "mac": "aa:c9:81:33:8d:f2",
      "domain": "trained-monster.example",
      "url": "https://trained-monster.example/uproot-lace-cautious-instantly",
      "slug": "uproot-lace-cautious-instantly",
      "port": 63871,
      "tld": "com"
    },
    {
      "ipv4": "36.149.9.45",
      "ipv6": "f4bc:d8c7:afef:516d:23f4:ed46:113c:eb27",
      "mac": "f6:26:fe:f2:b7:75",
      "domain": "sad-governance.test",
      "url": "https://sad-governance.test/ick-pick-however",
      "slug": "ick-pick-however",
      "port": 30465,
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Only IPs and ports
GET /api/internet?fields=ipv4,ipv6,port&count=20
{
  "data": [
    {
      "ipv4": "107.173.153.81",
      "ipv6": "8778:09d5:128b:6831:c755:f168:b393:64cc",
      "port": 22116
    },
    {
      "ipv4": "9.1.114.134",
      "ipv6": "fd38:2c43:49cc:8665:a42c:bbce:e622:cd9f",
      "port": 57184
    },
    {
      "ipv4": "192.30.89.119",
      "ipv6": "9096:012a:975e:0855:25c9:cd37:023e:581b",
      "port": 63871
    },
    {
      "ipv4": "36.149.9.45",
      "ipv6": "f4bc:d8c7:afef:516d:23f4:ed46:113c:eb27",
      "port": 30465
    },
    {
      "ipv4": "187.183.111.64",
      "ipv6": "0c3e:b319:ec9e:e5e3:da38:4846:d36f:88b1",
      "port": 10238
    },
    {
      "ipv4": "4.105.97.71",
      "ipv6": "0618:7d74:ef13:c296:7fde:4fc2:c409:cefa",
      "port": 19011
    },
    {
      "ipv4": "20.99.157.192",
      "ipv6": "8fa2:64cb:c2ae:36e4:fdf0:0cac:68e6:8303",
      "port": 16222
    },
    {
      "ipv4": "187.137.123.231",
      "ipv6": "e0a6:7d41:c566:aa21:c6a2:0186:d5bf:1471",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
50 MAC addresses as CSV
GET /api/internet?fields=mac&format=csv&count=50
mac
a6:5d:cc:8b:51:e2
ca:b4:aa:63:f1:d1
aa:c9:81:33:8d:f2
f6:26:fe:f2:b7:75
ba:10:d8:a9:5b:8d
ba:bb:16:f9:12:94
06:2d:ef:ca:db:eb
fa:fa:2e:ef:83:c2
42:2d:e1:ca:4f:2c
9e:dd:17:54:a3:b5
fe:ac:cc:69:c2:40
82:95:de:2d:ef:8f
d2:c8:b6:82:4f:9a
ae:e5:3f:8e:09:d0
fa:b4:4d:2f:32:8d
92:cf:81:89:dd:58
ce:c4:59:60:10:0a
c6:bc:3e:22:a0:f1
9e:22:3b:27:0e:99
1e:ae:e2:ce:3a:13
16:e1:73:47:e3:a9
76:c7:20:6b:b6:6d
c6:0a:00:72:50:dc
4a:e8:cc:df:31:95
2a:64:ea:49:e4:fa
8a:7f:e1:f2:8b:80
16:26:95:c5:49:7e
62:52:56:5a:e9:3e
d6:9e:dd:bd:cb:5b
6a:f9:ec:67:60:27
b2:b6:22:c3:58:dd
52:8b:97:f4:12:9c
76:bd:80:60:a8:04
16:24:f8:1d:f2:eb
ba:81:8c:a5:06:2a
fe:7b:c9:90:da:6f
62:52:c0:e6:8d:fd
4a:49:7d:4b:a6:56
1a:bd:ae:64:20:20
    …
3e:1d:53:98:8b:04
e6:54:3d:5d:ed:2d

About this API

Coverage & behavior

Generates the internet primitives every fixture and parser test needs, with safety guarantees built in:

  • ipv4 — a valid dotted quad whose first octet is always 1–223 and never 10 (private class A) or 127 (loopback); multicast (224–239) and reserved/broadcast (240–255) first octets never appear.
  • ipv6 — fully expanded: 8 colon-separated groups of exactly 4 lowercase hex digits, no :: compression — trivially parseable.
  • mac — lowercase aa:bb:cc:dd:ee:ff with the locally-administered bit set and the multicast bit clear (the first octet's second hex digit is always 2, 6, a or e). Like a VM's virtual NIC, such an address can never collide with a real vendor-assigned (OUI) hardware address.
  • domain and url — two hyphenated English words under the reserved TLDs .test / .example (RFC 2606/6761), so they are non-resolvable by design: a demo or test suite using them can never leak traffic to a real site. url is internally consistent — always https://<this record's domain>/<this record's slug>.
  • slug — a URL-safe kebab-case path segment of 2–4 English words.
  • port — an integer in 1024–65535, never a privileged port.
  • tld — sampled from common real TLDs (com, net, org, io, dev, app, co) for when you need one on its own; independent of domain, which sticks to the reserved TLDs.

There are no route-specific parameters: use the universal fields=/exclude= to take exactly what you need (e.g. ?fields=ipv4,port&count=50) and seed= for byte-identical output in every CI run.

Use it for

  • Seed device or network inventory tables with valid IPs, MAC addresses and ports
  • Feed IP/MAC/URL parsers and validators with hundreds of well-formed inputs
  • Fill demo UIs with realistic-looking domains and URLs that can never resolve to a real site

Frequently asked questions

What's in each record?

A coherent set: IPv4, IPv6, MAC, domain, URL, slug, port and TLD — one call fills a whole network-shaped fixture.

Can I get just one field?

Yes — fields=ipv4 (or any subset) projects the record, and pairs well with count for bulk lists.

Are the domains real?

No — and they can never resolve: generated domains use reserved TLDs (.test, .example) by design, so fixtures are safe to use anywhere. For safe email domains, see the emails endpoint.

Standards & references