Forum - View topicEncyclopedia API
Goto page 1, 2, 3, 4, 5 Next |
View previous topic :: View next topic | |||
Author | Message | ||
---|---|---|---|
Dan42
Chief Encyclopedist
Posts: 3518 Location: Montreal |
|
||
The idea of a public API to access the Encyclopedia data is something I get asked about once in a while, and really I've always thought it would be nice to have. I kept thinking I would build an API into Encyc 2.0 but I've already postponed that for so long...
However I just received two emails in quick succession about this topic, so I figured I'd raise the issue publicly and ask those interested: what would you like to see in an Encyclopedia API? How would you like to use it? Please do go into technical details if you care to. |
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
Mainly, I'd like the API to be usable enough to build a facebook app; showing which anime one finished watching / is watching, what are its favourites, send a recommendations to friends, etc.
This means it should have a search based on title(s), and ability to get details. I think majority of the details shown on encyclopaedia pages would be nice to have in the API (including the ranks in the charts). Of course there can be more use cases, but I am concerned mainly on this one (not talking about integration with myanime yet / I think it would scare users away if username on ANN would be required; not to mention there should be an API for that as well if it should work). And there's one more use case, which is apparent ("eat your own dog food" principle): the encyclopaedia itself. It may help in API design if the encyclopaedia itself would be considered an as an app based on top of the API. |
|||
Back to top |
|
||
gerjomarty
Posts: 3 Location: Cambridge, UK |
|
||
I'd be very interested in utilising an API to the encyclopedia, mostly for use in mobile applications that can use the data along with other, similar sources/APIs. The more data the better.
|
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
As for implementation, I would draw some inspiration from the fb graph api: make each entity (manga, anime, person) an object with its own url (maybe graph.animenewsnetwork.com/id, maybe else), having connectors on each page (graph.animenewsnetwork.com/id/crew for animes, http://.../id/picture for any entity, http://.../id/works for persons, http://.../id/related (sequel, retelling, etc.) and the like). All pages would return json structure containing the information.
Other niceties could be to allow numerical id as well as common latinized slash-separated name as alternate ids for the same object; and the graph uri for "meta-objects" as well: genres, themes, charts, types (anime, manga, person, genre, ...) to be able to get info but enumerate as well through (for example) /list connector. Batching and filtering is good to think up in advance, it can save bandwidth. For example, id can be list of comma-separated ids (saves doing lot of separate requires). As for filtering, there are two things: first, filter only relevant elements (like, from .../crew I only want to see the director(s)), and the second stage, filtering only required fields. Another complication, which may be included in filtering section, is the multillinguality - there's a lot of titles in various languages, but even if we omit that, there is "official" title which is sometimes shown as english, sometime as japanese in romaji, though there is japanese in kanji and kana as well; this holds for persons, too. For filtering, I'd use parameters of the request. Since structure of the output will be always well defined, one could use the parts of the structure itself with some operators to do the filtering, like: http://..../anime,manga/list?[].data[].includes(genre)=slice+of+life&[].data[].includes(themes)=rural finds all animes and mangas with genre "slice of life" and theme "rural". http://.../anime/list?[].data[].matches(director.name.lat)=Miyazaki is obvious (lat is the proposal for "common latinized form, whatever the original is", which can save lot of troubles) http://.../id/?[].fields(allow)=id,title.lat,picture,readableid,rank.bayes only gets listed fields http://.../anime/list?[].data[].matches(title.lat,nocase)=suzumiya&[].data[].fields(allow)=id,picture,title&[].data[].title.fields(prefer,2)=jp-ro,en,lat,jp gets id, picture and at most two titles of all suzumiya animes, while preference of titles is as listed above The syntax of the parameters is always the same: path.to.element.operator(details)=argument I assumed the result is json array of objects, each giving info on one piece, that's why it always began with [] (meaning "any element in the array") and then continued with usual dot notation (so the [] was nothing special, part of the "path.to.element"). Rules as to where to OR and where to AND is to be thought of, but it seems the "OR the one with the same name, AND the aforementioned OR groups" could work. Other operators could see its way there like sort(comma-separated fields), range(from,to) for fields, limit(to,[from]) for occurences, and maybe also flatten(part-of-initial-path) to select only array of some subfields (ignoring the harness it was put into) as the result (like http://.../anime/?flatten=[].data[]&matches(director.name.lat)=Miyazaki) puts away the [{type:"anime", data: [ ... ]}] and only includes [ ... ] as a result; if it was anime,manga it would join both datas). |
|||
Back to top |
|
||
Dessa
Posts: 3986 |
|
||
For those of us who are dumb, what is an API, what does it do, and what is it used for?
|
|||
Back to top |
|
||
Shiroi Hane
Encyclopedia Editor
Posts: 7138 Location: Wales |
|
||
http://en.wikipedia.org/
It allows you to programmatically access the encyclopedia data. Currently, if another site wanted to display data from the encyclopedia they would have to either copy it manually or scrape the pages. API access would be less resource hungry and would also allow you to do your own processing on the raw data if you want to produce some sort of interpretation that the encyclopedia currently doesn't. |
|||
Back to top |
|
||
JackPerry
Posts: 1 |
|
||
Hey Dan,
I was one of the ones that emailed you. Thank you for a quick response. Now, my main idea for using the API stemmed from my idea to build a social anime recommendation application based on your friends or even strangers who share the same anime preferences as you do. I looked around and it seemed the only viable solution to grab anime data would be to use MyAnimeList. Unfortunately, their API isn't so great and reportedly, slow. Besides that, some of MAL's data (descriptions, etc) claim ANN as the source. From that I realized, why not GO to the source? As far as technical reasons go, I wouldn't require a lot. As long as it is accessible, and fast (this is the big one) I'm sure I could work with it. I do work in PHP, Ruby, Python, and sometimes Objective-C for iOS development so as long as it is clean and well structured there should be no problems. |
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
Dan? Any progress?
|
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
BTW, FB Graph API has batching ability which uses thing called JsonPath, so it may probably be reused in ANN API, not to reinvent the wheel and to reuse existing thing...
|
|||
Back to top |
|
||
akhild
Posts: 1 |
|
||
Hey, I joined recently, and wanted to use this type of app to keep records for my local application, and making relations to fb posts too. So has there been any update on this?
If not, I would like to help in the same. Second reason for this API would be able to get archived information like imdb API, which can include genre, comments and other anime specific details, without loading the url and manually extracting the data based on the page's html output |
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
Text search - an API which by supplying string returns all works as well as people whose names / titles match (maybe with some degree of fuzziness to clear misspells). Useful for lots of ajax applications.
|
|||
Back to top |
|
||
Dan42
Chief Encyclopedist
Posts: 3518 Location: Montreal |
|
||
Hi everyone,
Sorry to keep you waiting. I did read the responses to my opening post but then got distracted by other ANN work. But I finally bit the bullet and started coding. First I modified the Encyclopedia reports to provide an option for XML output. Go to any of the reports and you'll see a display as xml link. Some of those reports can be customized through url parameters, turning them into a rough kind of API. For example the Anime/Manga List API allows to restrict results by adding a "name" parameter to the url, like this. At first I was going to make such a report to output anime details/credits/etc, but then realized it would be simpler to reuse the existing codebase, so I made a separate API to retrieve anime details. The API is a simple REST call to http://cdn.animenewsnetwork.com/encyclopedia/api.xml?k=v&k=v&... where k can be * anime * manga * title (either anime or manga) and v can be * a numeric id * a slash-separated list of ids * a string to search for, prefixed with ~ (limited to 10 results) For example: cdn.animenewsnetwork.com/encyclopedia/api.xml?anime=42 cdn.animenewsnetwork.com/encyclopedia/api.xml?anime=123/234/345&manga=1595 cdn.animenewsnetwork.com/encyclopedia/api.xml?manga=~bob cdn.animenewsnetwork.com/encyclopedia/api.xml?title=~jin I'm open to suggestions on how to improve and expand the API, but please keep in mind that we can't turn this into a full data-dump of the entire Encyclopedia. And unlike Facebook/Google/etc our resources are limited, so we can't power other people's ajax applications for free. Oh, and speaking of limited resources... please avoid hammering the API. |
|||
Back to top |
|
||
AppuriTech
Posts: 1 |
|
||
Hi Dan42,
I'm an Android app developer and anime fan, and would be interested in using your API to make an AnimeNewsNetwork app, if ANN approves of it, of-course. It would be useful for viewing front-page news, looking up anime/manga on the go, etc. And generally avoiding loading full ANN.com desktop version on a mobile phone.. (especially if you have 2G)
If you're worried about excessive use of the API, the app could be subscriber-only (required to login) or make use of ann advertisements. This may have better as an email, but you probably consider your inbox alot of spam, and also this way I can hear if ANN users would use an Android app. Let me know, Thanks. |
|||
Back to top |
|
||
herby
Posts: 7 Location: Slovakia |
|
||
It is not working. I click on the link, it redirects me to cdn.animenewsnetwork.co.uk and there it fails with "Oops! Google Chrome could not find cdn.animenewsnetwork.co.uk". If i use .com in api url, it redirects me to img.animenewsnetwork.co.uk and fails the same way.
|
|||
Back to top |
|
||
Shiroi Hane
Encyclopedia Editor
Posts: 7138 Location: Wales |
|
||
I'm sure I've accessed the API page before but yes - it keeps redirecting me to non-existent UK servers, even after invoking redirect_to_best_locale=off
|
|||
Back to top |
|
||
Anime News Network Forum Index -> Site-related -> Encyclopedia |
All times are GMT - 5 Hours Goto page 1, 2, 3, 4, 5 Next |
|
Page 1 of 5 |
|
Powered by phpBB © 2001, 2005 phpBB Group
⬈
⬋
-
+
Forum
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
The List - 6 Worst First Kisses in Anime
anime
Sometimes your first kiss is magical, but if you're an anime character, this adolescent milestone can get too weird for comfort. Here are six first kisses that the smoochers might want to forget.
― A first kiss can be a special, a treasured moment shared between two romantic partners. Or it can be haphazardly stolen by some jerk trying to one-up his friend or caused by a pratfall down a flight of st...
My Monster Secret GN 5
manga
My Monster Secret kicks into high gear with a pair of wild rambling adventures in its fifth volume. Nick Creamer digs into the action.
― The last two volumes of My Monster Secret have seen the manga drifting through a variety of chapter-length adventures, before settling into the more long-form and ultimately satisfying trip to Shiragami's parents' house. In light of the events of volume five, it see...
ANNCast - Rumiko Talkahashi
anime
Zac and special guest Dawn from the Anime Nostalgia Podcast reveal their undying love for Rumiko Takahashi, titan of manga, creator of timeless classics like Urusei Yatsura, Ranma 1/2 and more.
― ANNCast Episode 300 - Rumiko Talkahashi Zac and special guest Dawn from the Anime Nostalgia Podcast reveal their undying love for Rumiko Takahashi, titan of manga, creator of timeless classics like Urusei Y...
The Beginner's Guide to The King's Avatar
anime
We're not used to smash hit anime coming from China, but they have a bonafide success in The King's Avatar - here's everything you need to know about the phenomenon.
― It seems fair to say that every country has its own basic style or flavor of animation. When we think of Asian animated works, most of us go immediately to anime, the Japanese variant, and it certainly is among the most prevalent and a...
The Seven Deadly Sins: Seven Scars They Left Behind Novel
novels
Ten years before Princess Elizabeth set out to find Meliodas and the other Sins, her older sister Margaret and Gilthunder struggle to keep a terrible secret in this prequel to The Seven Deadly Sins. Rebecca Silverman investigates.
― If you're a casual fan of Nakaba Suzuki's manga The Seven Deadly Sins or its anime adaptation, you should be aware that this novel is intended to be read either after the...
The Best and Worst of the Season So Far: Week of June 10-16
just for fun
Attack on Titan races up the charts as the Spring anime season closes out! How did your favorite anime fare in our weekly user rankings?
― Our team of reviewers are following 27 anime series of the Spring 2017 season and readers are rating each episode as the reviews go up. So let's have a look at what ANN readers consider the best (and worst) of the season. Keep in mind that these rankings are base...
This Week in Games - Arms
games
Dustin goes a few rounds with Nintendo's noodle-armed fighting game for the Switch just in time for the summer. PLUS: Konami controversy, Rap Rabbit's demise, Sega Forever and more!
― Even covering it from the comfort of a home office, the sheer volume of E3 was positively exhausting. My heart goes out to the poor writers in the trenches, and even more to the poor fans who paid money for the mostly u...
Dagashi Kashi BD+DVD
anime
Is this slice of life comedy about convenience store candy a sugar rush worth indulging, or is it just as frivolously forgettable as its subject matter? Nick Creamer finds out.
― Anime has already offered us long-running dramas about baking bread and entire franchises predicated on idols fighting interstellar wars, so it's tough to be surprised by basically any premise these days. Slice of life in pa...
Answerman - What Happened To The "Watch This Program In A Well-Lit Room" Warnings?
anime
Ever since one Pokemon episode caused an unanticipated medical emergency, there have been viewer warnings in front of many anime on TV. Why are they starting to go away now?
― Chris asks: Back in the day, after that infamous episode of Pokémon gave viewers seizures, many anime would start with an on-screen warning to watch with the lights on and at a safe distance from the TV. A bunch of my late-90'...
The Mobile Suit Gundam Films: The Best, The Worst, and What's Worth Watching
anime
Your complete guide to through the best (and the worst) theatrical feature films the Gundam franchise has to offer.
― Spanning 38 years of giant robot battle action and space opera drama, the Gundam franchise has remained hugely popular. It is also, to put it simply, huge. Between TV series, OVAs, and movies, hundreds of hours of anime bearing the Gundam name has been produced. It's a lot to take in,...
My Hero Academia - Season One Limited Edition BD+DVD
anime
Have no fear, for the Limited Edition blu-ray of My Hero Academia is here! Nick Creamer revisits the strengths and weaknesses of this first season alongside its extras-packed home release.
― Debuting just three years ago, My Hero Academia has swiftly become one of the headline manga of Shounen Jump, a rip-roaring adventure elevated by strong art, charming characters, and consistent mastery of battle ...