wos-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

WoS Search

WoS检索

Search Web of Science via internal API. Supports edition filtering, sorting, and multiple databases — all in a single
evaluate_script
call.
通过内部API检索Web of Science。支持版本筛选、排序以及多数据库检索——所有操作仅需一次
evaluate_script
调用。

Important: Browser Prerequisite

重要提示:浏览器前提条件

The browser must be on any
webofscience.com
page (logged in). The skill calls the WoS internal API directly via
fetch
, so no page navigation is needed.
浏览器必须处于任意
webofscience.com
页面(已登录状态)。该Skill通过
fetch
直接调用WoS内部API,因此无需页面跳转。

Language Guidance

语言说明

WoS databases (especially SCI/SSCI) primarily index English-language literature. If the user provides Chinese keywords, translate to English (e.g., "价值共创" → "value co-creation"). Inform the user about the translation.
WoS数据库(尤其是SCI/SSCI)主要收录英文文献。如果用户提供中文关键词,需先将其翻译为英文(例如:“价值共创”→“value co-creation”),并告知用户该翻译操作。

Parameter Reference

参数参考

Database (
product
)

数据库(
product

User saysproductDescription
"core collection" / default
WOSCC
WoS Core Collection
"all databases"
ALLDB
All databases combined
"medline"
MEDLINE
Biomedical literature
"preprint"
PPRN
Preprint Citation Index
"scielo"
SCIELO
SciELO Citation Index
用户表述参数值说明
"core collection" / 默认
WOSCC
WoS Core Collection
"all databases"
ALLDB
所有数据库合集
"medline"
MEDLINE
生物医学文献数据库
"preprint"
PPRN
预印本文献索引
"scielo"
SCIELO
SciELO文献索引

Edition filtering (Core Collection only)

版本筛选(仅核心合集可用)

User sayseditions value
"SCI" / "science"
WOS.SCI
"SSCI" / "social science"
WOS.SSCI
"CPCI" / "conference"
WOS.CPCI-S
,
WOS.CPCI-SSH
"all" / defaultomit
editions
field (or include all)
Multiple editions can be combined:
["WOS.SCI", "WOS.SSCI"]
用户表述editions参数值
"SCI" / "science"
WOS.SCI
"SSCI" / "social science"
WOS.SSCI
"CPCI" / "conference"
WOS.CPCI-S
,
WOS.CPCI-SSH
"all" / 默认省略
editions
字段(或包含所有值)
可组合多个版本:
["WOS.SCI", "WOS.SSCI"]

Sort options

排序选项

User sayssort value
"citations" / "most cited"
times-cited-descending
"newest" / "latest"
date-descending
"oldest"
date-ascending
"relevance" / default
relevance
"usage"
usage-count-last-180-days-descending
用户表述sort参数值
"citations" / "most cited"
times-cited-descending
"newest" / "latest"
date-descending
"oldest"
date-ascending
"relevance" / 默认
relevance
"usage"
usage-count-last-180-days-descending

Field mapping (for query rows)

字段映射(用于检索行)

User saysrowField
topic / keyword / aboutTS
titleTI
authorAU
DOIDO
journal / sourceSO
yearPY
affiliation / institutionOG
abstractAB
fundingFO
countryCU
用户表述rowField参数值
topic / keyword / aboutTS
titleTI
authorAU
DOIDO
journal / sourceSO
yearPY
affiliation / institutionOG
abstractAB
fundingFO
countryCU

Steps

操作步骤

Step 1: Build API Request Body

步骤1:构建API请求体

json
{
  "product": "WOSCC",
  "searchMode": "general",
  "viewType": "search",
  "serviceMode": "summary",
  "search": {
    "mode": "general",
    "database": "WOSCC",
    "query": [
      {"rowField": "TS", "rowText": "USER_QUERY"}
    ],
    "editions": ["WOS.SSCI"]
  },
  "retrieve": {
    "count": 10,
    "history": true,
    "jcr": true,
    "sort": "times-cited-descending",
    "analyzes": [],
    "locale": "en"
  },
  "eventMode": null
}
  • query
    : array of
    {rowField, rowText}
    objects. For multiple conditions, add
    rowBoolean
    (
    AND
    /
    OR
    /
    NOT
    ) to subsequent rows.
  • editions
    : optional, omit for all editions.
  • count
    : number of records to retrieve (default 10, max 50).
  • sort
    : default
    relevance
    .
json
{
  "product": "WOSCC",
  "searchMode": "general",
  "viewType": "search",
  "serviceMode": "summary",
  "search": {
    "mode": "general",
    "database": "WOSCC",
    "query": [
      {"rowField": "TS", "rowText": "USER_QUERY"}
    ],
    "editions": ["WOS.SSCI"]
  },
  "retrieve": {
    "count": 10,
    "history": true,
    "jcr": true,
    "sort": "times-cited-descending",
    "analyzes": [],
    "locale": "en"
  },
  "eventMode": null
}
  • query
    : 由
    {rowField, rowText}
    对象组成的数组。多条件检索时,需为后续行添加
    rowBoolean
    参数(
    AND
    /
    OR
    /
    NOT
    )。
  • editions
    : 可选参数,若需所有版本则省略该字段。
  • count
    : 需获取的记录数(默认10条,最多50条)。
  • sort
    : 默认值为
    relevance

Step 2: Execute API Call via evaluate_script

步骤2:通过evaluate_script执行API调用

This is the only tool call needed — 1 call total.
If the browser was previously on a non-WoS page (e.g., after following a publisher link), SID will be lost. In that case, first navigate back to any WoS page (
navigate_page
to
https://www.webofscience.com/wos/woscc/basic-search
) to re-establish the session, then run the API call. This adds 1 extra tool call (2 total).
Alternatively, use the URL-based fallback (Step 2B below) which always works regardless of SID state.
javascript
async () => {
  // Extract SID from network history
  const sid = performance.getEntriesByType('resource')
    .filter(r => r.name.includes('SID='))
    .map(r => r.name.match(/SID=([^&]+)/)?.[1])
    .filter(Boolean)[0] || '';

  if (!sid) return { status: 'no_session', message: 'SID lost (likely navigated to external site). Use Step 2B or navigate to any WoS page first.' };

  const response = await fetch(`/api/wosnx/core/runQuerySearch?SID=${sid}`, {
    method: 'POST',
    headers: { 'Content-Type': 'text/plain;charset=UTF-8', 'Accept': 'application/x-ndjson' },
    body: JSON.stringify({
      "product": "{PRODUCT}",
      "searchMode": "general",
      "viewType": "search",
      "serviceMode": "summary",
      "search": {
        "mode": "general",
        "database": "{PRODUCT}",
        "query": [{QUERY_ROWS}],
        "editions": [{EDITIONS}]
      },
      "retrieve": {
        "count": {COUNT},
        "history": true,
        "jcr": true,
        "sort": "{SORT}",
        "analyzes": [],
        "locale": "en"
      },
      "eventMode": null
    })
  });

  const text = await response.text();
  const lines = text.trim().split('\n').map(line => {
    try { return JSON.parse(line); } catch(e) { return null; }
  }).filter(Boolean);

  const searchInfo = lines.find(l => l.key === 'searchInfo')?.payload;
  const recordsData = lines.find(l => l.key === 'records')?.payload;

  let records = [];
  if (recordsData) {
    records = Object.entries(recordsData).map(([idx, rec]) => ({
      idx: parseInt(idx),
      wosId: rec.colluid,
      title: rec.titles?.item?.en?.[0]?.title || '',
      authors: rec.names?.author?.en?.filter(Boolean).map(a => a.wos_standard).join('; ') || '',
      source: rec.titles?.source?.en?.[0]?.title || '',
      year: rec.pub_info?.pubyear || '',
      vol: rec.pub_info?.vol || '',
      issue: rec.pub_info?.issue || '',
      pages: rec.pub_info?.page_no || '',
      doi: rec.doi || '',
      citations: rec.citation_related?.counts?.WOSCC || 0,
      citationsAll: rec.citation_related?.counts?.ALLDB || 0,
      refCount: rec.ref_count || 0,
      abstract: rec.abstract?.basic?.en?.abstract?.replace(/<[^>]*>/g, '')?.substring(0, 300) || '',
      docType: rec.doctypes?.[0] || '',
      oa: rec.oa || false
    }));
  }

  return {
    status: 'ok',
    totalResults: searchInfo?.RecordsFound || 0,
    recordsSearched: searchInfo?.RecordsSearched || 0,
    queryId: searchInfo?.QueryID || '',
    records
  };
}
仅需一次工具调用——总共1次调用。
如果浏览器之前处于非WoS页面(例如点击了出版商链接后),SID会丢失。这种情况下,需先跳转至任意WoS页面(调用
navigate_page
跳转至
https://www.webofscience.com/wos/woscc/basic-search
)以重新建立会话,然后再执行API调用。此时总共需要2次工具调用。
或者使用基于URL的备用方案(下文步骤2B),该方案不受SID状态影响,始终可用。
javascript
async () => {
  // Extract SID from network history
  const sid = performance.getEntriesByType('resource')
    .filter(r => r.name.includes('SID='))
    .map(r => r.name.match(/SID=([^&]+)/)?.[1])
    .filter(Boolean)[0] || '';

  if (!sid) return { status: 'no_session', message: 'SID lost (likely navigated to external site). Use Step 2B or navigate to any WoS page first.' };

  const response = await fetch(`/api/wosnx/core/runQuerySearch?SID=${sid}`, {
    method: 'POST',
    headers: { 'Content-Type': 'text/plain;charset=UTF-8', 'Accept': 'application/x-ndjson' },
    body: JSON.stringify({
      "product": "{PRODUCT}",
      "searchMode": "general",
      "viewType": "search",
      "serviceMode": "summary",
      "search": {
        "mode": "general",
        "database": "{PRODUCT}",
        "query": [{QUERY_ROWS}],
        "editions": [{EDITIONS}]
      },
      "retrieve": {
        "count": {COUNT},
        "history": true,
        "jcr": true,
        "sort": "{SORT}",
        "analyzes": [],
        "locale": "en"
      },
      "eventMode": null
    })
  });

  const text = await response.text();
  const lines = text.trim().split('\n').map(line => {
    try { return JSON.parse(line); } catch(e) { return null; }
  }).filter(Boolean);

  const searchInfo = lines.find(l => l.key === 'searchInfo')?.payload;
  const recordsData = lines.find(l => l.key === 'records')?.payload;

  let records = [];
  if (recordsData) {
    records = Object.entries(recordsData).map(([idx, rec]) => ({
      idx: parseInt(idx),
      wosId: rec.colluid,
      title: rec.titles?.item?.en?.[0]?.title || '',
      authors: rec.names?.author?.en?.filter(Boolean).map(a => a.wos_standard).join('; ') || '',
      source: rec.titles?.source?.en?.[0]?.title || '',
      year: rec.pub_info?.pubyear || '',
      vol: rec.pub_info?.vol || '',
      issue: rec.pub_info?.issue || '',
      pages: rec.pub_info?.page_no || '',
      doi: rec.doi || '',
      citations: rec.citation_related?.counts?.WOSCC || 0,
      citationsAll: rec.citation_related?.counts?.ALLDB || 0,
      refCount: rec.ref_count || 0,
      abstract: rec.abstract?.basic?.en?.abstract?.replace(/<[^>]*>/g, '')?.substring(0, 300) || '',
      docType: rec.doctypes?.[0] || '',
      oa: rec.oa || false
    }));
  }

  return {
    status: 'ok',
    totalResults: searchInfo?.RecordsFound || 0,
    recordsSearched: searchInfo?.RecordsSearched || 0,
    queryId: searchInfo?.QueryID || '',
    records
  };
}

Step 3: Present Results

步骤3:展示结果

Display as a table:
Found **{totalResults}** results in {database} ({edition}).
Sorted by: {sort}.

| # | Title | Authors | Source | Year | Cited | WoS ID |
|---|-------|---------|--------|------|-------|--------|
| 1 | {title} | {authors} | {source} | {year} | {citations} | {wosId} |
| ... |
Offer next actions:
  • "Use
    /wos-paper-detail {WoS ID}
    for detailed information"
  • "Use
    /wos-export
    to export results"
  • To see more results, re-run with higher
    count
    or use
    /wos-navigate-pages
以表格形式展示:
在{database}({edition})中找到**{totalResults}**条结果。
排序方式:{sort}。

| 序号 | 标题 | 作者 | 来源 | 年份 | 被引次数 | WoS ID |
|---|-------|---------|--------|------|-------|--------|
| 1 | {title} | {authors} | {source} | {year} | {citations} | {wosId} |
| ... |
提供后续操作选项:
  • “使用
    /wos-paper-detail {WoS ID}
    获取详细信息”
  • “使用
    /wos-export
    导出结果”
  • 如需查看更多结果,可重新调用并提高
    count
    参数值,或使用
    /wos-navigate-pages

Step 2B: URL-based Fallback (when SID is lost)

步骤2B:基于URL的备用方案(当SID丢失时)

If API returns
no_session
(e.g., after navigating to an external publisher site), fall back to URL navigation:
navigate_page({
  url: "https://www.webofscience.com/wos/{db}/general-summary?queryJson={ENCODED_QUERY_JSON}",
  initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
})
Then extract results via
evaluate_script
with DOM selectors (see
wos-parse-results
Mode B), or re-attempt the API call (SID will be re-established after the navigation).
When to use: After the browser visited an external site (publisher, DOI link, etc.) and
performance.getEntriesByType('resource')
no longer contains WoS SID entries.
如果API返回
no_session
(例如跳转至外部出版商网站后),可切换至URL跳转方案:
navigate_page({
  url: "https://www.webofscience.com/wos/{db}/general-summary?queryJson={ENCODED_QUERY_JSON}",
  initScript: "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
})
随后可通过
evaluate_script
结合DOM选择器提取结果(参考
wos-parse-results
模式B),或重新尝试API调用(跳转后SID会重新建立)。
适用场景:浏览器访问过外部网站(出版商、DOI链接等),且
performance.getEntriesByType('resource')
中不再包含WoS的SID条目时。

Notes

注意事项

  • 1 tool call (API) or 2 tool calls (navigate + API/DOM) if SID is lost
  • API returns NDJSON (newline-delimited JSON); parse line by line
  • SID is extracted from browser's performance resource entries
  • SID loss: Navigating to external sites clears performance entries. Recover by navigating to any WoS page first, or use URL-based fallback (Step 2B)
  • editions
    field uses format
    WOS.SCI
    ,
    WOS.SSCI
    ,
    WOS.CPCI-S
    , etc.
  • For Chinese keywords in SCI/SSCI, translate to English first
  • Max 50 records per request; use
    retrieve.count
    to control
  • history: true
    saves the search to WoS session history
  • 正常情况1次工具调用(API),若SID丢失则需2次工具调用(跳转+API/DOM解析)
  • API返回NDJSON(换行分隔JSON);需逐行解析
  • SID从浏览器的性能资源条目提取
  • SID丢失:跳转至外部网站会清除性能条目。可通过跳转至任意WoS页面恢复,或使用基于URL的备用方案(步骤2B)
  • editions
    字段格式为
    WOS.SCI
    WOS.SSCI
    WOS.CPCI-S
  • 针对SCI/SSCI中的中文关键词,需先翻译为英文
  • 每次请求最多获取50条记录;通过
    retrieve.count
    参数控制
  • history: true
    会将检索记录保存至WoS会话历史