Jisho

×
313dce98dff1a60604410ca3164e2778
180 Replies ・ Started by gcr at 2015-03-10 14:13:51 UTC ・ Last reply by Kimtaro Admin at 2024-02-11 05:00:44 UTC

Is there any kind of search API?

Hello!

I'm thinking of writing a plugin for emacs to quickly look up words. Is there any kind of HTTP JSON API for Jisho? Should I screenscrape the results page?

Also, are there any API rate limits? Nobody uses emacs so I hope this won't be a big server load.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-03-12 18:37:27 UTC

There wasn't :)

I want to have a properly documented and well functioning API that people can use to search Jisho with. Since a lot of people have been asking for this I started working on something simple to get started.

I wasn't going to mention it publicly until it was more finalized, but now I think it's just better to show it off and get feedback.

So, here's the word search API: http://beta.jisho.org/api/v1/search/words?keyword=house

It's very simple, there's no documentation and I'll probably change the format and add some kind of rate limit later down the line.

See it as an alpha inside a beta :)

313dce98dff1a60604410ca3164e2778
gcr at 2015-03-13 22:57:33 UTC

:O! THANK YOU!

You have NO idea how happy I am. This is perfect! I can't wait until after my paper deadline to sit down and play with this!

7af5350934690c015ab7afe3b6f86438
shred at 2015-03-14 20:00:11 UTC

Thank you! I am learning Japanese. This API will help me convert a vocabulary list of verbs from the -masu form to the -ru form. It would have taken me hours by hand.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-03-14 21:02:46 UTC

Cool, glad it'll be useful! Let me know if you run into any issues with it.

F68b8c055a10647cdbd73cb0313a9563
fasihsignal at 2015-03-15 05:13:04 UTC

+1! This is the kind of thing worth tweeting :D!

7af5350934690c015ab7afe3b6f86438
shred at 2015-03-15 09:56:41 UTC

Maybe just one idea... Could you add the Hepburn notation to the result? E.g. {"word":"食べる","reading":"たべる","hepburn":"taberu"}

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-03-15 14:05:26 UTC

@shred, good idea, I'll make a note to add romaji to the output.

07321d1e8fdb3efbd6297953a3bbe569
Nyanko at 2015-04-22 17:19:48 UTC

Any chance that we can use the API to include search tags?

07321d1e8fdb3efbd6297953a3bbe569
Nyanko at 2015-04-30 22:10:19 UTC

@Kimtaro?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-04-30 22:51:37 UTC

@Nyanko I'm not sure what you mean. Can you give an example of an API search that doesn't do what you expect it to?

07321d1e8fdb3efbd6297953a3bbe569
Nyanko at 2015-05-01 09:12:44 UTC

@Kimtaro: When I understand it correct, than you use the search API like this: http://beta.jisho.org/api/v1/search/words?keyword=house

But how do I use the API to, for example, search for all words that are tagged with #jlpt-n5? What do I need to write into the GET parameters?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-05-01 10:05:24 UTC

@Nyanko, this will work: http://jisho.org/api/v1/search/words?keyword=%23jlpt-n5

But the tag isn't exposed in the API output yet. At some point I hope to put some extended work into making the API great, but I have to concentrate on fixing initial issues with the website first.

65ecdf18e50934634898dd3eaa310a69
octref at 2015-05-04 21:04:53 UTC

@Kimtaro

Thank you for your hard work :-)
Actually I'm planning to make a Chrome extension for jisho.org to better integrate it into Chrome.
I'm not in a hurry, but is there any way that I can sign up to get notified when you release the API?

07321d1e8fdb3efbd6297953a3bbe569
Nyanko at 2015-05-05 21:13:56 UTC

@Kimtaro, is the API output limited or is it printing all JLPT N5 words? Because it doesn't seem like it with the json from your link above.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-05-09 14:07:34 UTC

@octref that sounds great :) There's no signup to get notified when the API is more expanded. But when that happens I will post about it in the forum and make appropriate documentation pages.

@Nyanko It's working correctly, it's just not including the JLPT tags in the output at this point. There's also no indication of pagination, but you can use page=2, page=3 etc to paginate the output. This will all be included once I do proper work on the API.

34eff5febee24d4c175be53778ac6400
StarScape at 2015-05-12 13:41:21 UTC

This is awesome! Thank you SO much. I've been searching for an API-able Japanese dictionary forever, but there's just not that much demand for Japanese learners who want to build Anki decks with scripts or write their own learning aids. I'd actually tried to scrape straight off the html before, but I suck at parsing and the page layout was complicated so I just gave up.

This, however, is awesome. Keep up the good work.

34eff5febee24d4c175be53778ac6400
StarScape at 2015-05-12 13:54:21 UTC

Any chance of adding inflections to the API? E.g. here it would be cool if it could tell you that it's the polite form of the verb(you'd probably already know that, but just an example). In other words, just the contents of the inflection box.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-05-18 17:46:16 UTC

@StarScape Yes, I could probably add that when I put some more work into the API. Might make that a separate call though. We'll see.

65ecdf18e50934634898dd3eaa310a69
octref at 2015-05-22 02:26:40 UTC

@Kimtaro
Can you create a repo for the API on github?
This way I and other people interested in the API could "watch" it to get notified when you make changes to it.

I don't know how you plan to write the doc yet, but I recommend writing it as a Markdown and put it on github.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-05-23 14:44:20 UTC

@octref, a GitHub repo for the API docs is a good idea. I've created one here for now: https://github.com/Jisho-org/API-docs

65ecdf18e50934634898dd3eaa310a69
octref at 2015-05-24 15:38:22 UTC

@Kimtaro Thanks!

81086a2e23d9d6ee05c31c9848c4b536
NessDan at 2015-05-30 16:52:10 UTC

So I'm working on a script that would take advantage of Jisho's API, but I can't make requests due to a lack of Access-Control-Allow-Origin headers :(

Is this something that could be added? Really excited to make this thing and share it!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-06-02 23:29:47 UTC

@NessDan, good point. I'll make a todo to allow cross domain requests in the API.

006585bb6ed48bbec160bc71436a3300
xtreme1 at 2015-08-30 21:30:44 UTC

Is there any way to access the kanji data with the api?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-09-02 22:57:33 UTC

@xtreme, not yet, sorry.

471bdaaf1e6109109c51730b7406b3b3
cjx3711 at 2015-09-27 17:02:53 UTC

@NessDan I was trying to use the api in a Web app of mine as well, but has the same cross domain error. But I managed to work around it by creating a proxy that could reside on my host but called this api.

81086a2e23d9d6ee05c31c9848c4b536
NessDan at 2015-10-06 19:44:13 UTC

@cjx3711 My solution as well! http://blog.javascripting.com/2015/01/17/dont-hassle-with-cors/

I modified that a bit and called a proxy function during the requests that did the translating for me.

I ended up converting my script to be fully node.js and that also seemed to fix my issues :)

2d77d29d989db1127f4211581d4ad448
NeedleOrchard12 at 2015-11-16 17:51:32 UTC

I tried pulling a few words from this and it seems like the example sentences aren't included in the data. Is there a way to specifically get those? I don't need ongoing access to this stuff, so I'd also be happy to download a DB dump of some sort for offline processing.

Example: http://jisho.org/api/v1/search/words?keyword=%E5%A4%A7%E7%B5%B1%E9%A0%98
http://jisho.org/search/%E5%A4%A7%E7%B5%B1%E9%A0%98%20%23sentences

Clearly it appears in many sentences, but none appear in the API JSON.

Also, the API docs repo seems to be empty. Has it moved?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-11-17 10:22:03 UTC

@NeedleOrchard12 Sorry, I haven't added sentences to the API yet. So far the API is just a very early test and I haven't added much to it.

The API docs repo is a just a placeholder until I finish the API and write some proper documentation :)

483918d11ac8f3083bddd94949d8caa4
felixmark at 2015-11-17 20:50:23 UTC

I've written an Android Mobile App using your API, and wanted to ask if it's free to use.

The App however is not published yet.

If your API is free to use, I'll link you in the App so you receive the credit for the great great API you offer,
and I'd like to know if there are any further conditions for using it.

