Skip to content

Add possibility to search a card with name in all languages at the same time - #1181

Open
kvacquier wants to merge 3 commits into
tcgdex:masterfrom
kvacquier:feat/search-any-language
Open

Add possibility to search a card with name in all languages at the same time#1181
kvacquier wants to merge 3 commits into
tcgdex:masterfrom
kvacquier:feat/search-any-language

Conversation

@kvacquier

Copy link
Copy Markdown
Contributor

Changes

  • Added anyName query parameter to the GET /v2/{lang}/cards endpoint
  • Updated OpenAPI spec to document the new parameter

Details

The existing name filter only searches card names in the requested language. This makes it impossible to find a card if you only know its name in another language (e.g. searching name=Dracaufeu on /v2/en/cards returns nothing, even though Charizard exists).

The new anyName parameter searches across all 18 language card lists and returns the matching cards in the requested language:

GET /v2/en/cards?anyName=Dracaufeu     → returns Charizard
GET /v2/fr/cards?anyName=Glurak        → returns Dracaufeu
GET /v2/en/cards?anyName=eq:Pikachu    → exact match across all languages

It supports the same operator prefixes as other filters (like:, eq:, not:, neq:, etc.) and can be combined with any other query parameter (set, rarity, hp, etc.).


Note: since this repository is card data only, you may want to open the PR against the server repo instead if that's tracked separately. Let me know.

@thomas-bassett

Copy link
Copy Markdown
Contributor

Im not 100% sure this is an endpoint we would likly want, as it kind of breaks the search logic i.e Dracaufeu != Glurak while they match in name its not the sort of search behaviour I personally would expect.

the soultion i think is in another pr that i have open that links each card and returns all the endpoints for the differnt langagues of the same card.

this is possibly also a candiate for v3 of the graphql endpoint to allow you to filter by multiple langs

* feat: Add Trainer card legality cache and optimize compilation order  - Add Trainer card cache to share legality status between cards with the same name - Process cards from newest to oldest sets during compilation (for cache) - Process Trainer cards sequentially, other cards in parallel for performance - Sort final output by release date (oldest first) to maintain original order - Add character name descriptions to Trainer cards (e.g., "Boss's Orders (Giovanni)")  This ensures that if a newer Trainer card with the same name is legal, older versions of that Trainer card will also be marked as legal, which aligns with how Trainer cards work in the Pokémon TCG where same-name Trainers share legality.

* Cleaning up for card leality post compilation / pre-writting
@TCGdexBOT

Copy link
Copy Markdown
Member

🃏 10 Cards Changed

Details: 10 modified

Professor's Research (Professor Oak) (cel25-23) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Oak) (English)
French (fr)
Professor's Research (Professor Oak) (French)
Spanish (es)
Professor's Research (Professor Oak) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Oak) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Oak) (Italian)
Portuguese (pt)
Professor's Research (Professor Oak) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Oak) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Oak) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Oak) (German)
Dutch (nl)
Professor's Research (Professor Oak) (Dutch)
Polish (pl)
Professor's Research (Professor Oak) (Polish)
Russian (ru)
Professor's Research (Professor Oak) (Russian)

File: [data/Sword & Shield/Celebrations/23.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Celebrations/23.ts)
Set: Celebrations
Rarity: Holo Rare

Professor's Research (Professor Oak) (cel25-24) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Oak) (English)
French (fr)
Professor's Research (Professor Oak) (French)
Spanish (es)
Professor's Research (Professor Oak) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Oak) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Oak) (Italian)
Portuguese (pt)
Professor's Research (Professor Oak) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Oak) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Oak) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Oak) (German)
Dutch (nl)
Professor's Research (Professor Oak) (Dutch)
Polish (pl)
Professor's Research (Professor Oak) (Polish)
Russian (ru)
Professor's Research (Professor Oak) (Russian)

File: [data/Sword & Shield/Celebrations/24.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Celebrations/24.ts)
Set: Celebrations
Rarity: Ultra Rare

