You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CORS Error: Unable to Fetch Data from dictionaryapi.dev #241
When fetching data from the https://api.dictionaryapi.dev/api/v2/entries/en/ "word" endpoint, the request is being blocked by the browser due to a CORS policy error. Previously, this API worked without any CORS issues, but it recently started showing the following message in the browser console.
In addition to the CORS error, the API sometimes returns a 522 status code at random, especially for words that do not exist in the dictionaryapi or when an invalid/wrong word is send ...
In theory, that should be passing it correctly, but I think something's interrupting it before it gets to that line. We could confirm if someone was self-hosting this and it can still pull correctly.
The 522 error from Cloudfare comes from a timeout. The 19 second SYN+ACK never received before, rather than the resource request from 90 seconds. You can count that one out by going to a random word.
I haven't found a word that doesn't return a 522 yet from my own testing. Is it random on a per-word basis, or will it arbitrarily work and stop working with the same word attempted?
res.set(HEADER_ACCESS_CONTROL_ALLOW_ORIGIN, '*');
In theory, that should be passing it correctly, but I think something's interrupting it before it gets to that line. We could confirm if someone was self-hosting this and it can still pull correctly.
The 522 error from Cloudfare comes from a timeout. The 19 second SYN+ACK never received before, rather than the resource request from 90 seconds. You can count that one out by going to a random word.
I haven't found a word that doesn't return a 522 yet from my own testing. Is it random on a per-word basis, or will it arbitrarily work and stop working with the same word attempted?
Thanks for the detailed breakdown, really appreciate it! I also think it could be getting interrupted before it reaches that line, but I’m not sure.
And your explanation about the 522 timeout and the missing SYN+ACK makes sense. From my side, it doesn’t seem tied to any specific word. However, today it’s consistently returning a 522 “Connection timed out” error for every request, regardless of the word. But after a few minutes, it works, although some words (like 'dictionary,' 'more,' 'fetch,' etc.) are not included in the Dictionary API. At those times, it returns a 522 error from Cloudflare.
So it looks more like an intermittent issue with the public API or Cloudflare setup rather than the request itself.
https://freedictionaryapi.com/
The V1 version seems to still be working, unless there's another Wiktionary-based API that has /VX/ in the URL structurally that started with the whole dictionary and then moved over to only the English one.
This should be working now. Sorry for the inconvenience. I will try to improve availability of the API so that such problems never occur. Thank you for using this API.
Reacted by Smg065, Jeff Holst, Brian Kim, Benson and IhaYarre
Reacted by Brian Kim
Reacted by Ujjal B. Allen, Josh Walker, Matt Dodson and Abhijeet
i get this on a full half of my requests. This screenshots shows debug entries for when words are clicked in my app. The ones with no error after them worked, the others failed. Sometimes it's a 404, which is fine, but the CORS errors are random, almost as if half of the servers serving that endpoint are misconfigured.
Activity
b2d3 commentedon Oct 17, 2025
Same here ^
ujjalballen commentedon Oct 18, 2025
Is it going to be fixed soon, mate, or will it stay like that? I'm not sure! It’s had this issue for a long time and still hasn’t been fixed.
Smg065 commentedon Oct 18, 2025
Taking a closer look, the const HEADER_ACCESS_CONTROL_ALLOW_ORIGIN is assigned as Access-Control-Allow-Origin.
freeDictionaryAPI/app.js
Line 32 in 4f274a8
Here's the 2 spaces it's set as a wild card, one during error handling,
freeDictionaryAPI/app.js
Line 60 in 4f274a8
And one when the API tries to get the word.
freeDictionaryAPI/app.js
Line 114 in 4f274a8
In theory, that should be passing it correctly, but I think something's interrupting it before it gets to that line. We could confirm if someone was self-hosting this and it can still pull correctly.
The 522 error from Cloudfare comes from a timeout. The 19 second SYN+ACK never received before, rather than the resource request from 90 seconds. You can count that one out by going to a random word.
I haven't found a word that doesn't return a 522 yet from my own testing. Is it random on a per-word basis, or will it arbitrarily work and stop working with the same word attempted?
ujjalballen commentedon Oct 19, 2025
Thanks for the detailed breakdown, really appreciate it! I also think it could be getting interrupted before it reaches that line, but I’m not sure.
And your explanation about the 522 timeout and the missing SYN+ACK makes sense. From my side, it doesn’t seem tied to any specific word. However, today it’s consistently returning a 522 “Connection timed out” error for every request, regardless of the word. But after a few minutes, it works, although some words (like 'dictionary,' 'more,' 'fetch,' etc.) are not included in the Dictionary API. At those times, it returns a 522 error from Cloudflare.
So it looks more like an intermittent issue with the public API or Cloudflare setup rather than the request itself.
Smg065 commentedon Oct 21, 2025
https://freedictionaryapi.com/
The V1 version seems to still be working, unless there's another Wiktionary-based API that has /VX/ in the URL structurally that started with the whole dictionary and then moved over to only the English one.
meetDeveloper commentedon Oct 21, 2025
This should be working now. Sorry for the inconvenience. I will try to improve availability of the API so that such problems never occur. Thank you for using this API.
sgbeal commentedon Aug 11, 2026
i get this on a full half of my requests. This screenshots shows debug entries for when words are clicked in my app. The ones with no error after them worked, the others failed. Sometimes it's a 404, which is fine, but the CORS errors are random, almost as if half of the servers serving that endpoint are misconfigured.
comaeclipse commentedon Aug 18, 2026
@sgbeal same here, unfortunately...
adriennvarn commentedon Aug 20, 2026
I'm also having this issue, but I get this error 100% of the time.