I hope you can figure out what I wanted to ask in my kind of broken english (sorry for that) ^

Ed1226ad741d954044eed43355456f33
txtsd at 2015-11-25 14:06:18 UTC

I could use the API like yesterday. I need to make a list of all "#jlpt-n5 #kanji" and "#common" to revise for the upcoming JLPT.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2015-11-28 00:26:41 UTC

@felixmark just provide credit to Jisho.org for the API and make sure you adhere to the licenses of the data sources that Jisho uses, listed on http://jisho.org/about

@txtsd hope to have a more complete API next year.

38f9d2d55314d09a4bcd16c14c28a0c4
pietroventurini at 2016-01-20 19:40:46 UTC

I have some problems using this API..
I'm building an app which uses this API but I got this error: "Control-Allow-Origin' header is present on the requested resource"
For simple CORS requests, the server needs to add the following header to its response: " Access-Control-Allow-Origin: * "
I don't know any other way to get access to JSON data through that API

E07cec910dfd221908a1fb99def74d48
Lugo at 2016-01-21 14:43:52 UTC

Thank you very much for the API, will be very useful =)

7b6fade88ca09bc9f62156c33918e4a3
Rak at 2016-01-21 17:02:54 UTC

@pietroventurini
You are probably making a $.get ( or similiar ) request from within your browser ( maybe your index.html).
This does only work if the target ( in this case jisho.org ) has explicitly allowed a request from within the browser. As of now, it's not allowed to do that.
If you look upwards in this thread you can see a statement from Kimtaro that he planned to enable this feature, but this was some time ago so it may not be the same anymore.

The only solution for you is to make a request not from within your browser, but from your server.
If you are running your website from your file system ( the path in the browser for your application reads like 'file:://.....index.html' instead of 'localhost:...') you have to add a server side part where you can make requests.

B442028f569e5984e2d17c7106810040
JBRadio at 2016-03-16 15:41:30 UTC

Like the other posters here, I think it would be nice to have a browser extension/add-on for Jisho.org whether officially or 3rd party. It looks like this forum post has some good information on API and site requests regarding the sharing of Jisho.org information. I was just curious to know if there has been any update on this or maybe there is a developer blog for this that I can follow (outside of the GitHub API watch feature).

I am definitely interested in the API documentation and the "Access-Control-Allow-Origin"error issues as these seem to be the biggest roadblocks to making a browser extension/add-on without the need of a proxy server or server-side script.

Thank you for your hard work on this site so far and in the future.

Fb50b47c85e73d568c375db55a88e50a
Squib01 at 2016-03-18 01:25:56 UTC

The only impediment I'm facing in using the API at this time is not being able to favor if it searches in English or Japanese. Like if I search for "man" it will show results for the Japanese man but not for the English man.

B442028f569e5984e2d17c7106810040
JBRadio at 2016-03-18 02:43:02 UTC

Before the new version of Jisho.org, you could've created searches specific to English and Japanese in terms of GET variables:

http://jisho.org/words?jap=&eng=&dict=edict
- In this case, you would add a value to "Jap" for Japanese or "Eng" for English

Now, these types of searches change to http://jisho.org/search/. However, it seems like you can still specify if you are searching an english word by encasing it in quotes. There's a "hint message" after searching for man which indicate you can search for "man", so these search results are different:

http://jisho.org/search/man
http://jisho.org/search/"man"

I haven't tested many results but this seems to be the case.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2016-03-18 18:37:35 UTC

@JBRadio no updates beyond what's in this thread I'm afraid. I don't have a developer blog. Been thinking about creating one though. I have far less time to work on Jisho than I have things I want to add :)

It's correct that using quotes is the right way to prevent Jisho from changing searches based on what it thinks you want.

B442028f569e5984e2d17c7106810040
JBRadio at 2016-03-18 23:59:28 UTC

@Squib01

I didn't really seem to find it on the homepage (http://jisho.org/) or the advance search options page (http://jisho.org/docs) but, there seems to be some additional search features. For example, uppercase english letters seem to indicate that you are writing in KATAKANA and lowercase letters seems to search in hiragana. A lowercase search can yield katakana results and likely vice versa but you'll notice that not all results are the same between both lower/uppercase search results.

The search comments are really helpful:
"Searched for アップル."
"Searched for あっぷる."

1c207581326da3929896be861cfe9594
gawara at 2016-07-11 18:33:10 UTC

I'd love if it was possible to get API data from kanji entries as well. I tried keyword=瓦%20%23kanji, sadly this doesn't work I see. Will this be a feature in the future? I am very happy being able to search on just simply keywords though, but this would add a lot.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2016-07-19 09:08:27 UTC

Yes, kanji data will be included in the API in a future update.

C3995ab8fe1357217e5bffedc6adeb62
fta2012 at 2016-08-02 01:08:42 UTC

Hey what's the status on enabling CORS? e.g., adding "Access-Control-Allow-Origin:*"

C3995ab8fe1357217e5bffedc6adeb62
fta2012 at 2016-08-02 02:29:46 UTC

Hmm nvm, it seems like the thing I needed (text reading assistance for a sentence) is not currently exposed through the api anyway.

And thinking about it more, what I really want is just a stripped down version of the jisho results that I can embed (e.g., highlight a sentence and get definitions / text reading assistance in a popup).

For example I considered using WWWJDIC's glossing in an iframe:

http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?9ZIG%E6%98%A8%E6%97%A5%E3%81%99%E3%81%8D%E7%84%BC%E3%81%8D%E3%82%92%E9%A3%9F%E3%81%B9%E3%81%BE%E3%81%97%E3%81%9F

But it's so ugly compared to jisho's.

There's currently a bug with your 'X-Frame-Options' on chrome:

Invalid 'X-Frame-Options' header encountered when loading 'http://jisho.org/search/%E6%98%A8%E6%97%A5%E3%81%99%E3%81%8D%E7%84%BC%E3%81%8D%E3%82%92%E9%A3%9F%E3%81%B9%E3%81%BE%E3%81%97%E3%81%9F':
'ALLOW-FROM http://www.wanikani.com' is not a recognized directive. The header will be ignored. 

So I did play around with just embedding the existing jisho.org in an iframe. But it's way too cluttered with the search bar / side bar. If there's a version of the page that's just the main results that would be great (and account related or other sensitive stuff stripped if you're worried about clickjacking).

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2016-08-08 10:42:39 UTC

I haven't considered providing a paired down version of the page for embedding. First I'd like to "finish" the API, and then maybe provide other ways of accessing the data.

570c5a21432ca84b58c711909db5a858
Noam at 2016-08-31 20:53:33 UTC

Hi Kimtaro,
i noticed with the jlpt3 query above that the json file also produces words of jlpt4 and 5, should that be doing that or is there a way to only have jlpt3 words return?
also, i do not see any jlpt property name in the json file. how does it know it is what it is?

thanks a lot for all you've done so far!

67c718b81a86ce50274d3c38944fe531
MCManuelLP at 2016-09-02 14:26:03 UTC

Is there a specific reason why the JLPT level of a word isn't included in the tags section?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2016-09-02 17:47:00 UTC

@Noam Yeah there seems to be something odd with the search index for the jlpt tags. I'll look into it.

@MCManuelLP The current API was a very quick test and not all data is included, like the JLPT tags. I'll add them in a future update.

483918d11ac8f3083bddd94949d8caa4
felixmark at 2016-09-05 13:38:23 UTC

@Kimtaro

