You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何检索带有<chem>与<math chem>标签的维基百科条目

How to Find Wikipedia Articles Using <chem> and <math chem> Tags

Since regular Wikipedia search ignores angle brackets like < and >, you need more targeted tools to track down articles with these chemistry-specific tags. Here are three reliable, actionable methods:

  • Use Wikipedia's Advanced Search
    This is the simplest no-code approach. Head to Wikipedia's advanced search interface, then locate the "Page content" section. Enter <chem> directly into the text box, or combine both tags with the OR operator: <chem> OR <math chem>. To filter out talk pages, user pages, and other non-article content, set the "Namespace" dropdown to "Article" before running the search. This tool respects the angle brackets and returns pages where the raw edit content includes those exact tags.

  • Leverage the Wikipedia API
    For more control (or to automate the search), use the Wikipedia API with custom search parameters. You can target pages containing the tags using the insource: prefix. For example, a query like insource:"<chem>" OR insource:"<math chem>" will pull up pages with either tag. To restrict results to main-space articles (the core Wikipedia content), add srnamespace=0 to your API request. You can test this directly in the API sandbox or build a simple script to fetch results programmatically.

  • Query with Wikidata SPARQL
    If you’re comfortable with structured queries, Wikidata’s SPARQL endpoint lets you retrieve articles based on their raw content. A basic query to find articles with either tag would look like this:

    SELECT ?article ?articleLabel WHERE {
      ?article schema:about ?item ;
               schema:isPartOf <https://en.wikipedia.org/> ;
               schema:text ?text .
      FILTER (CONTAINS(?text, "<chem>") || CONTAINS(?text, "<math chem>"))
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    }
    

    This returns English Wikipedia articles with the tags, along with their human-readable labels for clarity.

A quick note: All these methods target the raw edit content of pages (where <chem> and <math chem> tags are stored), not the rendered view. So you’ll get exactly the pages where editors used these chemistry formatting tags.

内容的提问来源于stack exchange,提问作者mhchem

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:05:18