ClaudeCloudflare Developer PlatformApr 8, 2026, 12:00 AM

AI Search - Website Source CSS content selectors for precise content extraction in AI Search

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-sonnet-4-20250514

AI Search adds CSS content selectors for precise website content extraction

Key Points

  • CSS selectors for precise content extraction
  • URL glob pattern matching support
  • Up to 10 content selector entries per instance

Summary

Cloudflare AI Search now supports CSS content selectors for website data sources, enabling precise extraction of relevant content while filtering out navigation, sidebars, and other boilerplate elements.

Key Points

  • Selective content extraction: Define CSS selectors paired with URL glob patterns to specify which parts of crawled pages are indexed
  • Pattern matching: When a page URL matches a glob pattern, only elements matching the corresponding CSS selector are extracted and converted to Markdown
  • Configuration options: Set up content selectors via dashboard or API with support for up to 10 selector entries per instance
  • Evaluation order: Selectors are processed sequentially with first matching pattern taking precedence
  • API integration: Full API support for programmatic configuration of content selectors

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-sonnet-4-20250514

AI Search - 正確なコンテンツ抽出のためのWebサイトソースCSSコンテンツセレクター

Changelog

Cloudflareの新しいアップデートと改善。RSSを購読 RSSフィードを表示

← すべての投稿に戻る

AI SearchでのWebサイトソースCSSコンテンツセレクターによる正確なコンテンツ抽出

2026年4月8日

AI Search

AI SearchがWebサイトデータソース用のCSSコンテンツセレクターをサポートするようになりました。URLグロブパターンと組み合わせたCSSセレクターを指定することで、クロールされたページのどの部分を抽出してインデックス化するかを定義できるようになりました。

コンテンツセレクターは、ナビゲーション、サイドバー、フッター、その他の定型文を無視しながら、関連するコンテンツのみをインデックス化する問題を解決します。

ページのURLがグロブパターンにマッチした場合、対応するCSSセレクターにマッチする要素のみが抽出され、インデックス化のためにMarkdownに変換されます。

ダッシュボードまたはAPIを介してコンテンツセレクターを設定できます:

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai-search/instances" \
  -H "Authorization: Bearer {api_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-ai-search",
    "source": "https://example.com",
    "type": "web-crawler",
    "source_params": {
      "web_crawler": {
        "parse_options": {
          "content_selector": [
            {
              "path": "**/blog/**",
              "selector": "article .post-body"
            }
          ]
        }
      }
    }
  }'

セレクターは順番に評価され、最初にマッチしたパターンが適用されます。インスタンスごとに最大10個のコンテンツセレクターエントリを定義できます。

設定の詳細と例については、コンテンツセレクターのドキュメントを参照してください。

リソース

  • API

Cloudflareが初めてですか?

  • Directory
  • Sponsorships
  • Open Source
  • Support
  • Help Center
  • System Status
  • Compliance
  • GDPR

Company

  • cloudflare.com
  • Our team
  • Careers

Tools

  • Cloudflare Radar
  • Speed Test
  • Is BGP Safe Yet?
  • RPKI Toolkit
  • Certificate Transparency

Community

  • X
  • Discord
  • YouTube
  • GitHub

© 2026 Cloudflare, Inc. Privacy Policy Terms of Use Report Security Issues Trademark Cookie Settings

これは役に立ちましたか? はい いいえ