Hey there~
I haven't been writing for sooo long - gomennasai @__@
So.. I've finally made a signed APK of the "Japanese Dictionary" App I was working on (I know I was gettin' creative by choosin' that name) :D
I stopped working on it.. but I actually use the app from time to time so I thought.. propably somebody else does too (:
I've uploaded the Project too, so if somebody likes to edit/enhance the app, you're free to do so~

So.. the homepage is http://japanese-dictionary.weebly.com/

Thank you again that the app is able to use the API you provide!
The best API I've seen so far~

Arigato gozaimasu Senpai~

Fd9518fb8714844926872695397f37ff
Yaku at 2016-09-07 18:15:32 UTC

Hello! I've read that there it is possible to do a jlpt search and that it would return 20 paginated items. It would be nice that it also returned the total pages that the query has. Also, when a wrong request is made (i.e: &page=1241490409432) the response is not a JSON.

Also, is there a way to contribute in the building of the API? the repo (https://github.com/Jisho-org) is empty :(

Cd0ee6233c21ef8a3dbd762e601138d9
dekaikiwi at 2016-09-10 14:20:03 UTC

Hey! Any progress on Cross Domain Headers at all? Would be keen to integrate this with a NodeJS App I'm building at the moment :)

5292c4e87e08df55ab196534cfe12cdd
Reline at 2016-09-19 01:23:20 UTC

@Kimtaro So is web scraping okay for retrieving some of the data that isn't supplied in the API?

2b8fe9a0fddca32d2845bfa9cae2e8cf
Mistval at 2016-11-27 03:45:32 UTC

I'm using this API to good effect working on a Discord bot for language learning Discord groups.

But I have the same question, is it okay to scrape for extra data?

All my results link back to Jisho.

88e8edffe72efdfadf6b50bb17d50957
makevoid at 2016-11-28 21:08:15 UTC

@Kimtaro Thanks a lot!

88e8edffe72efdfadf6b50bb17d50957
makevoid at 2016-11-28 21:08:30 UTC

@Kimtaro Thanks a lot for the API!

C12882a9f4b3dfdf86766b100f59ec43
yorika at 2016-11-30 16:24:58 UTC

Hey, @Kimtaro!

Can't find right words of gratitude for API you've provided to the community!
It's really helpful and easy to use.

One of my students found out my passion for learning Japanese language, and decided to make a chrome extension, that translates unknown words for me.

You can take a look at it:
https://chrome.google.com/webstore/detail/jhint/hmoohbgeifohgafikhihhikaknfnlgmb?hl=en

This extension has its github repository:
https://github.com/shpp/jhint
so it will be really great if somebody leaves some issues with found bugs or just propositions of enhancement.

We didn't know the right way to mention jisho.org's ownership of data in ext, so decided to provide a couple of links. But let me know if we have to do something else!

ありがとうございます!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2016-12-02 20:54:38 UTC

@felixmark, @makevoid, @yorika - I'm very happy that the API is working well for you, and that you've managed to build cool stuff with it despite it being so basic :)

@Yaku - Yeah I should add better pagination information. I should also make sure that errors are JSON, not HTML :)

@dekaikiwi - No, I haven't yet, sorry. I hope to have some time over the next few weeks to take a look at adding cross domain support.

@Reline, @Mistval - Sure, scraping is fine, but I can't guarantee that the HTML won't change. I really should finish adding all data in Jisho to the API.

C905ffbe25ca9b81e94cd932250d250c
shotaro at 2016-12-05 15:25:21 UTC

This is exactly what I am looking for make an iOS app!!
Thank you for your contributions.

5292c4e87e08df55ab196534cfe12cdd
Reline at 2017-01-02 19:07:00 UTC

@Kimtaro I saw something of concern within the API for the "attribution"->"dbpedia" field. Is "dbpedia" supposed to be a boolean or string value? There were two different results for "house":
家...
"attribution": {
"jmdict": true,
"jmnedict": false,
"dbpedia": false
}
家屋...
"attribution": {
"jmdict": true,
"jmnedict": false,
"dbpedia": "http://dbpedia.org/resource/House"
}
Is this a bug? Just thought I'd point it out, not a big deal.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-01-06 18:24:54 UTC

@Reline oops! :)

It should be a string. When there is no attribution it should probably either not be present at all, or null. I'll add a todo to fix that.

5292c4e87e08df55ab196534cfe12cdd
Reline at 2017-01-07 22:57:50 UTC

@Kimtaro thanks! I guess while I'm at it I'll throw in something that would be nice to add to the API :)

Currently it's not possible to determine which furigana belong to which kanji through the api:

{
"word": "今日は",
"reading": "こんにちは"
}

That's why I asked about doing web scraping earlier, since the html gives that distinction:




こん
にち


今日は

Thanks again for the reply and all your work on this project!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-01-09 18:50:44 UTC

@Reline The furigana alignment is something I'd like to add to the API as well :)

9a5a9f85ae18694ea7649ff05323ab25
AviDrucker at 2017-02-08 20:17:01 UTC

@Kimtaro Any updates to the repo lately? I'm attemtping to query the JLPT N5 metadata with the link above (ala http://jisho.org/api/v1/search/words?keyword=%23jlpt-n5) but it only gives me a small selection (maybe 15 words or so). Can I get your advice on how to query all the JLPT N5 words at once?

9a5a9f85ae18694ea7649ff05323ab25
AviDrucker at 2017-02-09 17:36:26 UTC

@Kimtaro Specifically, how does one do the pagination with queries? I'm trying this atm: http://jisho.org/api/v1/search/words?keyword=%22%23jlpt-n5%22?page=2 .... but I simply get back this: {"meta":{"status":200},"data":[]}

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-02-12 22:48:08 UTC

@AviDrucker You have the correct syntax for pagination, but it looks like you have some extra characters in your query. The keyword is surrounded by "", and you have ?page=2 instead of &page=2. The working query is this: http://jisho.org/api/v1/search/words?keyword=%23jlpt-n5&page=2

5bddbe92b6bf13017625abf6423a7f75
lissm at 2017-02-20 00:23:13 UTC

Hi everyone! I made a Ruby wrapper for the Jisho API, available here:

https://github.com/dysnomian/ruby_jisho

Feedback and contributions are very welcome. I hope it's useful to someone!

1c207581326da3929896be861cfe9594
gawara at 2017-02-21 03:11:51 UTC

Great API. Thank you a lot.
I have question though about the results. When I am searching on "no" on the website I get the first result is "いいえ".
When I do the same through the API, I do not get いいえ. I cannot find the word on any page even.

See here:
API: http://jisho.org/api/v1/search/words?keyword=%22no%22
First result is 是非とも

On jisho.org website I search "no", and first result is いいえ.

Any reason this is?

5292c4e87e08df55ab196534cfe12cdd
Reline at 2017-03-04 23:26:18 UTC

@gawara try removing the quotes in your query, like so: http://jisho.org/api/v1/search/words?keyword=no
The response is still different from the website, but more accurate. You don't get "いいえ" back at all still, oddly enough.

C90fe1131e1f2a8d4d6a7e98a9ccb4a8
theLongestFerret at 2017-03-08 00:08:24 UTC

Currently, I am trying to implement functionality to return the JLPT level for a given word. Since this isn't returned in the JSON, the only way I can get this info (using this API solely) is to query using something like http://jisho.org/api/v1/search/words?keyword=%22家%22 %23jlpt-n5 and if the exact word is returned, I know that is the JLPT level.
Is there currently any more efficient way of doing this? I know I can just use the JLPT site that jisho uses instead, but was poking around with this.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-03-09 15:44:08 UTC

@lissm Fantastic! Jisho is made with Ruby so this makes me very happy to see :)

@gawara, @Reline There is a piece of code around quotation marks that isn't being run for API calls. Sorry about that. Once I add that for the API it should work like regular search.

@theLongestFerret Sorry, no, until I make sure it's included in the output that is the best way to check the JLPT level.

28e760a8d3e87e976df78142f9ad2542
mairyu at 2017-03-11 01:11:13 UTC

OMG, I was looking all over for an API, I was crushed when I found out tatoeba doesn't offer one, then I found yours (such a hidden gem !!!)

But I really really hope you add example sentences to it, that would be awesome.

I'm new to Android/Java (doing my own flashcard app) , so I'm not even sure how to work around this, maybe the Forum can give me a hint/nudge:

If there is no API at tatoeba, do most people simple parse the HTML ?

64f3282f35b32ac407c41e7611183b2e
jan at 2017-03-12 05:42:27 UTC

I wrote an Alfred workflow using the API. Thanks @Kimtaro! https://github.com/janclarin/jisho-alfred-workflow
Please let me know if you have any feedback.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-03-28 13:10:13 UTC

