genshindev / api Goto Github PK
View Code? Open in Web Editor NEWA fan-made Genshin Impact API for easy access to game data.
Home Page: https://genshin.jmp.blue
License: Open Software License 3.0
A fan-made Genshin Impact API for easy access to game data.
Home Page: https://genshin.jmp.blue
License: Open Software License 3.0
This is just a discussion.
I think GraphQL would be a better option for relationship query.
But if we're adding support for GraphQL, some entity structure might have to be changed for better relationship definition. It would bring breaking changes to the api.
I would love to work on GraphQL support if we can reach agreements on it.
I don't think that they should include the scaling for every level because I think it's a bit ridiculous and also unnecessary. But I do think they should include some other levels to provide an idea for how good the stats are towards late game. So I would say probably the base damage then the talent at max without constellations and then at max including constellations. And then also their stat scaling such as health, and attack?
Hi all!
The response of the different endpoints are not homogeneous, I give an example.
https://api.genshin.dev/artifacts -> ["adventurer","archaic-petra",...] ✅
https://api.genshin.dev/characters -> ["albedo","aloy","amber",...] ✅
https://api.genshin.dev/characters/aloy -> {"name":"Aloy","title":"Savior From Another World",... ✅
https://api.genshin.dev/consumables -> ["food","potions"] ✅
https://api.genshin.dev/consumables/food -> {"pile-em-up":{"name":""Pile 'Em Up"",... ❌
I think it should be like this
https://api.genshin.dev/consumables/food -> ["pile-em-up","adeptus-temptation","adventurers-breakfast-sandwich",...] ✅
I understand the reason why you have created it this way,
but this complicates the API and this request optimization must be done in front
Is it possible to unify the response data structure?
Thx so much!
As mentionned in title, weekly boss are not reachable. Their data are in assets/data/boss/weekly-boss/XX, so in order to get them i call "/boss/weekly-boss/azhdaha".
The problem come here : because we have "/:param1/:param2/:param3", the router considers it as the route '/:type/:id/:imageType' and try to get the image of the entity "weekly-boss" instead of getting infos of the weekly-boss asked.
Unless the call for weekly-boss is different and doesn't require changes, I've thought of 2 way of corrections :
there are different keys for the same data type, It can be unified?
https://api.genshin.dev/domains/domain-of-guyun
rewards -> details ->
[
{...
drops: [
{ name: 'Lucky Dog', rarity: '2/3', drop_min: 0, drop_max: 1 },
]
},
{...
items: [
{ name: 'Lucky Dog', rarity: 3, drop_min: 0, drop_max: 1 },
]
}
]
It would be nice if we are able to grab data based on the parameters. For example, being able to grab all characters with a specific vision (e.g Geo) or the Star ratings for artifacts, characters, and weapons.
I mean it's possible to implement this feature but not at the moment i guess, as it needs a route rework for more structured paths. Correct me if I'm wrong.
Adding a unique version identifier to the api results (either the root, every index page, or even every result) that incremented whenever data was updated would allow developers to quickly determine if their data is stale. One request to the api root could be used to see if anything changed instead of having to walk through every page and resource to update any cached data.
Example:
// https://api.genshin.dev/
{
"types": [
"artifacts",
"boss",
"characters",
"consumables",
"domains",
"elements",
"enemies",
"materials",
"nations",
"weapons"
],
"version": 123.4
}
Alternatively, instead of inserting version to some/all endpoints via middleware, a /version endpoint could be added for this purpose.
The example above uses a version number but it could also be a hash, uuid, datetime, or any other unique value. Something that could be calculated instead of having to be manually updated each release seems preferable. Perhaps use something like node-cache to cache a hash of the assets directory?
Normal Attack for Tighnari (Khanda Barrier-Buster) is missing.
I wonder if it's a good idea to include books here.
The player needs to collect books in order to read the contents. And so I'm not sure whether making the contents public will raise any ethical or other issues.
Hello,
I am doing a front concept proof and I would like to use your API,
do you have documentation of the api?
Thank you very much for the effort!
Hi 👋
When I get data of character with long name (e.g. Kamisato Ayaka), also I want to get image of this character. In this case I need to make request that look like "https://api.genshin.dev/characters/ayaka/icon", but when I'm trying to do it programmatically (js):
const character = {...} // stored character's data got from api
const img = fetch(`https://api.genshin.dev/characters/${character.name}/icon`);
request looks like "https://api.genshin.dev/characters/Kamisato%20Ayaka/icon", even if I remove space and convert name to lower case, I can't get image due to mismatch with full name in character's data and short name that used as id for accessing data. In this case name is "Kamisato Ayaka" and short id name is "ayaka"
Solution is simple: I need to use constructions like switch or if-else like:
let idName = "";
// set proper key
if (character.name == "Kamisato Ayaka") {
idName = "ayaka";
}
// then make request
const img = fetch(`https://api.genshin.dev/characters/${idName}/icon`); // https://api.genshin.dev/characters/ayaka/icon
but it looks ugly and not scalable in a long term.
Is it possible to make character's name and key name the same or add id name in character's data?
{
"id": "ayaka",
"name": "Kamisato Ayaka"
}
When run docker-compose up
, then I see such error ERROR: This version of pnpm requires at least Node.js v14.6
on [6/8] RUN pnpm install:
I'm still pretty new to this API and API's in general, but I was wondering if we could add a PUT
or POST
request to get a resource using a vague name. For example, my use case has a different format for storing character names, e.g. Albedo
, HuTao
, etc, and I want to search for their corresponding character resource so I would send a post or put request with a json body like
{
"name": "Albedo", //HuTao
"type":"character", // or characters if that helps
}
This returns what is basically on api.genshin.dev/characters/albedo
and api.genshin.dev/characters/hu-tao
.
Are there any plans to add images for other endpoints?
Genshin Impact Wiki has them
The following weapons have their location set to Gacha
despite not being obtainable from it, but rather from chests or npcs:
Amber Catalyst
Dark Iron Sword
Ebony Bow
Fillet Blade
Halberd
Otherworldly Story
Quartz
Skyrider Greatsword
Twin Nephrite
White Iron Greatsword
Also Kunwu's Iris Rift
needs to be renamed to Vortex Vanquisher
https://api.genshin.dev/characters/thoma/list
doesn't show icon-big and https://api.genshin.dev/characters/thoma/icon-big
doesn't exist.
When you request to /characters/amber
, the response contains
{
...
gender: "Female",
specialDish: "Outrider's Champion Steak!",
...
}
which in the other request it doesn't exists.
And in some endpoints e.g. /characters/keqing
or /characters/jean
the response contain
{
outfits: [
{
...
}
]
}
which in the other request isn't present.
And other things like:
nation
key in /characters/aloy
has 'Unknown'
string valuebirthday
key in /characters/traveler
(s) is missingaffilation
key in /characters/traveler
(s) has 'Not affilated to any Nation'
string valueIs it better that if the missing key should be nullable instead of undefined or having an empty string?
hey! I can't find a link to your discord server, but I wanted to suggest how to host this: since you only have static data, why not host it all on netlify? you don't really need a server component since you don't seem to do any logic, so maybe a static host is best.
Recently added changes like Kuki Shinobu & Shikanoin Heizou don't seem to be reflected on the website.
Guys, thanks for doing a great job! When I getting data from https://api.genshin.dev/characters
, there are only characters' names, and what if somebody wants to make some filters or sorts by characters (elements, nation, rarity), etc. It seems we need an array of objects with all info about every character in general /characters
request, not only in special like /characters/albedo
kaeya's character description is wrong. it's been changed to "An accomplished swordsman and a strategic thinker in the Knights of Favonius, rumored to hail from beyond Mondstadt." in game.
Is there any way to filter weapons by type without having to call twice the API?
Link: https://genshin.jmp.blue/characters/nahida
Nahida is missing the 'gender' key. She is a female.
Shenhe is spelled as Shenli in the character data, if I get around to it I'll fix this myself.
The Consumables enpoint is missing (includes food and potions)
Gadgests also could be added
Gadgets are items that can be crafted with Alchemy and Forging, obtained from Quests, or purchasable from Events. Reusable gadgets have a cooldown after they are used.
And Shops endpoint is also important
Can't we rely on https://genshin-impact.fandom.com/wiki/Shops data?
Hey, I think it would be useful for the character data to include the identifier of the character.
This way, when parsing data from https://api.genshin.dev/characters/all
, it would be possible to determine the URL for the icon of each character.
Happy to do it myself, if we can agree that this is a useful feature.
As opposed to talent-burst
like the rest of the characters, Diluc's burst icon is named talent_burst
. The inconsistency is small but can result in some unexpected behavior.
Hi My friend i start a project with ur api today your api is down 😢 think cloud or smt Hipe you fix it ❤️ good luck
As the title mentioned.
I found that most of the character pictures in images/characters are card image
(appearing in character posters), but Xiao and Hutao’s are gacha image
(appearing in the gacha interface). Can you make some changes to distinguish them?
In addition, I also want to know how to obtain such a gacha image
and a complete weapon image (not cropped)
Some of the characters Aloy, Sayu, Raiden, Sara and Yoimiya are not included. Please add it.
should be "constellation-2" instead of "cosntellation-2"
Hello. I was using the API and I don't see the Hunter's Path star weapon in the list of weapons
Title. Will do it myself if no one else does it but im lazy
Hi, I would like to add the Portuguese language to the lang, because when I use ?lang=PT there is no translation for our language, could you add?
I'm coming back with some new ideas (not really new though, I planned to make my own API but it's too much a hassle so I'm giving you my ideas)
And I don't know if that can save you some time but I sent the JSON I had started to make.
Updates:
This could give the version (ex: 2.1), name (ex: Floating World Under the Moonlight), release date (ex: 09/01/2021), and update image.
versions_edit.json.txt
Wishes:
This would give info on the wish banners: start and end date, type (limited or permanent), version (ex: 2.1), name (ex: Invitation To Mundane Life), the banner image, and the main loots (usually 4 characters with an increased drop rate)
wishes_edit.json.txt
Do whatever you want with these ideas and files, hope that it can help :)
Hi 👋
Is there any limitations to usage of public api deployed on https://api.genshin.dev?
I plan to create something like open source catalog web app based on data from your API with features like search, team builder and much more.
If this app will send requests based on the pages visited by users like search by name of hero or something like this, will I be penalized if it makes a heavy load on your server?
I noticed that the "baseAttack"
for weapons are cast to strings rather than integers/numbers/whatever. Is this intentional, or would ints/numbers be a more appropriate type for these?
Hey, your API seems nice but I thought about a little addition.
I think it would be nice for each character to have a list of their skins (if they have some) when you request the character's info:
Example for Keqing (since she will have a skin in 2.4)
"skins":[{"name":"Opulent Splendor","image":"https://skin_img.png"},
Hello, I'd like to add a new attribute to all characters that contains that character's release date. E.g. for Kirara that would be "release": "2023-05-24"
. Would that be alright?
What is the policy regarding information about unreleased entities?
I might be misinformed about this topic, if so please tell me!
There's some artifacts, like 'Prayers to the Firmament' and 'Glacier and Snowfield' that aren't released ingame. This poses at least three problems (in my opinion):
Theres some ways to go about this:
I'd like to hear everyone's opinions on this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.