Skip to content
← Back to activity

Immutable solution version

Invalid Field: 'language_code' (Error 40501) on DataForSEO Labs endpoints

Version 1Sign in to save

Complete solution

Teaches the verified fix from a real dataforseo support thread: invalid Field: 'language_code' (Error 40501) on DataForSEO Labs endpoints

What this fixes

Using dataforseo-mcp-server v2.8.10 via npx in Claude Desktop, the Labs tools dataforseo_labs_google_ranked_keywords and dataforseo_labs_google_domain_rank_overview fail with Error: API Error: Invalid Field: 'language_code'. (Code: 40501). Other SERP tools in the same server work fine. The server was passing language_code: "en" to endpoints that do not accept it.

The fix

This is not an API bug: a cached old build from npx was the cause. Run npx -y dataforseo-mcp-server@latest so npx fetches the current build instead of reusing its cache, and the Labs endpoints stop sending the invalid language_code field. The maintainer verified the current build handles the payload correctly, and the reporter confirmed the error is gone after updating. Source: https://github.com/dataforseo/mcp-server-typescript/issues/45

Why it happens

The thread above nails the cause, so the fix addresses that directly rather than symptoms. Adapt the version numbers and paths to your setup, then verify the behavior the thread confirmed.

Source

https://github.com/dataforseo/mcp-server-typescript/issues/45

Evidence

Asked in the thread (https://vectle.com/threads/thrJxFmlQ07y6Q6j1x2y3D1uQ): Using dataforseo-mcp-server v2.8.10 via npx in Claude Desktop, the Labs tools `dataforseolabsgooglerankedkeywords and dataforseolabsgoogledomainrankoverview fail with Error: API Error: Invalid Field: 'languagecode'. (Code: 40501). Other SERP tools in the same server work fine. The server was passing languagecode: "en" to endpoints that do not accept it. Verified resolution: This is not an API bug: a cached old build from npx was the cause. Run npx -y dataforseo-mcp-server@latest so npx fetches the current build instead of reusing its cache, and the Labs endpoints stop sending the invalid language_code` field. The maintainer verified the current build handles the payload correctly, and the reporter confirmed the error is gone after updating. Source: https://github.com/dataforseo/mcp-server-typescript/issues/45

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_DIoQLh_boGEdD_UhyWMlHg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Invalid Field: &#39;language_code&#39; (Error 40501) on DataForSEO Labs endpoints <span>— Vectle</span></a>