@mairyu, You can download the Tatoeba data for offline processing: https://tatoeba.org/eng/downloads

I hope to add sentences to the Jisho API in the future as well.

@ruby It looks like I capped the API pagination to 100 pages, so anything above 100 is interpreted as 100 :) I'm not sure why I did that. I'll add a todo item to make this much higher.

36ed8c0cb6ce5552bdcd4f4ca3509a95
ruby at 2017-03-31 15:06:15 UTC

@Kimtaro Thanks a lot!

F9afa99d23691a8c1f0a5df055005c53
vorontsov at 2017-05-27 16:20:19 UTC

@Kimtaro

First of all, thank you for the API!

There is a bug in the dictionary for the word "rain" — the result contains translation of the word "line":
http://jisho.org/api/v1/search/words?keyword=rain
http://jisho.org/search/rain

If you add quotes to this word, the result is ok on the website:
http://jisho.org/search/"rain"

But API shows something different:
http://jisho.org/api/v1/search/words?keyword=%22rain%22

Why the result differs?

Please, check this issue.
Thank you in advance!

2f9b5aa8d7f72e0e05d656a00ddcce43
Insight at 2017-05-29 09:12:33 UTC

Hello Kimtaro,

first of all, thank you for your efforts so far. The results are really good.

Like every other person commenting on this thread, I am in need of an API.
I could imagine that with the community a repo could be opened where every one can contribute. Especially I am in need of a C# library. More over, an offline solution would be ... significant :)

What is the current status and what are your plans? Can we support you in your efforts?

Kind regards

83653a964d1ebf1dff492aa188412614
jakobd2 at 2017-05-30 12:53:12 UTC

It should be completely fine to open up a repo yourself and start working on a C# library for the Jisho.org API. Some other guy above also wrote a Ruby wrapper.

2f9b5aa8d7f72e0e05d656a00ddcce43
Insight at 2017-06-03 14:09:35 UTC

@jakobd2
you are right. I have open a repo. When I have the time, I will write one.
If I have done so, I let the others know.

2f9b5aa8d7f72e0e05d656a00ddcce43
Insight at 2017-06-04 00:30:31 UTC

https://github.com/Insighter2k/JishoCSharpWrapper
Use it as you think it would benefit you :)

40c61174e66466058dacf94d3d18497c
Peekza at 2017-06-05 14:17:14 UTC

How do I use this? Do I need to put in a programme? I'm sorry for the stupid questions, I don't know what an API is or how I use it xd

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-06-08 00:35:39 UTC

@vorontsov This is because I forgot to add the logic for quote marks in the API :) It's on my todo list to fix this the next time I update the API.

@Insight Nice! :D

@Peekza An API is something programmers use to get data from Jisho. Regular users do not need to do anything with it.

9b8d28b60d48d10230e6c424156cbac8
loam at 2017-06-14 08:04:30 UTC

Hi @Kimtaro

First, thanks for the API, helps a lot :)

Do you have any news regarding the lift of the API pagination limit? I'd like to get all words tagged as JLPT#, but there is more than 100 pages for the N1 :(
Or does anybody know a way around it? I guess I could try to get all the results by aggregating the results of smaller requests, e.g. by splitting the request into 50 requests, each including one kana.

Thanks

83653a964d1ebf1dff492aa188412614
jakobd2 at 2017-06-14 12:55:06 UTC

Probably easier to download the date sources yourself and combine them how you need them at this point in time.

C05404243b9a0f096f41b58c80c17d25
cyberronin at 2017-06-14 13:48:54 UTC

@Kimtaro Hey man, I use the API for a growing Discord bot that's on around 800 servers. I'm not sure if you are aware of the API giving a bunch of objects with empty arrays when it probably shouldn't.

I'm not sure if it was a buggy information update, or you are working on updates. If you are working on updates to the API, may I suggest making a V2 to do it on so that V1 still works?

62f9ad38b1d86420b3a0f56054dde8d1
leonardykris at 2017-06-19 20:55:15 UTC

Hey @Kimtaro and thanks for all the work so far!

There are some weird things I spotted while testing the API so far in a simple node.js app where the result does not exactly return the query request (when the query is in kanji). You can find the screenshot of the log here http://imgur.com/a/ji39W.

This while the API, accessed through browser or agent like Postman returns the correct result (querying 未来 and 鉄 in browser, for example, worked as intended). Do you think I have an encoding problem?

And I'm seconding @cyberronin reply above, searching for some terms like 声 through the API automatically returns an empty array. But accessing the API through browser and Postman returns the correct result.

C05404243b9a0f096f41b58c80c17d25
cyberronin at 2017-06-20 11:30:21 UTC

@leonardykris,

I think it may be an encoding problem for ya bud. I tested it in my app and it works fine. I would suggest taking a look at the urlencode node module. I wrap the input in it when adding it to the query for the API.

http://imgur.com/a/2G0b7 Give that a look, I think it boils down to an encoding issue for you. I created that bot to work on Discord and it returns the very first definition that is provided from the response.

Fb50b47c85e73d568c375db55a88e50a
Squib02 at 2017-06-20 15:20:20 UTC

Has the search API changed recently? I am getting back no results on my app that is using it. If it has would it be possible to revert it back and use a new version for the changes?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-06-21 22:50:07 UTC

Maybe it's time to add pagination to forum threads :D

@loam I just upped the API page limit to 1000, so you should be able to grab all #jlpt-n1 words now.

@cyberronin Wow, looks like a nice bot! Sorry about the weird API response date. It definitely is a bug, but I haven't changed anything around the API in quite a while so I'm a little puzzled. I will dig into the code and data and see what I can find.

@Squib02 Sounds like you're having the same issue as @cyberronin. Hopefully I can figure out what the issue is soon.

@leonardykris I agree with @cyberroning, it sounds like you might have an encoding issue. Is it possible for you to see exactly what the data is that you send to Jisho?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-06-21 23:22:55 UTC

@cyberronin, @Squib02 I have fixed the issue with empty senses. There was a change to the underlying database JMdict, which the HTML output was guarding against but the API wasn't.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-06-21 23:51:17 UTC

I'm on a roll with API changed tonight! Just fixed another issue where the tags property could sometimes be [null] when there were new tags in the underlying database that we didn't have descriptions for. I have changed it so that we show the tag itself instead of null if there is no description.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-06-22 00:07:28 UTC

I managed to get one last API fix in before calling it a day. The API will now behave like the regular site for searches that use quotation marks ("") around the keyword. It turns on the "exact" mode where no romaji-kana conversion will happen.

C05404243b9a0f096f41b58c80c17d25
cyberronin at 2017-06-27 13:26:18 UTC

Nice! Glad to see some changes. Thank you for the API!

28e760a8d3e87e976df78142f9ad2542
mairyu at 2017-07-10 20:35:08 UTC

Since you're on a roll :-) ...

Any chance to add the example sentences to the JSON response ?

Are they 100% taken from Tatoeba ? (do you have another site for Eng-Jap example sentences ? (I found Jukuu, which is also great)

A0b650725248e7abc1a42e424b4d9011
othinus at 2017-07-13 05:53:07 UTC

Is there any way I can limit the search to one result? I don't need all the other results that come with searches.

A0b650725248e7abc1a42e424b4d9011
othinus at 2017-07-13 06:33:51 UTC

nvm am dumb

28e760a8d3e87e976df78142f9ad2542
mairyu at 2017-07-13 22:58:25 UTC

also, any way to get the Kanji results via JSON i.e.

http://jisho.org/search/%E8%AA%98%20%23kanji

right now I'm using the KanjiAlive API for that, but it doesn't support too many Kanjis, which is a bummer

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-08-10 23:52:51 UTC

@mairyu Unfortunately the roll stopped :) But adding sentences and kanji to the API is definitely on the radar.

A0b650725248e7abc1a42e424b4d9011
othinus at 2017-08-11 05:19:55 UTC

@kimtaro Please add sentences soon :D

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-08-21 17:14:31 UTC

@othinus I can't promise anything very soon. Traveling at the moment, and very full days at work during the coming weeks.

A446672f4b5797fbb91caad409c74eec
sabasis at 2017-08-31 16:24:48 UTC

