Firecrawl Alexandria

ChatGPT and Codex docs

Official ChatGPT and Codex documentation from learn.chatgpt.com (where developers.openai.com/codex now redirects): OpenAI's own docs search restricted to the site, any page as clean Markdown with a heading outline and section reads, the llms.txt page index, and the dated ChatGPT and Codex changelog. Public machine-readable sources only; no login.

Other sites in this stack:Developer docs

Try ChatGPT and Codex docs now.

Choose an example or ask your own question.

ChatGPT and Codex docs
TRY ASKING
1Request
number

Truncate content to this many characters.

string

Return only this heading and its subsections: heading text or anchor, case-insensitive (e.g. Matcher patterns or matcher-patterns). Overrides a URL anchor. Unknown sections are not_found.

string

Docs slug after /docs/, e.g. hooks, agent-configuration/subagents, whats-new/devday-2026 (a trailing .md is accepted). list_pages and search_docs return slugs.

5 credits
Codefollows the fields above
const result = await firecrawl.scrape({
  alexandria: {
    provider: "learn-chatgpt-com",
    capability: "developer-documentation/get_page",
    options: {
      max_chars: 1500,
      section: "Matcher patterns",
      slug: "hooks",
    },
  },
});
2Response example

This is a sample shape. Press Run to see live data from ChatGPT and Codex docs.

