Skip to content

Ask AI

🚧 Add-on Required: This API endpoint is part of the "Ask AI API" add-on and is not included in the standard Advanced plan. To access this functionality, please contact your sales representative or email sales@feedly.com.


Request

bash
POST /v3/search/rag
{
  "query": "What threat actor are targeting aeronautics ?",
  "source": {
    "items": [
      {
        "type": "entries",
        "entryIds": [
          "38osmJj08DYUmS3x7l7+I11FeVEUf+vy48X15lgs1RQ=_1991109f323:a03a8:8b15cad8"
        ]
      },
      {
        "type": "stream",
        "id": "enterprise/acme/tag/ab05aefa-9e3c-4930-b33d-9192b9569eb5"
      }
    ]
  }
}

Query parameters

ParameterRequiredDescription
newerThanfalsefilter articles crawled after the given timestamp (epoch timestamp in milliseconds)
olderThanfalsefilter articles crawled before the given timestamp (epoch timestamp in milliseconds)
streamfalseshould the response be streamed, default: false

JSON Body Parameters

ParameterRequiredDescription
querytruethe search query
sourcefalseprioritize articles from the selected sources
entityIdsfalsea list empty or of one element containing eg. cve id, malware id, cyber attack id, meme id, etc (example: ["vulnerability/m/entity/CVE-2021-44228”], ["nlp/f/cyberAttack/6c44d8f1-b8aa-453d-8b01-78a50aa588c8”], [“”]). List with multiple elements might be supported in the future. This corresponds to the endpoint for the ask ai analyze feature from a CVE, threat actor, or cyber attack insight card, as well as a memes page
agentQueriesfalsea list of agent queries. Supported type for now are vulnerabilities agent and cyber attack agent. Same as defined here . Make sure to add type: “vulnerability” or type: “cyberAttack” to the core of the json object. This corresponds to the endpoint for the ask ai analyze feature from the vulnerability agent
layersfalseprioritize articles from the selected layers and ai models. This corresponds to the endpoint for the ask ai analyze feature from the power search view. Eg; {"layers":[{"parts":[{"id":"nlp/f/entity/gz:org:microsoft"}],"type":"matches","salience":"about"}]}

Response

bash
{
    "answer": "Scattered Spider is targeting the ... ",
    "items": [
	    {
		    "id": "2GglnEO9m0CSx1NVz247J+TM4LzBemhOO7f06ZxLhQg=_197f62a6458:1a89332:84871837",
		    ...
		  },
		  ...
    ]
}
ParameterDescription
answerstrthe final answer generated
itemslistthe list json of the articles used as context to generate the answer for the generation. If article ids are manually provided, it will just be the json of the article corresponding to it

OpenAPI definition

json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Search API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.feedly.com/v3/search/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/rag": {
      "post": {
        "summary": "Ask AI",
        "description": "",
        "operationId": "search-ask-ai",
        "parameters": [
          {
            "name": "newerThan",
            "in": "query",
            "description": "Filter articles crawled after the given timestamp (epoch timestamp in milliseconds)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "olderThan",
            "in": "query",
            "description": "Filter articles crawled before the given timestamp (epoch timestamp in milliseconds)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream",
            "in": "query",
            "description": "Should the response be streamed",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "The search query",
                    "format": "json"
                  },
                  "source": {
                    "type": "string",
                    "description": "Prioritize articles from the selected sources.",
                    "format": "json"
                  },
                  "entityIds": {
                    "type": "string",
                    "description": "A list empty or of one element containing eg. cve id, malware id, cyber attack id, meme id",
                    "format": "json"
                  },
                  "agentQueries": {
                    "type": "string",
                    "description": "A list of agent queries",
                    "format": "json"
                  },
                  "layers": {
                    "type": "string",
                    "description": "Prioritize articles from the selected layers and ai models.",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "654923f1a61309001989302e:68dc4b8d448702641a73536b"
}