Hey guys, I've just published a Jisho API wrapper for Elixir. Thanks to the Jisho team (aka Kimtaro) for your work on it.

https://github.com/nbw/jisho_elixir

828b1229272d886f5c1aa1bbad02e5d9
Zirk at 2017-09-01 22:57:28 UTC

@kimtaro Thanks for all your work, I think adding api for kanji (and not only words) would really be great :).

32382b8669787f564899e8ef6af5630a
nitobes at 2017-09-04 20:42:24 UTC

@kimtaro

Sorry if this has been asked before (can't find a recent answer) but is there a limit for number of requests made? If there's a limit is there any private API key we can retrieve for an increase?

This API is awesome thanks man.

32382b8669787f564899e8ef6af5630a
nitobes at 2017-09-04 20:44:10 UTC

@kimtaro Also is there page/wiki/Github I can follow to keep up to date with release notes in case there's any changes to the API? Or is this forum the place to go? Thanks!

194f402bef421d00f0bc99ce056cc0d0
jakeoid at 2017-09-15 13:48:37 UTC

Any news on when the API will get https? A certain web resource i'm writing, hosted on Github Pages wont load things over http due to forced https..

B442028f569e5984e2d17c7106810040
JBRadio1 at 2017-10-04 18:52:55 UTC

Hi @Kimtaro,

Thank you for the work you've done thus far on the API. Today, I've had the opportunity to use the API with Google Apps Script through the UrlFetch object. While parsing the data, I noticed that there is no JLPT number associated to API results. I'm practicing for the JLPT N3 test in Dec. so I think this information would be helpful.

In the regular site search, it looks like you need to use "#kanji #jlpt-n1" to get all the N1 Kanji but what if you wanted words for N1 or N3 or something? Searching for "#jlpt-n1" will give you N5 tagged words. Is there a way to get specifically N3 words?

http://jisho.org/api/v1/search/words?keyword=%23jlpt-n1
- For the API, is there a way to tell that these are in fact only N1 words and not N5 to N1 words?

http://jisho.org/api/v1/search/words?keyword=%23jlpt-n1&page=100
- Earlier, in this thread, it was noted that you can search for words and use a page GET variable to get additional results. My question is, how do you know, through the API results, how many words were matched or how many pages there are total for the search criteria used?

Thanks!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2017-10-07 00:39:04 UTC

@sabasis That’s really cool! I’ve been meaning to play with Elexir, maybe this is the thing that makes me do it :)

@Zirk kanji information in the api is on my todo list.

@nitobes There is currently no limit enforced by the api. I plan on adding api keys at some point, and then I might also do some form of rate limiting. For now the forum is the best place to check for updates, but I also want to create proper api documentation.

@jakeoid I have started work on adding https support and hope to have it done sometime this month.

@JBRadio You can use #words #jlpt-n3 to find N3 words. Some words have multiple JLPT levels in the source data so sometimes you see words listed with a different JLPT level than the one you searched for. That just means that the word has both levels.

Currently there is no pagination information returned by the api but this is something I want to add.

E9b4014a0251b15fa8113a6bc8d25694
cckelly at 2018-05-13 02:36:46 UTC

Hey all! I made a simple Jisho API wrapper in node with support for grabbing the audio too. You can find it here:

https://github.com/cckelly/jisho.js

https://www.npmjs.com/package/jisho.js

Let me know if you have any questions or suggestions!

820c27382c2be30cf388f319ad28e75b
NicoleRauch at 2018-12-15 18:03:04 UTC

@Kimtaro,

today I stumbled upon this great Jisho API! (As Jisho is my favourite dictionary anyways, this was really good news to me.)

I would like to write a userscript for my favourite Kanji learning website, so that it will indicate the JLPT level of vocab words. So... for this I need the JLPT information ;-)

Do you have any idea when you will be able to include this information in the API? Thanks in advance!

Fa16dbc100fe2368187dfdb598c95e12
jarmanso7 at 2018-12-17 19:24:30 UTC

@NicoleRauch

Though it does not make use of the WebApi, I just wrote a UserScript that retrieves the JLPT level for a given word from jisho.org and shows it in an alert. This is a link to the userscript source code:

https://raw.githubusercontent.com/jarmanso7/Get-JLPT-Level-From-Jisho-userscript/master/get_jlpt_level.js

And these are some warnings:

1) The script actually GETS the page of a word search from jisho in an httprequest
2) In order to avoid CORS issues it makes use of a proxy
3) It has not been tested on a large amount of requests
4) If you use kana instead of kanji to get the JLPT of a word, it will pick up the first resulting word which might not be the desired one. For example, if you search うち it will get the JLPT level for 内 rather than 家.

In order to use the script it, you'll need to replace the value http://*.mysite.com/ next to the @match tag by the domain of the Kanji learning website you use, as well as make some changes to the code to actually make it dynamic with each word appearing in your website rather than pulling the sample 'うち'.

417036d4bc7450ac267d930071998caa
LeeW at 2019-03-25 17:54:50 UTC

Just came here to bug Kimtaro about the sentence functionality for the API!

I made a neat pen for taking speech recognition and using the word search API: https://codepen.io/mynar7/pen/ZPPVOg

I thought it might be cool to expand it into a bigger app. Might be neat to watch subbed anime with a headset, parrot any words you can't understand and get definitions on the fly.

118a1bed385f5705403d5a04ca57adba
Sakkaku at 2019-04-28 14:52:39 UTC

Any updates on the API? I am trying to build an app for the dictionary but with the CORS problem, I cannot upload the app without an extra proxy server. But anyone can use it if the create their own server, code is open-source:

https://github.com/myin142/jisho-dictionary

It only has a search page. Are there any other api calls that can be made?

1c207581326da3929896be861cfe9594
gawara at 2019-05-18 10:43:16 UTC

I am facing the same issue with CORS.

D1dc2b9766f8753ecbb841d38cada3cf
johansta at 2019-05-25 21:24:44 UTC

Is there a way to limit the number of search results to 1 or top X?

7a295c89622f710697e48478b25e9ae8
pnewelljr at 2019-06-08 00:04:38 UTC

Is there a way to get more than 10 results per page? It takes a long time to get all the results this way

B523b918750a7395410a9ed06a438e42
iSamo at 2019-07-31 20:46:07 UTC

Hey guys I just posted a wrapper for the api in elixir for a personal project and decided to share it. https://github.com/IlyaSamoylov45/jishocaller

F446ad36b14cb1004cf276841520b973
brugz at 2019-10-31 07:39:39 UTC

Just wanted to stop by and say cool API.

27fd7fff4a02e7ea0eafbc164aa5f5ec
leobunga at 2019-11-24 22:19:21 UTC

I second brugz - cool API. But I also wanted to ask (again) if there are any plans to include kanji search in the api.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2020-01-02 01:42:12 UTC

Unfortunately I have no update on the API. I'm still planning on adding kanji, sentences and proper CORS support. I'm currently working on the next version of the site and hope to improve the API as part of that release.

Eb373c9b11397c21a95a67fb5aa64806
martingrzzler at 2020-02-03 20:27:20 UTC

Hi I'd really love to be able to use these new features of the api.
Are you releasing the new version anytime soon?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2020-02-06 06:44:30 UTC

No, I don't know when I'll be releasing the new version.

D6a3bb86de52ee0279c4301884ae6eae
tomholford at 2020-03-10 10:57:06 UTC

Hey everybody 👋 First of all, thanks to Kimtaro and the Jisho team for such a fantastic resource, Jisho has been so helpful over the years.

Anyways, was inspired by this thread to make a basic Ruby client gem:

https://github.com/tomholford/jisho-api

Hope this helps someone! And, looking forward to the new site and API that's coming soon :)

Bc8c7c34675ef9d845c837a4d2cc63b1
MaChee at 2020-05-18 18:40:27 UTC

wow. never knew there will be someone who will provide API for people who is studying japanese.
this is cool!

BTW, I am a mobile developer (mainly on android), do you think a collaboration is cool?

would love to hear from you guys.

BTW, is the API search is for free?

047010e155bd3ae939b5e75d7ea8a1a6
mimzivvimzi at 2020-05-19 23:25:17 UTC

