See the examples below for requesting CSV, JSON, or JSONL data. Or check the OpenAPI docs for full usage.
JSON
endpoint
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.json?num_rows=5'
[{"id":5992,"name":"zhoffman"},{"id":3554,"name":"christy47"},{"id":6948,"name":"qbooker"},{"id":7548,"name":"lauren31"},{"id":2120,"name":"tcarroll"}]
CSV
format
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.csv?num_rows=5'
id,name
9091,clarkjillian
6940,ulane
7611,kathryn61
9867,richardthomas
5808,jordan39
JSONL
(JSON lines, good for piping!) format
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.jsonl?num_rows=5'
{"id": 9371, "user_name": "cle"}
{"id": 3262, "user_name": "ryan16"}
{"id": 1485, "user_name": "kingelizabeth"}
{"id": 2837, "user_name": "sergio35"}
{"id": 438, "user_name": "karenmcintyre"}
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.jsonl?num_rows=5&col_headers=user_id,login_name'
{"user_id": 1662, "login_name": "duranmark"}
{"user_id": 3714, "login_name": "astone"}
{"user_id": 8004, "login_name": "austinanthony"}
{"user_id": 9519, "login_name": "gstevens"}
{"user_id": 7004, "login_name": "justin73"}
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.jsonl?num_rows=5&col_types=emoji,color_name,catch_phrase'
{"emoji": "😀", "color_name": "MistyRose", "catch_phrase": "Operative maximized middleware"}
{"emoji": "🗻", "color_name": "Cornsilk", "catch_phrase": "Switchable uniform budgetary management"}
{"emoji": "😜", "color_name": "Chocolate", "catch_phrase": "Down-sized actuating time-frame"}
{"emoji": "🤟", "color_name": "GoldenRod", "catch_phrase": "Adaptive logistical artificial intelligence"}
{"emoji": "🤳", "color_name": "Aqua", "catch_phrase": "Implemented impactful alliance"}
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/faker.jsonl?col_types=pyint(1;1000),unique.pyint(1;10)&col_headers=id,unique_id'
{"id": 665, "unique_id": 5}
{"id": 293, "unique_id": 3}
{"id": 841, "unique_id": 9}
{"id": 81, "unique_id": 10}
{"id": 491, "unique_id": 2}
{"id": 924, "unique_id": 8}
{"id": 269, "unique_id": 7}
{"id": 900, "unique_id": 1}
{"id": 431, "unique_id": 4}
{"id": 737, "unique_id": 6}
Templates are a way to have a pre-defined schema and output format.
Today, only S3 Access logs (s3_access_log
) and CloudFront
logs (cloudfront_log
) are supported. Feel free to create
a new issue in the
faker-cli repository
if you have ideas for other templates.
╭─ your-console ~$
╰─❯ curl 'https://fake-data.fly.dev/api/template/cloudfront_log?num_rows=2'
#Version: 1.0
#Fields: date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query cs(Cookie) x-edge-result-type x-edge-request-id x-host-header cs-protocol cs-bytes time-taken x-forwarded-for ssl-protocol ssl-cipher x-edge-response-result-type cs-protocol-version fle-status fle-encrypted-fields c-port time-to-first-byte x-edge-detailed-result-type sc-content-type sc-content-len sc-range-start sc-range-end
2020-10-12 22:08:13 HAN58-C8 7619700 114d:aeca:e5e4:b90:1d21:da72:c60e:9a90 204 dmtc2cjxu7kref.cloudfront.net /find/carry.jpg 304 reilly-palmer.com Opera/9.88.(X11; Linux x86_64; so-DJ) Presto/2.9.178 Version/12.00 - - CapacityExceeded 9uy4tbiqnr6f5n70z9amax014500t5pfonl7hjihmvhdyk89npkthmun hamilton.com https 415597062 762.418 - SSLv3 ECDHE-RSA-AES256-SHA256 Redirect HTTP/1.1 - 3 29462 781.191 LimitExceeded application/json - - 504855237
2023-12-02 12:40:07 MUC50-P7 700949372 4.45.12.41 417 dw71ljmxmxogio.cloudfront.net /if/nice.tiff 301 - Mozilla/5.0 (Windows CE; ku-TR; rv:1.9.2.20) Gecko/8892-02-29 07:27:09 Firefox/3.8 - measure=village Miss a9d5lj6ao11b6whxmtimc8lozbop2nxg9p0hf0q6tfcc65femrj20695 ortiz.com https 574887085 729.44 161.136.3.90 TLSv1.2 RSA-RSA-ARIA256-SHA128 RefreshHit HTTP/1.1 - 8 62247 535.728 Error application/xml 832453042 - 408532437