QRCode
テキストやURLからQRコードを生成します。
MCPツール名: generate_qrcode_url
GET /v1/qrcode
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| data | string | ✓ | QRコードに埋め込むテキストまたはURL |
| size | integer | - | 画像サイズpx(75〜1000、デフォルト300) |
| format | string | - | 出力形式(png / svg、デフォルトpng) |
| return | string | - | full: Base64付きJSON / metadata_only: メタデータのみ。未指定時はバイナリ画像(従来互換) |
リクエスト例:
curl "https://api.thousand-api.com/v1/qrcode?data=https://example.com&size=300" \
-H "x-api-key: YOUR_API_KEY"レスポンス:
デフォルト(return 未指定)は PNG 画像または SVG データをバイナリで返します。return=metadata_only でサイズ確認のみ、return=full で Base64 付き JSON を取得できます。MCP では image コンテンツとして画像を返し、return: "metadata_only" でコンテキスト節約が可能です。
メタデータのみ(return=metadata_only)
リクエスト例:
curl "https://api.thousand-api.com/v1/qrcode?data=https://example.com&format=png&return=metadata_only" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"format": "png",
"width": 250,
"height": 250,
"size_bytes": 18432,
"note": "Base64 data omitted. Use return=full to retrieve image data."
}画像変換
HTTPS URL から画像を取得し、WebP / JPEG / PNG / AVIF への変換・リサイズ・圧縮を行います。結果は Base64 文字列で返します。プライベート IP へのリクエストは SSRF 対策のため拒否されます。
MCPツール名: convert.transform_image
POST /v1/image/transform
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| url | string | ✓ | 変換元画像の HTTPS URL |
| format | string | - | 出力形式: webp / jpeg / png / avif(デフォルト: webp) |
| width | integer | - | リサイズ後の幅 px(1〜4000) |
| height | integer | - | リサイズ後の高さ px(1〜4000) |
| quality | integer | - | 圧縮品質 1〜100(webp/jpeg/avif、デフォルト: 80。png は無視) |
| fit | string | - | リサイズ方式: cover / contain / fill / inside / outside(デフォルト: inside) |
| return | string | - | full: Base64 付き(デフォルト)/ metadata_only: メタデータのみ(コンテキスト節約) |
レスポンスフィールド
| パラメータ | 型 | 説明 |
|---|---|---|
| format | string | 変換後のフォーマット |
| width | number | 変換後の幅(px) |
| height | number | 変換後の高さ(px) |
| original_size | number | 変換前のバイト数 |
| converted_size | number | 変換後のバイト数 |
| reduction_rate | number | 削減率(0.6 = 60%削減) |
| data | string | Base64 エンコードされた画像データ |
| mime_type | string | MIME タイプ(例: image/webp) |
WebP 変換のみ
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/image/transform" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/photo.png"
}'レスポンス例:
{
"format": "webp",
"width": 1200,
"height": 800,
"original_size": 245760,
"converted_size": 98304,
"reduction_rate": 0.6,
"data": "UklGRi4AAABXRUJQVlA4...",
"mime_type": "image/webp"
}リサイズ + JPEG + quality
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/image/transform" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/photo.png",
"format": "jpeg",
"width": 800,
"height": 600,
"quality": 85,
"fit": "cover"
}'レスポンス例:
{
"format": "jpeg",
"width": 800,
"height": 600,
"original_size": 245760,
"converted_size": 112640,
"reduction_rate": 0.5417,
"data": "/9j/4AAQSkZJRg...",
"mime_type": "image/jpeg"
}fit パラメータ
| パラメータ | 説明 |
|---|---|
| cover | 指定サイズを覆うようにクロップ(アスペクト比維持) |
| contain | 指定サイズ内に全体が収まるよう縮小 |
| fill | 指定サイズに引き伸ばし(アスペクト比無視) |
| inside | 縦横比を維持しつつ、指定サイズ以内に収める(拡大しない) |
| outside | 縦横比を維持しつつ、指定サイズを覆う最小サイズ(拡大しない) |
HTML や CSS で使う場合は data:image/webp;base64,{data} の形式で埋め込めます。MCP では画像を image コンテンツとして返します。サイズ確認のみの場合は return: "metadata_only" を指定してください。
メタデータのみ(return=metadata_only)
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/image/transform" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/photo.png",
"return": "metadata_only"
}'レスポンス例:
{
"format": "webp",
"width": 1200,
"height": 800,
"original_size": 245760,
"converted_size": 98304,
"reduction_rate": 0.6,
"mime_type": "image/webp",
"note": "Base64 data omitted. Use return=full to retrieve image data."
}Markdown→HTML変換
MarkdownテキストをHTMLに変換します。GitHub Flavored Markdown(GFM)対応・XSSサニタイズ対応。
MCPツール名: convert.markdown
POST /v1/convert/markdown
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| markdown | string | ✓ | 変換するMarkdownテキスト(最大100KB) |
| sanitize | boolean | - | HTMLをサニタイズ(デフォルトtrue) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/markdown" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Hello\n\nThis is **bold** text.",
"sanitize": true
}'レスポンス例:
{
"html": "<h1>Hello</h1>\n<p>This is <strong>bold</strong> text.</p>"
}レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| html | 変換後のHTML文字列 |
レスポンス:
GFM(テーブル・タスクリスト・取り消し線・コードブロック)に対応。sanitize: false はサーバー側で信頼済みのMarkdownのみに使用してください。ユーザー入力には sanitize: true(デフォルト)を推奨します。
単位変換
長さ・重さ・温度・面積・体積・速度・データ量の単位変換を行います。外部APIへの依存なし・mathjsによる正確な計算。
MCPツール名: convert.unit
対応カテゴリ: 長さ(m, km, mile, foot, inch 等)、重さ(kg, g, lb, oz 等)、温度(celsius, fahrenheit, kelvin)、面積(m2, ha, acre, sqft 等)、体積(l, ml, gallon, cup 等)、速度(m/s, km/h, mph, knot 等)、データ量(byte, KB, MB, GB, TB, KiB, MiB 等)
GET /v1/unit/convert
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| value | number | ✓ | 変換する数値 |
| from | string | ✓ | 変換元単位 |
| to | string | ✓ | 変換先単位 |
リクエスト例:
curl "https://api.thousand-api.com/v1/unit/convert?value=1&from=km&to=mile" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"value": 1,
"from": "km",
"to": "mile",
"result": 0.621371,
"formula": "1 km = 0.621371 mile"
}データサイズ単位変換
データサイズを SI 単位系(1000 進: KB/MB/GB)と 2 進数単位系(1024 進: KiB/MiB/GiB)の両方に一括変換します。バイト数と human_readable(例: "1 GiB = 1.07 GB")も返します。
MCPツール名: convert.data_size
GET /v1/unit/data-size
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| value | number | 必須 | 変換する数値(0 以上) |
| from | string | 必須 | 変換元単位(B / KB / MB / GB / TB / PB / KiB / MiB / GiB / TiB / PiB) |
レスポンスフィールド:
| パラメータ | 説明 |
|---|---|
| input | 入力値と単位 |
| bytes | バイト数 |
| si | SI 単位系(1000 進)への換算値 |
| binary | 2 進数単位系(1024 進)への換算値 |
| human_readable | 読みやすい等価表現(例: "1 GiB = 1.07 GB") |
binary → SI(from=GiB):
リクエスト例:
curl "https://api.thousand-api.com/v1/unit/data-size?value=1&from=GiB" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"input": { "value": 1, "unit": "GiB" },
"bytes": 1073741824,
"si": {
"KB": 1073741.824,
"MB": 1073.741824,
"GB": 1.073741824,
"TB": 0.001073741824,
"PB": 0.000001073741824
},
"binary": {
"KiB": 1048576,
"MiB": 1024,
"GiB": 1,
"TiB": 0.0009765625,
"PiB": 0.00000095367431640625
},
"human_readable": "1 GiB = 1.07 GB"
}SI → binary(from=GB):
リクエスト例:
curl "https://api.thousand-api.com/v1/unit/data-size?value=1&from=GB" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"input": { "value": 1, "unit": "GB" },
"bytes": 1000000000,
"si": {
"KB": 1000000,
"MB": 1000,
"GB": 1,
"TB": 0.001,
"PB": 0.000001
},
"binary": {
"KiB": 976562.5,
"MiB": 953.67431640625,
"GiB": 0.9313225746154785,
"TiB": 0.0009094947017729282,
"PiB": 0.0000008881784197001252
},
"human_readable": "1 GB = 953.67 MiB"
}Base64エンコード/デコード
文字列のBase64エンコード/デコードを行います。URL-safe形式・UTF-8/hex/base64入力エンコーディングに対応。Node.js標準Bufferのみ使用・外部依存なし。
MCPツール名: convert.base64
url_safe: true の場合、encode時は + → -、/ → _ に変換し末尾の = パディングを除去します。decode時は - → +、_ → / に変換してからパディングを補完してデコードします。JWTペイロードなどURL-safe Base64の解析に使えます。
POST /v1/encode/base64
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| data | string | ✓ | エンコード/デコード対象の文字列(最大512KB) |
| direction | string | ✓ | encode / decode |
| url_safe | boolean | - | URL-safe Base64を使用するか(デフォルト: false) |
| input_encoding | string | - | encode時のdataの文字エンコーディング: utf8 / hex / base64(デフォルト: utf8) |
レスポンスフィールド:
| パラメータ | 型 | 説明 |
|---|---|---|
| direction | string | 処理方向(encode / decode) |
| input | string | リクエストの data をそのまま返す |
| output | string | エンコード/デコード結果 |
| url_safe | boolean | 使用した url_safe の値 |
| byte_length | number | input のバイト数(Buffer.byteLength) |
エンコード例:
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/encode/base64" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "こんにちは",
"direction": "encode"
}'レスポンス例:
{
"direction": "encode",
"input": "こんにちは",
"output": "44GT44KT44Gr44Gh",
"url_safe": false,
"byte_length": 15
}デコード例:
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/encode/base64" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "44GT44KT44Gr44Gh",
"direction": "decode"
}'レスポンス例:
{
"direction": "decode",
"input": "44GT44KT44Gr44Gh",
"output": "こんにちは",
"url_safe": false,
"byte_length": 16
}URLエンコード/デコード
URLパーセントエンコード/デコードを行います。日本語などのマルチバイトUTF-8を正確に扱い、不正な%シーケンスは INVALID_ENCODING で返します。
MCPツール名: convert.url_encoding
component(デフォルト)は encodeURIComponent/decodeURIComponent を使い、?, =, &, / などもすべてエンコードします。uri は encodeURI/decodeURI を使い、URL構造上意味を持つ記号(http://, ?, =, &, /, # など)は残します。
POST /v1/convert/url-encoding
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| text | string | ✓ | エンコード/デコード対象の文字列(最大100,000文字・空文字可) |
| direction | string | ✓ | encode / decode |
| component | string | - | uri / component(デフォルト: component) |
レスポンスフィールド:
| パラメータ | 型 | 説明 |
|---|---|---|
| direction | string | 処理方向(encode / decode) |
| input | string | リクエストの text をそのまま返す |
| result | string | エンコード/デコード結果 |
component モード(日本語・予約記号もエンコード):
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/url-encoding" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "こんにちは?a=1",
"direction": "encode",
"component": "component"
}'レスポンス例:
{
"direction": "encode",
"input": "こんにちは?a=1",
"result": "%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%3Fa%3D1"
}uri モード(同じ入力で予約記号は残る):
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/url-encoding" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "こんにちは?a=1",
"direction": "encode",
"component": "uri"
}'レスポンス例:
{
"direction": "encode",
"input": "こんにちは?a=1",
"result": "%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF?a=1"
}不正な%シーケンスのデコード:
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/url-encoding" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "%ZZ",
"direction": "decode"
}'レスポンス例:
{
"error": "INVALID_ENCODING",
"message": "Invalid percent-encoding: URI malformed"
}CSV↔JSON変換
CSVとJSONを相互変換します。ヘッダー有無・区切り文字のカスタマイズに対応。
MCPツール名: convert.csv
タブ区切り(TSV)にも対応します。delimiter に "\t" を指定してください。
POST /v1/convert/csv
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換するデータ(最大1MB) |
| from | string | ✓ | csv / json |
| to | string | ✓ | csv / json |
| has_header | boolean | - | CSVのヘッダー行の有無(デフォルト: true) |
| delimiter | string | - | CSVの区切り文字(デフォルト: ,) |
| bom | boolean | - | CSV出力時にUTF-8 BOMを付与(デフォルト: false) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/csv" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "name,age\nAlice,30\nBob,25",
"from": "csv",
"to": "json"
}'レスポンス例:
{
"from": "csv",
"to": "json",
"result": [
{ "name": "Alice", "age": "30" },
{ "name": "Bob", "age": "25" }
],
"rows": 2,
"columns": 2,
"encoding": "utf-8"
}POST /v1/convert/csv (bom: true)
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/csv" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "[{\"name\":\"Alice\",\"age\":\"30\"}]",
"from": "json",
"to": "csv",
"bom": true
}'レスポンス例:
{
"from": "json",
"to": "csv",
"result": "\uFEFFname,age\nAlice,30\n",
"rows": 1,
"columns": 2,
"encoding": "utf-8-bom"
}YAML↔JSON変換
YAMLとJSONを相互変換します。JSON出力時はインデント幅を指定できます。
MCPツール名: convert.yaml
POST /v1/convert/yaml
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換するデータ(最大1MB) |
| from | string | ✓ | yaml / json |
| to | string | ✓ | yaml / json |
| indent | integer | - | JSON出力時のインデント数(0〜10・デフォルト: 2) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/yaml" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "name: Alice\nage: 30",
"from": "yaml",
"to": "json",
"indent": 2
}'レスポンス例:
{
"from": "yaml",
"to": "json",
"result": "{\n \"name\": \"Alice\",\n \"age\": 30\n}",
"indent": 2
}TOML↔JSON変換
TOMLとJSONを相互変換します。pyproject.toml・Cargo.toml などの設定ファイルの読み書きに使えます。テーブル配列([[...]])やネストテーブル([section])に対応します。
MCPツール名: convert.toml
POST /v1/convert/toml — direction: to_json
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換する TOML 文字列(最大1MB) |
| direction | string | ✓ | to_json |
| indent | integer | - | JSON 出力時のインデント幅(0〜8・デフォルト: 2) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/toml" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "[package]\nname = \"my-crate\"\nversion = \"0.1.0\"\n\n[dependencies]\nserde = \"1.0\"",
"direction": "to_json",
"indent": 2
}'レスポンス例:
{
"direction": "to_json",
"output": {
"package": { "name": "my-crate", "version": "0.1.0" },
"dependencies": { "serde": "1.0" }
},
"output_str": "{\n \"package\": { \"name\": \"my-crate\", \"version\": \"0.1.0\" },\n \"dependencies\": { \"serde\": \"1.0\" }\n}",
"byte_length": 98
}POST /v1/convert/toml — direction: to_toml
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換する JSON 文字列(最大1MB) |
| direction | string | ✓ | to_toml |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/toml" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "{\"title\":\"Thousand API\",\"version\":\"1.0.0\"}",
"direction": "to_toml"
}'レスポンス例:
{
"direction": "to_toml",
"output": "title = \"Thousand API\"\nversion = \"1.0.0\"",
"output_str": "title = \"Thousand API\"\nversion = \"1.0.0\"",
"byte_length": 42
}レスポンスフィールド
| パラメータ | 型 | 説明 |
|---|---|---|
| direction | string | 使用した変換方向(to_json / to_toml) |
| output | any | to_json 時はパース済み JSON オブジェクト、to_toml 時は TOML 文字列 |
| output_str | string | to_json 時は JSON.stringify 済み文字列、to_toml 時は TOML 文字列(output と同値) |
| byte_length | number | output_str の UTF-8 バイト数 |
XML↔JSON変換
XMLとJSONを相互変換します。レガシーAPIレスポンス、AWS/GCP設定、SOAP、RSSなどのXMLデータの読み書きに使えます。属性はプレフィックス付きキー(デフォルト @)で表現します。
MCPツール名: convert.xml
XMLの属性は JSON では attribute_prefix(デフォルト @)付きのキーになります。例: <user id="1"> → { "user": { "@id": 1 } }。to_xml では JSON 側でも同じプレフィックス(例: "@id")を使うと属性として出力されます。
POST /v1/convert/xml — direction: to_json
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換する XML 文字列(最大1MB) |
| direction | string | ✓ | to_json |
| indent | integer | - | JSON 出力時のインデント幅(0〜8・デフォルト: 2) |
| attribute_prefix | string | - | 属性キーのプレフィックス(デフォルト: @) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/xml" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "<user id=\"1\"><name>Alice</name></user>",
"direction": "to_json",
"indent": 2
}'レスポンス例:
{
"direction": "to_json",
"output": {
"user": { "@id": 1, "name": "Alice" }
},
"output_str": "{\n \"user\": {\n \"@id\": 1,\n \"name\": \"Alice\"\n }\n}",
"byte_length": 52
}POST /v1/convert/xml — direction: to_xml
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| input | string | ✓ | 変換する JSON 文字列(最大1MB) |
| direction | string | ✓ | to_xml |
| indent | integer | - | XML 出力時のインデント幅(0〜8・デフォルト: 2) |
| attribute_prefix | string | - | 属性キーのプレフィックス(デフォルト: @) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/convert/xml" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "{\"user\":{\"@id\":1,\"name\":\"Alice\"}}",
"direction": "to_xml",
"indent": 2
}'レスポンス例:
{
"direction": "to_xml",
"output": "<user id=\"1\">\n <name>Alice</name>\n</user>",
"output_str": "<user id=\"1\">\n <name>Alice</name>\n</user>",
"byte_length": 42
}レスポンスフィールド
| パラメータ | 型 | 説明 |
|---|---|---|
| direction | string | 使用した変換方向(to_json / to_xml) |
| output | any | to_json 時はパース済み JSON オブジェクト、to_xml 時は XML 文字列 |
| output_str | string | to_json 時は JSON.stringify 済み文字列、to_xml 時は XML 文字列(output と同値) |
| byte_length | number | output_str の UTF-8 バイト数 |
形式変換(統合)
JSON をハブに CSV / YAML / TOML / XML / Base64 との相互変換を1エンドポイントで行います。直接形式間変換(csv→yaml など)は不可で、必ず JSON を経由します。個別ツール(convert.csv 等)と同じロジックを format + direction で呼び分けます。
MCPツール名: convert.format(convert.csv / convert.yaml / convert.toml / convert.xml / JSON↔Base64 の統合代替)
POST /v1/format/convert
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| data | string | object | ✓ | 変換対象(to_json 時は形式文字列、from_json 時は JSON オブジェクトまたは JSON 文字列) |
| format | string | ✓ | csv / yaml / toml / xml / base64 |
| direction | string | ✓ | to_json または from_json |
| options | object | - | 形式別オプション(has_header, delimiter, bom, indent, attribute_prefix, url_safe 等) |
リクエスト例:
curl -X POST "https://api.thousand-api.com/v1/format/convert" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "name,age\nAlice,30",
"format": "csv",
"direction": "to_json"
}'レスポンス例:
{
"format": "csv",
"direction": "to_json",
"result": [{ "name": "Alice", "age": "30" }]
}数値・通貨フォーマット
数値をロケールに合わせてフォーマットします。通貨・パーセント・単位付き表示に対応。Node.js標準のIntl.NumberFormatを使用。
MCPツール名: convert.format_number
GET /v1/format/number
パラメータ:
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| value | number | ✓ | フォーマットする数値 |
| locale | string | - | ロケール(デフォルト: en-US) |
| style | string | - | decimal / currency / percent / unit |
| currency | string | - | 通貨コード(style=currency時必須) |
| unit | string | - | 単位(style=unit時必須) |
| minimum_fraction_digits | integer | - | 小数点以下の最小桁数(0〜20) |
| maximum_fraction_digits | integer | - | 小数点以下の最大桁数(0〜20) |
リクエスト例:
curl "https://api.thousand-api.com/v1/format/number?value=1234567.89&locale=ja-JP&style=currency¤cy=JPY" \
-H "x-api-key: YOUR_API_KEY"レスポンス例:
{
"value": 1234567.89,
"locale": "ja-JP",
"style": "currency",
"currency": "JPY",
"formatted": "¥1,234,568"
}