{
  "chars": 4172,
  "content": "## Matcher patterns\n\nThe `matcher` field is a regex string that filters when hooks fire. Use `\"*\"`,\n`\"\"`, or omit `matcher` entirely to match every occurrence of a supported\nevent.\n\nOnly some current Codex events honor `matcher`:\n\n| Event               | What `matcher` filters | Notes                                                          |\n| ------------------- | ---------------------- | -------------------------------------------------------------- |\n| `PermissionRequest` | tool name              | Support includes `Bash`, `apply_patch`\\*, and MCP tool names   |\n| `PostToolUse`       | tool name              | See [Tool coverage](#tool-coverage)                            |\n| `PostCompact`       | compaction trigger     | Values are `manual` or `auto`                                  |\n| `PreCompact`        | compaction trigger     | Values are `manual` or `auto`                                  |\n| `PreToolUse`        | tool name              | See [Tool coverage](#tool-coverage)                            |\n| `SessionEnd`        | end reason             | Currently only `other`                                         |\n| `SessionStart`      | start source           | Values are `startup`, `resume`, `clear`, `compact`, and `fork` |\n| `SubagentStart`     | subagent type          | Values depend on the subagent that starts                      |\n| `SubagentStop`      | subagent type          | Values depend on the subagent that stops                       |\n| `UserPromptSu",
  "description": "Run scripts or MCP tools during the Codex lifecycle",
  "markdown_url": "https://learn.chatgpt.com/docs/hooks.md",
  "observed_at_ms": 1792515977843,
  "outline": [
    {
      "anchor": null,
      "level": 1,
      "text": "Hooks"
    },
    {
      "anchor": "where-codex-looks-for-hooks",
      "level": 2,
      "text": "Where Codex looks for hooks"
    },
    {
      "anchor": "review-and-trust-hooks",
      "level": 2,
      "text": "Review and trust hooks"
    },
    {
      "anchor": "config-shape",
      "level": 2,
      "text": "Config shape"
    },
    {
      "anchor": "mcp-tool-hooks",
      "level": 2,
      "text": "MCP tool hooks"
    },
    {
      "anchor": "configure-an-mcp-tool-hook",
      "level": 3,
      "text": "Configure an MCP tool hook"
    },
    {
      "anchor": "expand-arguments-from-the-hook-event",
      "level": 3,
      "text": "Expand arguments from the hook event"
    },
    {
      "anchor": "execution-and-lifecycle",
      "level": 3,
      "text": "Execution and lifecycle"
    },
    {
      "anchor": "turn-hooks-off",
      "level": 2,
      "text": "Turn hooks off"
    },
    {
      "anchor": "managed-hooks-from-requirementstoml",
      "level": 2,
      "text": "Managed hooks from requirements.toml"
    },
    {
      "anchor": "plugin-bundled-hooks",
      "level": 2,
      "text": "Plugin-bundled hooks"
    },
    {
      "anchor": "matcher-patterns",
      "level": 2,
      "text": "Matcher patterns"
    },
    {
      "anchor": "tool-coverage",
      "level": 3,
      "text": "Tool coverage"
    },
    {
      "anchor": "common-input-fields",
      "level": 2,
      "text": "Common input fields"
    },
    {
      "anchor": "common-output-fields",
      "level": 2,
      "text": "Common output fields"
    },
    {
      "anchor": "large-hook-output",
      "level": 3,
      "text": "Large hook output"
    },
    {
      "anchor": "run-hooks-in-the-background",
      "level": 2,
      "text": "Run hooks in the background"
    },
    {
      "anchor": "configure-a-background-hook",
      "level": 3,
      "text": "Configure a background hook"
    },
    {
      "anchor": "how-background-hooks-run",
      "level": 3,
      "text": "How background hooks run"
    },
    {
      "anchor": "limitations",
      "level": 3,
      "text": "Limitations"
    },
    {
      "anchor": "hooks",
      "level": 2,
      "text": "Hooks"
    },
    {
      "anchor": "sessionstart",
      "level": 3,
      "text": "SessionStart"
    },
    {
      "anchor": "sessionend",
      "level": 3,
      "text": "SessionEnd"
    },
    {
      "anchor": "subagentstart",
      "level": 3,
      "text": "SubagentStart"
    },
    {
      "anchor": "pretooluse",
      "level": 3,
      "text": "PreToolUse"
    },
    {
      "anchor": "permissionrequest",
      "level": 3,
      "text": "PermissionRequest"
    },
    {
      "anchor": "posttooluse",
      "level": 3,
      "text": "PostToolUse"
    },
    {
      "anchor": "tool-calls-from-code-mode",
      "level": 4,
      "text": "Tool calls from code mode"
    },
    {
      "anchor": "precompact",
      "level": 3,
      "text": "PreCompact"
    },
    {
      "anchor": "postcompact",
      "level": 3,
      "text": "PostCompact"
    },
    {
      "anchor": "userpromptsubmit",
      "level": 3,
      "text": "UserPromptSubmit"
    },
    {
      "anchor": "subagentstop",
      "level": 3,
      "text": "SubagentStop"
    },
    {
      "anchor": "stop",
      "level": 3,
      "text": "Stop"
    },
    {
      "anchor": "interrupt",
      "level": 3,
      "text": "Interrupt"
    },
    {
      "anchor": "schemas",
      "level": 2,
      "text": "Schemas"
    },
    {
      "anchor": "plain-text-aliases",
      "level": 3,
      "text": "Plain-text aliases"
    }
  ],
  "section": {
    "anchor": "matcher-patterns",
    "level": 2,
    "text": "Matcher patterns"
  },
  "slug": "hooks",
  "title": "Hooks",
  "truncated": true,
  "url": "https://learn.chatgpt.com/docs/hooks"
}

Quality, speed and cost, last 24 hours, across every agent call to ChatGPT and Codex docs through Alexandria.

Quality
100%
Calls answered without a tool error
Speed
876 ms
95% of successful calls finish faster
Cost
5 credits
Firecrawl credits per call
Calls
253
Last 24 hours, every Alexandria user
Quality and speed of each tool, last 24 hours
ToolQualitySpeedCalls
Search docs100%876 ms117
Get page100%876 ms95
List changelog100%754 ms32
Browse the library
//
Get started
//
Give your agent ChatGPT and Codex docs.
One API key for the live web and every provider in Alexandria.
Are you an AI agent? See setup options