{
  "id": "qExvN2hGizkLq6TF",
  "name": "Kagi News - Get",
  "tags": [
    {
      "id": "Aaa1egWKdddg7ajn",
      "name": "subworkflow",
      "createdAt": "2025-10-05T11:03:01.663Z",
      "updatedAt": "2025-10-05T11:03:01.663Z"
    }
  ],
  "nodes": [
    {
      "id": "e680b236-fe1d-49ca-986b-39fe566345b8",
      "name": "Start",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -176,
        704
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "category"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "336dae60-4e2f-437e-9aeb-766b37249faa",
      "name": "Get Latest Categories",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        48,
        704
      ],
      "parameters": {
        "url": "https://kite.kagi.com/api/batches/latest/categories",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "cb901a65-2185-406c-bc02-f5c818d0a146",
      "name": "Split Categories",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        272,
        704
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "categories"
      },
      "typeVersion": 1
    },
    {
      "id": "b214244c-f0cc-49d1-ab1d-86939d1657a1",
      "name": "Filter by wanted category",
      "type": "n8n-nodes-base.filter",
      "position": [
        496,
        704
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2be80603-43a8-4866-a968-fe36c1a2427a",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.categoryName }}",
              "rightValue": "={{ $('Start').item.json.category }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "6e1436bf-4319-455d-8a54-bc362243e645",
      "name": "Get Stories in Category",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        704
      ],
      "parameters": {
        "url": "=https://kite.kagi.com/api/batches/latest/categories/{{ $json.id }}/stories?lang=en",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "af7a2c6f-bf5c-4fe2-85f1-61d2e97fc1f0",
      "name": "Split out stories",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1168,
        704
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "stories"
      },
      "typeVersion": 1
    },
    {
      "id": "a635706a-5a2d-4245-84ff-64a446b4ce5f",
      "name": "Pick only title",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        704
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88973abc-91b7-494c-8bec-d705328f65f5",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9e84fcbb-ce4d-463d-bb59-ab4b00c20bea",
      "name": "Limit to 1 category",
      "type": "n8n-nodes-base.limit",
      "position": [
        720,
        704
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "eafffa3d-fc83-4879-b58c-2f164102175c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        256
      ],
      "parameters": {
        "width": 304,
        "height": 624,
        "content": "## Try it out!\n\nThis is meant to be used in other workflows, but you can manually trigger it by setting a `category` in the `Start` node.\n\n# How it works\n\n- We hit the Kagi News API twice\n-- once to get the category ID\n-- and once to get the stories in that category\n- We then do any changes we need to the output, to pick out just the information we are interested in\n\n# Requirements\n- Nothing!"
      },
      "typeVersion": 1
    },
    {
      "id": "d205f078-dbfa-48df-a6df-d8f6942dcfee",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        624
      ],
      "parameters": {
        "content": "## Get available categories"
      },
      "typeVersion": 1
    },
    {
      "id": "0d6ca507-2024-459a-a94a-49fb46369714",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        624
      ],
      "parameters": {
        "width": 608,
        "content": "## Find the category you want"
      },
      "typeVersion": 1
    },
    {
      "id": "58209a48-39dd-427b-bda5-bbd33b1c9c2c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        624
      ],
      "parameters": {
        "width": 448,
        "content": "## Get the stories in that category"
      },
      "typeVersion": 1
    },
    {
      "id": "130d0520-29e7-4bfa-9ecc-710973074220",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        624
      ],
      "parameters": {
        "content": "## Extract details I am interested in"
      },
      "typeVersion": 1
    },
    {
      "id": "6639180c-cbc8-4856-a2e9-c6e9e14ff1b0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        848
      ],
      "parameters": {
        "color": 7,
        "height": 96,
        "content": "Here I am only extracting the title, but you can also get the summary, maybe the talking points, and so on."
      },
      "typeVersion": 1
    },
    {
      "id": "72fb9837-8712-417d-8c2b-8cc77125599b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        848
      ],
      "parameters": {
        "color": 7,
        "height": 96,
        "content": "This is the only call to a remote service."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "783ec830-2bc0-49bf-82d5-ab387ec7033a",
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get Latest Categories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Categories": {
      "main": [
        [
          {
            "node": "Filter by wanted category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split out stories": {
      "main": [
        [
          {
            "node": "Pick only title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to 1 category": {
      "main": [
        [
          {
            "node": "Get Stories in Category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Latest Categories": {
      "main": [
        [
          {
            "node": "Split Categories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Stories in Category": {
      "main": [
        [
          {
            "node": "Split out stories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by wanted category": {
      "main": [
        [
          {
            "node": "Limit to 1 category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}