About/広辞苑無料検索/API

About/広辞苑無料検索/API

当「広辞苑無料検索」サイト(HP)は、簡単な http API を提供いたします。

Our service are providing a simple HTTP API.

API basic info

Currently, this API is free and open. However, as the CORS headers are not deployed, the API can not be directly accessed from another website at this time.

API list

Dictionaries list API

URL: https://sakura-paris.org/dict/?api=1

Response:

[
  "広辞苑",
  "小学館中日・日中辞典",
  "大辞林",
  "三省堂類語辞典",
  "三省堂慣用句辞典"
]

Search API

URL Example: https://sakura-paris.org/dict/?api=1&q=携帯&dict=広辞苑&type=0&romaji=1

Response:

[
  {
    "heading": "けい‐たい【携帯】",
    "text": "けい‐たい【携帯】\n①たずさえ持つこと。身につけて持つこと。「―ラジオ」\n②携帯電話の略。\n⇒けいたい‐でんわ【携帯電話】\n"
  },
  {
    "heading": "けいたい‐でんわ【携帯電話】",
    "text": "けいたい‐でんわ【携帯電話】\n無線を用いた持ち運び可能な小型電話機。また、それを使用する移動通信サービス。\n⇒けい‐たい【携帯】\n"
 }
]

As of 2020-04-05 (Site version 1.1.24), there is another type of response with root response body an plain "object" instead of "array". Example response:

{
"words": [
  {
    "heading": "か(音節)",
    "text": "[keyword]か[/keyword]\n①後舌面を軟口蓋に接し破裂させて発する無声子音〔k〕と母音〔a〕との結合した音節。〔ka〕\n②平仮名「か」は「加」の草体。片仮名「カ」は「加」の偏。\n",
    "page": 3159,
    "offset": 566
  },
  {
    "heading": "か【日】",
    "text": "[keyword]か[/keyword]【[keyword]日[/keyword]】\n日数を表す語。け。古事記[decoration]中[/decoration]「日には十―を」。「三―三晩」\n",
    "page": 3159,
    "offset": 762
  },
....
],
"nextPageMarker": "25612_612_144_125_38_2_1_1"
}

In this case, the returned "nextPageMarker" (which is also known as a pagination token) can be used to fetch more search results (If not empty).

Your application should be able to handle both two type of responses ("array" or plain "object").

API Query Params

  • q: search keyword(UTF-8 urlencode)
  • dict: dictionary name(UTF-8 urlencode)
  • type: (optional) search type。 0 = 前方一致, 1 = 後方一致, 2 = 完全一致。default = 0 (前方一致)
  • romaji: (optional) "ローマ字変換" enable switch。0 = 無効 (disable), 1 = 有効 (enable)。default = 0
  • max: (optional) max results number limit。default = 40. (Valid range: 1-40)
  • marker: (optional) Pagination marker, see above.
  • page & offset: use these params (instead of "q" param) to fetch a specific word from dict.

Last update: 2020-04-09 01:46:34 UTC