ダミーテキスト
英語(Lorem ipsum)または日本語のダミーテキストを生成する。
| エンドポイント | https://apis-cloud.net/tools/lorem/random |
| 認証 | 不要(CORS 全オリジン許可) |
| 再現性 | ?seed= を付けると同じ結果になる |
クエリパラメータ
langstring任意 |
ja か en(既定 ja) |
unitstring任意 |
word / sentence / paragraph(既定 sentence) |
countstring任意 |
生成する数(1〜100、既定 3) |
seedstring任意 |
同じ値を渡すと毎回同じ結果になる |
prettyboolean任意 |
1 で整形して返す |
例
GET/tools/lorem/random |
||
GET/tools/lorem/random?lang=en&unit=paragraph&count=2 |
||
GET/tools/lorem/random?unit=word&count=10 |
||
よくある質問
- ダミーテキストはどう呼び出しますか?
- GET https://apis-cloud.net/tools/lorem/random を呼ぶだけです。認証は不要で、結果はJSONで返ります。
- 同じ結果をもう一度得られますか?
- ?seed= に同じ文字列を渡せば、毎回同じ値が返ります。テストの期待値を固定したいときに使えます。
他のジェネレータ
リクエスト
curl -s "https://apis-cloud.net/tools/lorem/random?lang=en&unit=paragraph&count=2"const res = await fetch("https://apis-cloud.net/tools/lorem/random?lang=en&unit=paragraph&count=2");
const data = await res.json();import urllib.request, json
with urllib.request.urlopen("https://apis-cloud.net/tools/lorem/random?lang=en&unit=paragraph&count=2") as r:
data = json.load(r)