[纽约时报] 文章搜索 API MCP 服务器

初级

这是一个Engineering、AI RAG领域的自动化工作流,包含 5 个节点。主要使用 HttpRequestTool、McpTrigger 等节点。 [纽约时报] 文章搜索 API MCP 服务器

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "EYLulD1708dCvuLU",
  "meta": null,
  "name": "[纽约时报] 文章搜索 API MCP 服务器",
  "tags": [],
  "nodes": [
    {
      "id": "6b8f81f6-8a53-4467-a70b-e9846ced800f",
      "name": "设置说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -240
      ],
      "parameters": {
        "color": 4,
        "height": 1060,
        "content": "### ⚙️ 设置说明"
      },
      "typeVersion": 1
    },
    {
      "id": "75aaf454-5c06-4b99-9f59-940c3cd6b689",
      "name": "工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -240
      ],
      "parameters": {
        "width": 420,
        "height": 920,
        "content": "## 🛠️ 文章搜索 MCP 服务器 ✅ 1 个操作"
      },
      "typeVersion": 1
    },
    {
      "id": "b672dd36-23f0-4d3d-a134-3b053bf528eb",
      "name": "文章搜索 MCP 服务器",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -620,
        -240
      ],
      "webhookId": "4e0f198d-8dcc-4187-9155-8f8aea8640ca",
      "parameters": {
        "path": "article-search-mcp"
      },
      "typeVersion": 1
    },
    {
      "id": "c1308c48-fd1a-43a4-9a7d-bed56e41a8f8",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -100
      ],
      "parameters": {
        "color": 2,
        "width": 300,
        "height": 200,
        "content": "## 故事"
      },
      "typeVersion": 1
    },
    {
      "id": "e61da932-518a-4520-b7c9-602a36ec9b0a",
      "name": "搜索文章",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -520,
        -60
      ],
      "parameters": {
        "url": "=http://api.nytimes.com/svc/search/v2/articlesearch.json",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "queryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $fromAI('q', 'Search query term. Search is performed on the article body, headline and byline.', 'string') }}"
            },
            {
              "name": "fq",
              "value": "={{ $fromAI('fq', '\"Filtered search query using standard Lucene syntax. The filter query can be specified with or without a limiting field: label. See Filtering Your Search for more information about filtering.\"', 'string') }}"
            },
            {
              "name": "begin_date",
              "value": "={{ $fromAI('begin_date', '\"Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or later.\"', 'string') }}"
            },
            {
              "name": "end_date",
              "value": "={{ $fromAI('end_date', '\"Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or earlier.\"', 'string') }}"
            },
            {
              "name": "sort",
              "value": "={{ $fromAI('sort', '\"By default, search results are sorted by their relevance to the query term (q). Use the sort parameter to sort by pub_date.\"', 'string') }}"
            },
            {
              "name": "fl",
              "value": "={{ $fromAI('fl', '\"Comma-delimited list of fields (no limit) Limits the fields returned in your search results. By default (unless you include an fl list in your request), the following fields are returned: web_url snippet lead_paragraph abstract print_page blog source multimedia headline keywords pub_date document_type news_desk byline type_of_material _id word_count\"', 'string') }}"
            },
            {
              "name": "hl",
              "value": "={{ $fromAI('hl', 'Enables highlighting in search results. When set to true, the query term (q) is highlighted in the headline and lead_paragraph fields. Note: If highlighting is enabled, snippet will be returned even if it is not specified in your fl list.\"', 'boolean', false) }}"
            },
            {
              "name": "page",
              "value": "={{ $fromAI('page', '\"The value of page corresponds to a set of 10 results (it does not indicate the starting number of the result set). For example, page=0 corresponds to records 0-9. To return records 10-19, set page to 1, not 10.\"', 'number', 0) }}"
            },
            {
              "name": "facet_field",
              "value": "={{ $fromAI('facet_field', 'Comma-delimited list of facets Specifies the sets of facet values to include in the facets array at the end of response, which collects the facet values from all the search results. By default no facet fields will be returned. Below is the list of valid facets: section_name document_type type_of_material source day_of_week To learn more about using facets, see Using Facets.', 'string') }}"
            },
            {
              "name": "facet_filter",
              "value": "={{ $fromAI('facet_filter', 'When set to true, facet counts will respect any applied filters (fq, date range, etc.) in addition to the main query term. To filter facet counts, specifying at least one facet_field is required. To learn more about using facets, see Using Facets.', 'boolean', false) }}"
            }
          ]
        },
        "toolDescription": "Article Search\n\nParameters:\n- Query parameters:\n  • q (optional) - Search query term. Search is performed on the article body, headline and byline.\n  • fq (optional) - \"Filtered search query using standard Lucene syntax. The filter query can be specified with or without a limiting field: label. See Filtering Your Search for more information about filtering.\"\n  • begin_date (optional) - \"Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or later.\"\n  • end_date (optional) - \"Format: YYYYMMDD Restricts responses to results with publication dates of the date specified or earlier.\"\n  • sort (optional) - \"By default, search results are sorted by their relevance to the query term (q). Use the sort parameter to sort by pub_date.\"\n  • fl (optional) - \"Comma-delimited list of fields (no limit) Limits the fields returned in your search results. By default (unless you include an fl list in your request), the following fields are returned: web_url snippet lead_paragraph abstract print_page blog source multimedia headline keywords pub_date document_type news_desk byline type_of_material _id word_count\"\n  • hl (optional) - Enables highlighting in search results. When set to true, the query term (q) is highlighted in the headline and lead_paragraph fields. Note: If highlighting is enabled, snippet will be returned even if it is not specified in your fl list.\"\n  • page (optional) - \"The value of page corresponds to a set of 10 results (it does not indicate the starting number of the result set). For example, page=0 corresponds to records 0-9. To return records 10-19, set page to 1, not 10.\"\n  • facet_field (optional) - Comma-delimited list of facets Specifies the sets of facet values to include in the facets array at the end of response, which collects the facet values from all the search results. By default no facet fields will be returned. Below is the list of valid facets: section_name document_type type_of_material source day_of_week To learn more about using facets, see Using Facets.\n  • facet_filter (optional) - When set to true, facet counts will respect any applied filters (fq, date range, etc.) in addition to the main query term. To filter facet counts, specifying at least one facet_field is required. To learn more about using facets, see Using Facets."
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "shared": [
    {
      "role": "workflow:owner",
      "project": {
        "id": "G5fce9xGuBAsWBXe",
        "icon": null,
        "name": "David Ashby <david.ashby.lds@gmail.com>",
        "type": "personal",
        "createdAt": "2025-06-04T02:55:02.013Z",
        "updatedAt": "2025-06-04T02:56:01.361Z",
        "projectRelations": [
          {
            "role": "project:personalOwner",
            "user": {
              "id": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
              "role": "global:owner",
              "email": "david.ashby.lds@gmail.com",
              "disabled": false,
              "lastName": "Ashby",
              "settings": {
                "npsSurvey": {
                  "responded": true,
                  "lastShownAt": 1749357655581
                },
                "userActivated": true,
                "userActivatedAt": 1749075994495,
                "easyAIWorkflowOnboarded": true,
                "firstSuccessfulWorkflowId": "3N3vVikZb3MckFYm"
              },
              "createdAt": "2025-06-04T02:55:01.745Z",
              "firstName": "David",
              "isPending": false,
              "updatedAt": "2025-06-08T04:40:58.399Z",
              "mfaEnabled": false,
              "personalizationAnswers": {
                "version": "v4",
                "personalization_survey_n8n_version": "1.95.3",
                "personalization_survey_submitted_at": "2025-06-04T02:56:07.075Z"
              }
            },
            "userId": "715c1c00-cb48-4712-9a32-f1f4b6db2b30",
            "createdAt": "2025-06-04T02:55:02.013Z",
            "projectId": "G5fce9xGuBAsWBXe",
            "updatedAt": "2025-06-04T02:55:02.013Z"
          }
        ]
      },
      "createdAt": "2025-07-03T17:14:21.357Z",
      "projectId": "G5fce9xGuBAsWBXe",
      "updatedAt": "2025-07-03T17:14:21.357Z",
      "workflowId": "EYLulD1708dCvuLU"
    }
  ],
  "pinData": {},
  "settings": {
    "timezone": "America/New_York"
  },
  "createdAt": "2025-07-03T17:14:21.356Z",
  "updatedAt": "2025-07-03T17:16:14.000Z",
  "versionId": "9f3ca262-c9d9-49b1-9874-f9d5738f4f6b",
  "isArchived": false,
  "staticData": null,
  "connections": {
    "Search Articles": {
      "ai_tool": [
        [
          {
            "node": "Article Search MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "triggerCount": 0
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

这是一个初级难度的工作流,适用于Engineering、AI RAG等场景。适合 n8n 新手,包含 1-5 个节点的简单工作流

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
初级
节点数量5
分类2
节点类型3
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
David Ashby

David Ashby

@cfomodz

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

外部链接
在 n8n.io 上查看 →

分享此工作流