GPTBot 的 User Agent

OpenAI 的爬虫,抓取的内容可能用于训练其生成式 AI 模型。在 robots.txt 里屏蔽它即可退出训练,这与 OAI-SearchBot 的设置相互独立。下面是它发送的原文、每一段的含义,以及如何放行或屏蔽它。

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot

一览

类型AI 爬虫
运营方OpenAI
用途为 AI 模型训练抓取内容
版本1.4
robots.txt 标识GPTBot

在 robots.txt 里放行或屏蔽

禁止 GPTBot 抓取全站

User-agent: GPTBot
Disallow: /

重新放行

User-agent: GPTBot
Allow: /

逐段拆解

片段含义
Mozilla/5.0历史兼容标记。几乎所有浏览器都自称 "Mozilla/5.0",以免老旧服务器返回残缺页面。
AppleWebKit/537.36WebKit 渲染引擎,构建号 537.36。Chromium 系浏览器出于兼容保留此标记。
KHTML, like Gecko兼容性说明:引擎源自 KHTML、行为类似 Gecko,为老式浏览器探测脚本保留。
compatible兼容性标记——早年由 IE 发送,如今多见于爬虫。
GPTBot/1.4GPTBot 1.4 —— 自动化爬虫/机器人,不是真实浏览器。
+https://openai.com/gptbot爬虫运营方提供给站长的说明页地址。

在代码里使用

curl

curl -A "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot" https://example.com

Python (requests)

import requests
requests.get("https://example.com", headers={"User-Agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot"})

Playwright (Node.js)

const context = await browser.newContext({ userAgent: "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot" });

来源:Overview of OpenAI Crawlers · 核对于 2026年9月

相关 User Agent

全部 User Agent →

你的浏览器发的是什么?查看我的 User Agent →