Hi @Kimtaro. Thanks for making the API! I understand it's in progress, but I hope you don't mind if they're being tested out to learn programming concepts.

845d4d629e57acabfece377517fac810
FirelessLore at 2020-05-31 12:07:57 UTC

Thank you so much for the API @Kimtaro, I managed to make a vocabulary list maker from it :
https://github.com/idea456/tango-list

B3219ebd167d62b5bcd2ca6b79b9d9f6
sharpgamer at 2020-06-23 07:40:12 UTC

The API is great!

However, I feel like it could be improved or am I doing something wrong here?

For example, I search on Japan, but I can't get 日本 to appear.
https://jisho.org/api/v1/search/words?keyword=japan
Tried with both "Japan" and "japan" but no luck.

10deb0926508f047b07a910b1c4ce121
Buscadon at 2020-08-01 03:16:23 UTC

Stopped in to ask whether there's been development on support for the Kanji pages? Would be amazing to be able to use my own scripts to pull Kanji info quickly from the website.

5b29449cfbf9d6a784600d4216aa485a
zigzaggar at 2020-10-12 17:53:25 UTC

Noticing a bit of an inconsistent behavior when using the API.
As was stated earlier in this thread, there is no way to return all results. Instead, we should use &page=.

So I do this and have to loop through about 27 pages, but what I am finding is that there are some entries that are repeated.

For reference I am looking for all na-adjectives that end in い.

words #adj-na *い

There are 517 today.
I am taking each of those and adding them to a python dict. When I am done the length of that dict is less than 517, but never the same twice in a row.

This is because the dictionary wont add an item that already exists.
So I printed out the items that are duplicates and find that they change each run.
I first suspected that maybe it was because the same word appeared multiple times with different meaning, but this is not the case.

Basically, the API is returning inconsistent results.
Not sure if the actual website also has this behavior where a word that appears on, let's say, page 4 will also appear on page 6.

5b29449cfbf9d6a784600d4216aa485a
zigzaggar at 2020-10-12 18:42:12 UTC

To add a little more information, I captured some more data on when things fail. Remember that the number of items returned should be 517.

Run 1:
first word to duplicate: 簡明
page first found: 7
Item number: 134
Duplicated on page: 8
Duplicate item number: 143

Run 2:
first word to duplicate: 零細
page first found: 4
Item number: 79
Duplicated on page: 5
Duplicate item number: 81
Run 1 item: still duplicated and all stats from run 1 remain the same.

Run 3:
Same as Run 2 including Run 1 details.
Note: Run 2 produced a dict with length 430, while Run 3 a length of 446, so even though it looks like nothing changed from my data, there are other items that are getting changed.

Run 4:
first word to duplicate: 特大
page first found: 4
Item number: 79
Duplicated on page: 5
Duplicate item number: 84
Run 1 item: still duplicated, same details
Run 2 item: No longer duplicated
Dict length produced: 439

Run 5:
Same as Run 2 and 3
Run 1 item: No longer duplicated and appears as item 134 on page 7
RUN 4 item: no longer duplicated and appears as item 84 on page 5
Dict length produced: 429

As you can see, there is no real pattern for which item will be duplicated, though 零細 was the first item to be duplicated in 3/5 run.
The number of duplicates increases further down the list which at first makes sense because there are more items in the dict to collide with as you get further down. it appears as though the majority of duplicates happen exactly one page after the first item appears, but this is not true for all duplicates. some are many pages apart. I did not do a comprehensive search to verify this claim though.

Dfa7efcd12b4b73d8a57cfa0b9218b3e
ant8672 at 2020-10-14 09:42:31 UTC

Hi, Is there a way to just get all words? keyword=* does not work.
I want to use this to create a wordlist of romaji words.

9a694b873d811af8730c86b31e2e3b11
zorgabluff at 2020-10-15 00:18:17 UTC

Heyo!

Not sure if I just don't know this, but what does "slug" mean in the json results?