Boss's Orders (Giovanni) (swsh2-154) (found using en)
Language Language Language
English (en)
Boss's Orders (Giovanni) (English)
French (fr)
Boss's Orders (Giovanni) (French)
Spanish (es)
Boss's Orders (Giovanni) (Spanish)
Spanish (Mexico) (es-mx)
Boss's Orders (Giovanni) (Spanish (Mexico))
Italian (it)
Boss's Orders (Giovanni) (Italian)
Portuguese (pt)
Boss's Orders (Giovanni) (Portuguese)
Portuguese (Brazil) (pt-br)
Boss's Orders (Giovanni) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Boss's Orders (Giovanni) (Portuguese (Portugal))
German (de)
Boss's Orders (Giovanni) (German)
Dutch (nl)
Boss's Orders (Giovanni) (Dutch)
Polish (pl)
Boss's Orders (Giovanni) (Polish)
Russian (ru)
Boss's Orders (Giovanni) (Russian)

File: [data/Sword & Shield/Rebel Clash/154.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Rebel Clash/154.ts)
Set: Rebel Clash
Rarity: Holo Rare

Boss's Orders (Giovanni) (swsh2-189) (found using en)
Language Language Language
English (en)
Boss's Orders (Giovanni) (English)
French (fr)
Boss's Orders (Giovanni) (French)
Spanish (es)
Boss's Orders (Giovanni) (Spanish)
Spanish (Mexico) (es-mx)
Boss's Orders (Giovanni) (Spanish (Mexico))
Italian (it)
Boss's Orders (Giovanni) (Italian)
Portuguese (pt)
Boss's Orders (Giovanni) (Portuguese)
Portuguese (Brazil) (pt-br)
Boss's Orders (Giovanni) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Boss's Orders (Giovanni) (Portuguese (Portugal))
German (de)
Boss's Orders (Giovanni) (German)
Dutch (nl)
Boss's Orders (Giovanni) (Dutch)
Polish (pl)
Boss's Orders (Giovanni) (Polish)
Russian (ru)
Boss's Orders (Giovanni) (Russian)

File: [data/Sword & Shield/Rebel Clash/189.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Rebel Clash/189.ts)
Set: Rebel Clash
Rarity: Ultra Rare

Boss's Orders (Giovanni) (swsh2-200) (found using en)
Language Language Language
English (en)
Boss's Orders (Giovanni) (English)
French (fr)
Boss's Orders (Giovanni) (French)
Spanish (es)
Boss's Orders (Giovanni) (Spanish)
Spanish (Mexico) (es-mx)
Boss's Orders (Giovanni) (Spanish (Mexico))
Italian (it)
Boss's Orders (Giovanni) (Italian)
Portuguese (pt)
Boss's Orders (Giovanni) (Portuguese)
Portuguese (Brazil) (pt-br)
Boss's Orders (Giovanni) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Boss's Orders (Giovanni) (Portuguese (Portugal))
German (de)
Boss's Orders (Giovanni) (German)
Dutch (nl)
Boss's Orders (Giovanni) (Dutch)
Polish (pl)
Boss's Orders (Giovanni) (Polish)
Russian (ru)
Boss's Orders (Giovanni) (Russian)

File: [data/Sword & Shield/Rebel Clash/200.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Rebel Clash/200.ts)
Set: Rebel Clash
Rarity: Secret Rare

Boss's Orders (Lysandre) (swsh4.5-58) (found using en)
Language Language Language
English (en)
Boss's Orders (Lysandre) (English)
French (fr)
Boss's Orders (Lysandre) (French)
Spanish (es)
Boss's Orders (Lysandre) (Spanish)
Spanish (Mexico) (es-mx)
Boss's Orders (Lysandre) (Spanish (Mexico))
Italian (it)
Boss's Orders (Lysandre) (Italian)
Portuguese (pt)
Boss's Orders (Lysandre) (Portuguese)
Portuguese (Brazil) (pt-br)
Boss's Orders (Lysandre) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Boss's Orders (Lysandre) (Portuguese (Portugal))
German (de)
Boss's Orders (Lysandre) (German)
Dutch (nl)
Boss's Orders (Lysandre) (Dutch)
Polish (pl)
Boss's Orders (Lysandre) (Polish)
Russian (ru)
Boss's Orders (Lysandre) (Russian)

