PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.33k stars 954 forks source link

Searching 'mankey' by name works, but by ID (56) doesn't. #552

Closed lukaszdutka closed 3 years ago

lukaszdutka commented 3 years ago

Hello! I am using PokeAPI and stumbled upon a lack of data for Mankey, when searching by ID.

First of all, I want to say that veekun has it (id=56): https://github.com/veekun/pokedex/blob/master/pokedex/data/csv/pokemon.csv

Running this query: https://pokeapi.co/api/v2/pokemon/56 doesn't work. However, running: https://pokeapi.co/api/v2/pokemon/mankey does work.

It would be great if searching by ID would work for all pokemons, the same as searching by names :)

Naramsim commented 3 years ago

On my side, both work fine.

Naramsim commented 3 years ago

Can you reload and check again? Which status code are you getting?

lukaszdutka commented 3 years ago

I am getting 404 on https://pokeapi.co/api/v2/pokemon/56 and 304 on https://pokeapi.co/api/v2/pokemon/mankey

Naramsim commented 3 years ago

Hmm, okay, those status codes are weird. I receive always 200.

Are you behind any proxies/caches/VPNs? It's always a third-party that blocks us.

lukaszdutka commented 3 years ago

Any proxies/caches/VPNs, not intentionally. Other random pokemon IDs works, tried just now on: 1, 5, 57, 151, 152.

It looks like the problem is only with getting by ID with ID=56.

The same issue persists for two of my colleagues. We all reside in Poland, if it matters, but use different internet connections (even different cities)

lukaszdutka commented 3 years ago

UPDATE: Now all good IDs (and names) return status code 200, but 56 still doesn't work

lukaszdutka commented 3 years ago

UPDATE: Noticed very strange thing. I shared the link on Messenger app, to my friend. He tried it, nothing happened. But then I tried it and it worked! But it looks like it works only with appended fbclid. Cutting it out still results in 404. https://pokeapi.co/api/v2/pokemon/56?fbclid=IwAR3ykTEpdSj8uyRZqUDZ7DVegKtUuyE9VxN0XNtpfBR0dlKATWIgaNR6BR8

Naramsim commented 3 years ago

We don't have such mechanics.

Probably your ISP caches resources and since you added something else to the URL (?fbclid=IwAR3ykTEpdSj8uyRZqUDZ7DVegKtUuyE9VxN0XNtpfBR0dlKATWIgaNR6BR8) it didn't hit the cache and hit our servers/cloudflare.

I'm going to close this issue.

lukaszdutka commented 3 years ago

Yes, looks like caching issue. Now it works fine