{"meta":{"status":200},"data":[{"slug":"飲む","is_common":true,

5b29449cfbf9d6a784600d4216aa485a
zigzaggar at 2020-10-15 00:39:31 UTC

Wikipedia:
"Some systems define a slug as the part of a URL that identifies a page in human-readable keywords."
https://en.wikipedia.org/wiki/Clean_URL#Slug

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2020-10-18 00:19:54 UTC

@zigzaggar Interesting issue! I have a theory as to what's going on. Jisho computes a search order value for each entry in the search results. It's quite possible that the long tail of results all have the same low search order value, and at that point the database most likely return them in random order. I don't think it's something I can fix in the current version of Jisho, but I'll look into it for the next version I'm currently working on.

@ant8672 No, this is specifically guarded against. If you need to pull all data I suggest that you go directly to the source databases that Jisho uses. You can read about them on the About page. You'll probably be most interested in JMdict, the main word dictionary file.

@zorgabluff The slug is what you can use to produce a URL that goes to that specific word. In your case it would be https://jisho.org/word/飲む

Eb0aa003ebeeaab209485e8f82fa9786
Cas722eey at 2020-10-28 03:12:21 UTC

Is the API able to translate romaji into English? Could someone reply with an example if it can, if not how long do you think until it will be implemented

5b29449cfbf9d6a784600d4216aa485a
zigzaggar at 2020-10-30 04:15:05 UTC

@Cas722eey,
You can use the API to search for anything in the dictionary including romaji.
It returns JSON of items that match the search term.
Each if the matched terms will have data associated with it.
Within that data will be the definition of the term.

Example:
hoteru = hotel

One of the results of the above search will be:
https://jisho.org/word/%E3%83%9B%E3%83%86%E3%83%AB

which is the entry for ホテル (hoteru, or, hotel)

So I would say that Jisho is not a translation tool so much as it is a dictionary. It just so happens that definitions of words often contain translations if they are loan words.

If you look up: neko (cat) one of the results will be:
猫 -> ねこ -> neko -> cat
and the first definition of this word is, you guessed it, cat.

If this did not answer your question, then I am not sure what your question is.

You can always just play around with the API to see what it returns:
https://jisho.org/api/v1/search/words?keyword=neko

4a8ec1326c1ca3d8cc9175b3c01b90a9
kishima at 2020-11-05 18:52:45 UTC

Hello, I made a Clojure API Wrapper for the API. It is very basic, but if anyone is interested https://clojars.org/clojisho

456eed9d09f9303d0767ad70ef76ffbb
LiarCake at 2020-12-01 04:50:30 UTC

I am having trouble using the search terms (i.e. https://jisho.org/api/v1/search/words?keyword=%E7%8C%AB%23kanji returns an empty data array). Am I doing something wrong?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2020-12-09 20:20:40 UTC

@kishima Nice!

@LiarCake The API only does word search, so there will be no results if you search for kanji.

A88b42979305f2c9606932a5095a8ddd
okuRaku at 2021-01-15 23:38:34 UTC

@Kimtaro Thank you very much for giving us your extra time to build this API. It's clear there's lots of us coders around just looking for resources like this everywhere and end up here.

I'm here to ask about something discussed before, specifically the JLPT tags and how they're currently "cumulative" - if a word is both N4 and N3, it will show up in a search for N3. I noticed on some other resources (like Wiktionary/Kanshudo) they don't this and just leave it to the reader to be looking for "only" N3 if they click on N3. This approach seems more logical to me.

For example, if someone goes to the main jisho.org homepage and searches just "#jlpt-n1" actually the entire first page of results is words found in other levels. Yes, they're also N1 of course but it's kind of losing the meaning of searching for N1, no? I suppose NOT returning 月 to the query "Give me an N1 word" may seem illogical to others, but for me that would be an N5, "not" an N1.

Anyway, one idea I was working on needed to distinguish these as well, and I tried to use other sources of JLPT lists but am not finding anything nearly as easy to use as the API here (props!). So would it be possible to enable a way to search for JLPT tags such that only results with 1 tag are returned? Maybe a new tag like #jlpt-n1-only? If it's just as easy to implement, being able to exclude any tag from a search result would also be a solution (and may be appreciated, for example if someone wants to search #jlpt-n1 "not" #common for example. I don't have a suggestion on "not" syntax but I presume that may get ruled out as too difficult to implement with the backlog.

Regardless of appetite to address the above I still want to end by saying thank you again for your work on this. It is truly appreciated. By the way, other previously mentioned items affected me too, and those I would definitely vote as higher priority: total pages in result and CORS.

Cheers

A88b42979305f2c9606932a5095a8ddd
okuRaku at 2021-01-15 23:42:36 UTC

Side note: I actually double checked myself and looked up https://jisho.org/word/%E6%9C%88 - it shows N3 on the left but N5 on the right. Now I realize this story is a bit more complex because JLPT level for the kanji doesn't necessarily match the JLPT level of the word. I guess that's obvious if you think about it.... hmm.

1ffb8fc8fb9620f082d1fe7cefe48e41
Helios467 at 2021-01-28 16:20:08 UTC

I picked up Japanese around 4 months ago, and Jisho.org is easily the best dictionary there is. Just discovered the api yesterday, and I'm really looking forward to working with it. Thanks for the great work!

3c07d4d60505c8383260a398307a23d8
lectre at 2021-02-02 13:16:47 UTC

I wonder could I get the Japanese example like the Jisho search web page from the api

3c07d4d60505c8383260a398307a23d8
lectre at 2021-02-02 13:16:47 UTC

I wonder could I get the Japanese example like the Jisho search web page from the api

D6bbb3a1aa8b5216b1ed8ad2dc70c268
gfreecs at 2021-02-12 16:27:24 UTC

Ohayo gozaimasu Kimtaro san!

It seems like the CORS issue is not yet resolve, the alternative is to create a proxy server like what @mistval
did(?), i would like to avoid using proxy server.

https://github.com/mistval/unofficial-jisho-api/issues/6

thank you in advance

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2021-02-22 07:42:45 UTC

@okuRaku Thank you for the kind words! Yes, the JLPT tags are a constant source of confusion, and something I plan on addressing with the next version of the site. Same with the CORS issue. As for a not-syntax, it's not (pun not (pun intended) intended) something I currently plan on adding.

@Helios467 Thanks!

@lectre I hope to add sentences to the API at some point.

@gfreecs When I take the API out of beta at some point I will address the CORS issue.

D5f8543b1da3df3b7a65ab47580ba02f
levdev at 2021-02-22 18:53:15 UTC

@Kimtaro Thank you for this awesome API!

For anyone running into CORS issue please feel free to use this route I built out:
https://kanji-cors-bypass.herokuapp.com/api/${kanji or english}. It's deployed on Heroku - so your first request might take a while if the application is asleep.

A0aea905807d3e46c16cb6fdc7146f70
dijkram at 2021-03-06 07:27:20 UTC

Hello @Kimtaro, thank you for this amazing API! It's awesome to see you still replying to people 6 years after this thread was started! Is there any chance that the API could also respond with the path to audio source files for the words that come up after a search? I noticed that it's already under the audio tag on the HTML response from the site and that there's a links section to the API response.

A0aea905807d3e46c16cb6fdc7146f70
dijkram at 2021-03-06 07:29:42 UTC

Ah I just noticed someone posted a wrapper to the API that grabs audio as well! Thank you @cckelly!

Here's a bump on the wrapper in case others come looking for this too :)
https://github.com/cckelly/jisho.js

61b4e2921c46a0ee5353a332d1cc9d79
gfreecs0510 at 2021-04-12 10:10:11 UTC

@Kimtaro thank you for your reply

@levdev thank you
@dijkram wow thanks, let me try this, i am currently using @mistval api.

D94b7cb4e33603e1590590734478abc5
merwan at 2021-06-06 15:21:23 UTC

Hi @Kimtaro, thank for this API!

I'm building a Chrome extension to quickly lookup words: https://github.com/merwaaan/instant-jisho

Sometimes the Jisho API returns a bunch of hex characters as the slugs. What does this mean?

For instance:

https://jisho.org/api/v1/search/words?keyword=%E3%82%B2%E3%83%BC%E3%83%A0%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0

https://jisho.org/api/v1/search/words?keyword=%E3%82%A2%E3%83%AA%E3%82%B9

(It seems to happen mostly with katakana words)

Thanks

67b0679999ea21f099375450a9aa5999
THICKSANDWICH at 2021-06-21 03:02:07 UTC

@merwan

These values you are seeing are just URL encoded versions of the word you are searching for.

You can check this website: https://www.urlencoder.org/

If you type in "アリス" as in your example, this gets encoded to "%E3%82%A2%E3%83%AA%E3%82%B9". This value is how your browser reads the katakana word "アリス" (although chrome does some fancy stuff to display the katakana word itself in the address bar)

67b0679999ea21f099375450a9aa5999
THICKSANDWICH at 2021-06-21 03:16:12 UTC

@Kimtaro

Hi, as others have said, thank you for creating this API. I had a question regarding copyright of the API (I'm not too informed on this kind of stuff).

I'm currently creating an Android app which incorporates the API. Users will be able to search using the jisho API and add the data to a personal dictionary (from which, they can then perform flashcard reviews). My question is, in this circumstance, would I be allowed to monetize my app/display banner ads (or charge for removal of ads in my app).

From what I understand, this site uses the data as explained at the bottom of each web page (JMdict, etc.). Provided I reference those, I am allowed to monetize my application, is that correct? (I will also reference use of the JishoAPI of course!).

This is my first real app, so want to be sure and get permission before going ahead with it. Thanks in advance!

11c325f479ffc9d8b975c4eb71d7dac1
thevoidzero at 2021-08-02 09:33:30 UTC

Thank you for the API, I was having a hard time changing applications to open jisho tab every time I needed to do a quick search while I was working on something else.

I made use of this API to make a desktop app kinda minimal UI which only shows me the meanings and is enough for me for the moment. It has increased the speed of my workflow a lot.

Here is the github repo:
https://github.com/Atreyagaurav/jisho-chibi

I'd prefer to get the kanji search (strokes and such) as the API too, but I understand that you only develop in your free time and are planning to do it one day, so it's ok.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2021-09-11 22:59:27 UTC

@dijkram The audio files belong to WaniKani, so I am not including them in the API response.
@merwan Those slugs happen when Jisho doesn't assign the word as the slug. I don't remember the logic here off the top of my head, but it's something I intend to fix.
@THICKSANDWICH I can't advise on the legality of how you use the data in your app. You will need to check that you adhere to the license of each project that you use data from. As for using the Jisho API, please be aware that I make no guarantees of functionality or that the API will keep working.
@thevoidzero Looks nice.

B92a0804b440c624040b0e00c92ee356
FrSenpai at 2021-09-16 16:48:11 UTC

@Kimtaro

Hey !
Nice work, its work like a charm.
Could you up to 2000 the limit page please ? Many tags contains more than 20k items :(

Have a great day !

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2021-09-26 06:20:44 UTC

@FrSenpai I will not up the page limit on the current API. The sort order is not stable towards the tail end of results, so you might get the same word repeated across pages.

If you need to scrape data from Jisho I suggest that you instead look at the data sources directly. They're all listed on https://jisho.org/about

However I would like to improve the API in the future to support more pages and stable sorting.

1cb3a832c4e64a51c3ade08b15debd2c
pedroallenrevez at 2021-10-04 17:23:25 UTC

Hey @Kimtaro, I have developed a Python API wrapper that allows getting data from jisho.org.
You can search Words, Kanji and Sentences.
For Kanji and Sentences, I am directly scraping the HTML page, is that okay?

https://github.com/pedroallenrevez/jisho-api

Thank you for your efforts!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2021-10-05 03:54:14 UTC

@pedroallenrevez Wow, that looks fantastic! Yes, it's ok to scrape the HTML for now, but I can't guarantee that updates I make in the future won't break things. Hopefully by then I'll implement kanji and sentence search in the actual API.

90674c66153df9536d54034b29b21927
Languagemaniac at 2022-11-08 22:36:25 UTC

@kimtaro Hi, thanks for the api, it works great.

A friend of mine made a python script so that it can read a list of kanji from a txt file, and extract the kanji, reading, meaning and jlpt level from your api onto another txt file.

However, it looks like from time to time, the website is kicking me out. (I get json decode errors, but if I rerun the thing it works fine. )

I'm trying to load a big list of words so I guess it's too much for it to handle. My friend told me he could introduce delays so that we don't saturate the site, how much of a delay do you think we should put so the website doesn't kick me out?

90674c66153df9536d54034b29b21927
Languagemaniac at 2022-11-09 10:09:54 UTC

@kimtaro sorry nevermind, we fixed the code

9836a125eab24a423c8f1d6df6a2e0d4
KanDraw at 2023-05-15 20:02:25 UTC

@Kimtaro Is there any chance you could post an unfinished version of the documentation? Even a list of the possible query string parameters would be appreciated. Are the only two currently available the following:

keyword: the word or phrase to be searched
page: the page of words to display, each page displays up to 20 words. Default is 1, valid values are 1-1000.

If there are more, please let us know. In particular for me, if a search contains multiple words the website separates the search by those words and you can switch between them. Is there a query string parameter in the API for that?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-05-22 01:57:05 UTC

@KanDraw Sorry, the sentence parsing isn't available in the API. There is one more query parameter, "exact". If you set exact=1 it will skip romaji to kana conversion for the search query.

2b8fe9a0fddca32d2845bfa9cae2e8cf
Mistval at 2023-07-03 20:29:31 UTC

Hi @kimtaro thanks again for the API!

I started having an issue with it today I was hoping to consult you about. The API began returning 403 responses with bodies like:

403 Forbidden
Request forbidden by administrative rules.

I use the "axios" node.js package for making HTTP requests, and via some experimentation I found that requests via axios (and also node-fetch) are now detected and blocked. Was that change intentional?

Thanks!

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-07-06 05:46:34 UTC

@Mistval Yes, sorry about that. Someone was scraping the site using axios and node-fetch to the point that it overloaded the servers. If you set your user-agent to something else it should work.

2b8fe9a0fddca32d2845bfa9cae2e8cf
Mistval at 2023-07-06 11:58:30 UTC

Got it, thanks!

2b8fe9a0fddca32d2845bfa9cae2e8cf
Mistval at 2023-07-06 12:08:20 UTC

By the way, let me know if you want any help implementing rate limiting. Without knowing any of the specifics my inclination would be to drop NGINX in front of it and limit requests to "/search" to 3 per second per IP.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-07-07 04:54:18 UTC

Thanks, I use HAproxy for load balancing and have a rate limiter implemented there. But it looks like I didn't tune it well when I set it up, so it's not very effective. I'm going to adjust it to hopefully catch these scrapers, but it's tricky because Jisho gets used a lot from schools, where requests from different machines might originate from the same IP, so I can't set the limit too low.

76d0b4eca4bf07f9132bd39a53480f50
Denny at 2023-08-29 16:52:29 UTC

Hi Kimtaro!
Can I use your API in my android app?
I plan to publish it in Play market and I don't know how many users/requests will be.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-09-04 23:18:38 UTC

@Denny The API is not very good, and will at some point be replaced by something better. I would not recommend relying on it for critical functionality in a published app. It's mostly intended for hobby usage.

B146e2caab2cc326c2002273e9c6daef
IkkiHide at 2023-10-20 15:55:21 UTC

Hi I used:
https://jisho.org/api/v1/search/words?keyword=jlpt-n5
I noticed that I got the same results as if I'd used the #jlpt-n5 tag in the search. But I only got 20 results is it possible to get all 657 results?

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2023-10-21 10:59:21 UTC

@IkkiHide You can add page=2, page=3 etc to get more results. Like this: https://jisho.org/api/v1/search/words?keyword=jlpt-n5&page=2

0cf1fe988e888d21c8e233a804ac1315
mittei at 2023-12-03 04:02:18 UTC

Hello, it seems like the search API sometimes returns wrong results. Usually it returns the same set of words in the same order as the Web UI, but when I search かよう, the results include duplicates (可溶 and 佳容 twice) and have 斯様 and 家用 missing.

Is it a bug, or am I missing something?

[API]

page 1 https://jisho.org/api/v1/search/words?keyword=%E3%81%8B%E3%82%88%E3%81%86&page=1
"通う", "火曜", "歌謡", "荷葉", "下葉", "加養", "可溶", "花葉", "佳容", "可用"

page 2 https://jisho.org/api/v1/search/words?keyword=%E3%81%8B%E3%82%88%E3%81%86&page=2
"可溶", "佳容", "下葉-1", "火曜日", "歌謡曲", "可用性", "可溶性", "可鎔性", "潰瘍性病変", "可用時間"

Web https://jisho.org/search/%E3%81%8B%E3%82%88%E3%81%86
通う,火曜,歌謡,荷葉,家用,花葉,加養,斯様,可用,下葉,可溶,佳容,下葉,火曜日,歌謡曲,可用性,可溶性,可鎔性,潰瘍性病変,可用時間

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2024-01-15 00:59:16 UTC

@mittei After a certain number of entries shown, the order becomes undefined as the words don't have enough information to differentiate them when sorting. Although I should probably just order them in Unicode order at that point.

D9208617aa40e636b9529c86ee19723e
webbben at 2024-01-16 04:57:40 UTC

Hey there, I know you've been bothered about this a lot over the years, but - any plans to add sentences to this API in the near future? Also, if this API is open source on github I'd be willing to help out and try my hand at adding sentences too!

2df413feec24f2d6dcbac4b05b86222c
bay4bay at 2024-01-17 08:59:23 UTC

@webbben: If you just need the data used by Jisho.org for a project, in almost all cases it's probably better to use the data itself instead of the Jisho.org API. There is (almost) no exclusive data that you can only find on Jisho.org, it's all taken from public sources that are more or less freely available under different licenses.

For example sentences you can find at https://tatoeba.org/en/downloads and the data there can be used under "CC BY 2.0 FR" license, which should be fine for almost all kinds of projects.

There is currently one notable exception: The data from Jreibun project www.tufs.ac.jp/ts/personal/SUZUKI_Tomomi/jreibun/index-jreibun.html is not publically available yet. That is on purpose, as it's still a work in progress. If you want to use Jreibun project data in your own project, then you will have to wait for an official release. It will be licensed under some kind of CC license. (I hope either CC0 or CC-BY) But right now, this data is not allowed to be used freely, so even if you write a screen scraping tool to get the preliminary data available from Jisho.org for these sentences, you're not allowed to redistribute them anywhere. Therefore I also wouldn't expect these sentences to be available through any kind of API in the current state.

In general afaik Kim is working on the next bigger overhaul of Jisho.org currently, so I wouldn't expect much changes to the current website/API before that is finished.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2024-01-26 07:36:28 UTC

Thanks @bay4bay, that's indeed the current state.

9d4a0a76532cefbc6c6048e3e89e3701
graywolf at 2024-02-10 16:13:29 UTC

Hm, if I pass the sentence "私はバカです。" to jisho (the website)[0], it will break it into the words. However API does no such thing[1], it seems to just produce the results for the first word. Any idea how to duplicate this functionality? My current thinking is to query both the website (to parse the #zen_bar element) and the API (to get the data), but would prefer to not do it if possible.

Is there any information on how jisho does fill the #zen_bar so that I could do it on my own?

0: https://jisho.org/search/%E7%A7%81%E3%81%AF%E3%83%90%E3%82%AB%E3%81%A7%E3%81%99%E3%80%82
1: https://jisho.org/api/v1/search/words?keyword=%E7%A7%81%E3%81%AF%E3%83%90%E3%82%AB%E3%81%A7%E3%81%99%E3%80%82

2df413feec24f2d6dcbac4b05b86222c
bay4bay at 2024-02-10 16:22:49 UTC

@graywolf There is only a word search API offered. You are allowed to scrape the website. Things might break.

2986330e38386f92fee4774b0c54ed66
Kimtaro Admin at 2024-02-11 05:00:44 UTC

As @bay4bay said. But I will add that while scraping is allowed for personal use, please do not use scraping as part of an app, or to bulk download data from Jisho.

to reply.