Can AI crawlers see JavaScript content? How to check and fix it
Most AI crawlers don't run JavaScript, so text that a script adds after the page loads is invisible to ChatGPT search, Claude and Perplexity. Check the page source for your content, and if it isn't there, render the page on the server. Googlebot is the exception: it runs JavaScript.
Do AI crawlers run JavaScript?
Most don't. Vercel tested the major AI crawlers and found that none of them ran JavaScript, including OpenAI's OAI-SearchBot, ChatGPT-User and GPTBot, Anthropic's ClaudeBot and PerplexityBot. OpenAI's and Anthropic's crawlers even download script files, but don't run them. The exceptions are Googlebot, which also serves Gemini, and Applebot: both render pages like a browser. Treat every other AI crawler as reading the raw HTML only.
The crawlers that matter for AI search are listed in our AI crawler directory: OAI-SearchBot for ChatGPT search, Claude-SearchBot for Claude and PerplexityBot for Perplexity, among others.
According to Vercel's analysis of AI crawlers (opens in a new tab) and Google's guide to JavaScript SEO (opens in a new tab).
How can I tell if my content needs JavaScript?
Open the page, choose View page source (not Inspect, which shows the page after scripts ran), and search for a sentence from the middle of your content. If it isn't in the source, AI crawlers that don't run JavaScript can't see it. You can do the same from a terminal with curl -s URL | grep "your sentence", or scan the page with our checker.
curl -s https://example.com/page | grep -c "a sentence from your page"A result of 0 means the sentence isn't in the HTML the server sends. Search for something from the middle of the page, not the title, which is often in the HTML even when the rest isn't.
What does a client-rendered page look like to a crawler?
A single-page app often sends an HTML file with an empty container and a script that fills it in. This is all a crawler that doesn't run JavaScript gets:
<body>
<div id="root"></div>
<script src="/assets/app.js"></script>
</body>Our JavaScript check looks for those signs: an empty mount point such as #root, #app, #__next, #__nuxt, #___gatsby, app-root, a body with almost no words but script bundles, and content that only sits inside <noscript>. It fails when there are such signs and fewer than 150 words of content in the HTML, and warns under 300.
How do I fix content that only appears after JavaScript runs?
Send the content in the HTML. Server-side rendering (SSR) builds each page on the server, static site generation (SSG) builds pages ahead of time, and prerendering saves a rendered copy of each page of a client-side app. Most frameworks support at least one: Next.js, Nuxt, SvelteKit, Astro, Remix and Angular all render on the server. The page can still use JavaScript for interactivity once it loads.
Whatever you choose, these must be in the HTML the server sends:
- the main text, headings, lists and tables;
- the
<title>, meta description and canonical link; - structured data (JSON-LD), which is often added by a tag manager and then missing from the HTML;
- links as real
<a href>elements, so crawlers can find your other pages.
Content in tabs and accordions is fine as long as it is in the HTML and only hidden with CSS. Content that loads when someone scrolls or clicks is not.
Is dynamic rendering still a good fix?
Dynamic rendering, serving prerendered HTML only to bots, works, but Google calls it a workaround and not a recommended solution, and it has to recognise every crawler by its user agent. A crawler it doesn't recognise gets the empty app shell. Rendering on the server for everyone is simpler and covers crawlers you don't know about yet.
According to Google's page on dynamic rendering (opens in a new tab).
Does Google AI Overviews see JavaScript content?
Usually, because AI Overviews are built from Google's index and Googlebot renders JavaScript. Rendering can lag behind crawling, and errors in scripts or blocked script files stop it, so server-rendered content is still the safer choice. ChatGPT search, Claude and Perplexity are built on crawlers that read the raw HTML.
How do I check a page?
Scan it; the report opens at the JavaScript result. We fetch the page once, as most AI crawlers do, with no JavaScript, and count the words of content in the HTML. The report's answer preview shows what an AI engine could quote from that HTML, so an empty preview on a page full of text means the text needs JavaScript.