File: [data/Sword & Shield/Shining Fates/58.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Shining Fates/58.ts)
Set: Shining Fates
Rarity: Rare

Professor's Research (Professor Juniper) (swsh4.5-60) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Juniper) (English)
French (fr)
Professor's Research (Professor Juniper) (French)
Spanish (es)
Professor's Research (Professor Juniper) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Juniper) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Juniper) (Italian)
Portuguese (pt)
Professor's Research (Professor Juniper) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Juniper) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Juniper) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Juniper) (German)
Dutch (nl)
Professor's Research (Professor Juniper) (Dutch)
Polish (pl)
Professor's Research (Professor Juniper) (Polish)
Russian (ru)
Professor's Research (Professor Juniper) (Russian)

File: [data/Sword & Shield/Shining Fates/60.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Shining Fates/60.ts)
Set: Shining Fates
Rarity: Rare

Professor's Research (Professor Magnolia) (swsh1-178) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Magnolia) (English)
French (fr)
Professor's Research (Professor Magnolia) (French)
Spanish (es)
Professor's Research (Professor Magnolia) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Magnolia) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Magnolia) (Italian)
Portuguese (pt)
Professor's Research (Professor Magnolia) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Magnolia) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Magnolia) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Magnolia) (German)
Dutch (nl)
Professor's Research (Professor Magnolia) (Dutch)
Polish (pl)
Professor's Research (Professor Magnolia) (Polish)
Russian (ru)
Professor's Research (Professor Magnolia) (Russian)

File: [data/Sword & Shield/Sword & Shield/178.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Sword & Shield/178.ts)
Set: Sword & Shield
Rarity: Holo Rare

Professor's Research (Professor Magnolia) (swsh1-201) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Magnolia) (English)
French (fr)
Professor's Research (Professor Magnolia) (French)
Spanish (es)
Professor's Research (Professor Magnolia) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Magnolia) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Magnolia) (Italian)
Portuguese (pt)
Professor's Research (Professor Magnolia) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Magnolia) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Magnolia) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Magnolia) (German)
Dutch (nl)
Professor's Research (Professor Magnolia) (Dutch)
Polish (pl)
Professor's Research (Professor Magnolia) (Polish)
Russian (ru)
Professor's Research (Professor Magnolia) (Russian)

File: [data/Sword & Shield/Sword & Shield/201.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Sword & Shield/201.ts)
Set: Sword & Shield
Rarity: Ultra Rare

Professor's Research (Professor Magnolia) (swsh1-209) (found using en)
Language Language Language
English (en)
Professor's Research (Professor Magnolia) (English)
French (fr)
Professor's Research (Professor Magnolia) (French)
Spanish (es)
Professor's Research (Professor Magnolia) (Spanish)
Spanish (Mexico) (es-mx)
Professor's Research (Professor Magnolia) (Spanish (Mexico))
Italian (it)
Professor's Research (Professor Magnolia) (Italian)
Portuguese (pt)
Professor's Research (Professor Magnolia) (Portuguese)
Portuguese (Brazil) (pt-br)
Professor's Research (Professor Magnolia) (Portuguese (Brazil))
Portuguese (Portugal) (pt-pt)
Professor's Research (Professor Magnolia) (Portuguese (Portugal))
German (de)
Professor's Research (Professor Magnolia) (German)
Dutch (nl)
Professor's Research (Professor Magnolia) (Dutch)
Polish (pl)
Professor's Research (Professor Magnolia) (Polish)
Russian (ru)
Professor's Research (Professor Magnolia) (Russian)

File: [data/Sword & Shield/Sword & Shield/209.ts](https://github.com/tcgdex/cards-database/blob/81d0bb571ef71480cc3802e0650f42a51cfcbaaa/data/Sword & Shield/Sword & Shield/209.ts)
Set: Sword & Shield
Rarity: Secret Rare

@advra

advra commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I recommend you make your own secondary search layer on top that which tailor to your needs. This is what I have personally done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants