InfraNodus API Documentation


All InfraNodus subscribers can use the API to generate AI advice and a knowledge graph from any text. The insights include advanced network graph analytics measures, such as clusters of concepts (topical communities), word rankings, content gaps, and latent concepts. These insights can be used to better understand the data and to augment AI prompts for better RAG results with the underlying knowledge graph data.

Some of the endpoints are also available via RapidAPI, which provides OpenAPI schemas that you can feed to your AI development tools.

Authorization

To authorize, obtain your API token at https://infranodus.com/api-access

Add this API token to your request header:

Authorization: Bearer your_api_token_here

Python example:

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
}

Note: We do provide, at our own discretion, an ability to make several requests for free without using the API key. You won't be able to access all the functions, but you can use it to try the InfraNodus API. For production you absolutely need to get the API key to avoid failures and rate limiting. If you don't have an account, we do offer 14-day free trial.

1. Obtain Graph, Statements, and Graph Summary

Submit text as a string or array of statements (POST) and obtain a graph and statements JSON object, plus a graph summary with insights about topical clusters, main concepts, gaps, and conceptual gateways. Alternatively, specify an existing graph name to generate a knowledge graph JSON and summary for AI RAG workflows.

POST https://infranodus.com/api/v1/graphAndStatements
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
includeStatements: boolean (default: true)
includeGraphSummary: boolean (default: false)
extendedGraphSummary: boolean (default: true)
includeGraph: boolean (default: true)
gapDepth: number (default: 0) // increase up to 3 to iterate through gaps
compactStatements: boolean (default: false)
compactGraph: boolean (default: false)
Privacy Notice

By default (doNotSave=true), your text will NOT be saved. No logs are kept. Processing happens on InfraNodus EU servers (AWS Ireland). If you use AI features (aiTopics), only the concepts in top clusters (not your content) are sent to OpenAI.

Request Body
{
    "name": "name_of_your_graph",
    "text": "text_string_to_process",
    "statements": ["statement 1", "statement 2"],
    "timestamps": [],
    "aiTopics": false,
    "modifyAnalyzedText": "",
    "replaceEntities": false,
    "contextType": "STANDARD",
    "userName": ""
}

If statements is submitted, it overrides text. If neither is specified, InfraNodus retrieves the existing graph by name.

Text Processing Settings (optional)
"contextSettings": {
    "partOfSpeechToProcess": "HASHTAGS_AND_WORDS",
    "doubleSquarebracketsProcessing": "PROCESS_AS_MENTIONS",
    "squareBracketsProcessing": "IGNORE_BRACKETS",
    "mentionsProcessing": "CONNECT_TO_ALL_CONCEPTS"
}
Response

JSON format following the InfraNodus schema. Includes a modified Graphology JSON graph compatible with Graphology, Gephi, and Sigma.Js.

2. Obtain AI-Generated Advice for a Text

Submit plain text and obtain an AI-generated question, statement, or summary that uses the underlying graph structure for precise results.

POST https://infranodus.com/api/v1/graphAndAdvice
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
optimize: string ('develop' | 'reinforce' | 'gap' | 'imagine')
transcend: boolean // do not include graph structure into prompt
includeStatements: boolean (default: false)
includeGraphSummary: boolean (default: false)
extendedGraphSummary: boolean (default: true)
includeGraph: boolean (default: true)
gapDepth: integer (default: 0)
extendedAdvice: boolean (default: false)

Optimize modes:

develop — top nodes from all clusters, helping develop the discourse
reinforce — top nodes from top clusters, reinforcing the discourse
gaps — bridges gaps in the graph structure; uses gapDepth for deeper exploration
latent — finds ideal entry points to connect the discourse to other discourses

Request Body
{
    "name": "name_of_your_graph",
    "text": "text string to process",
    "requestMode": "question",
    "modelToUse": "gpt-4o",
    "pinnedNodes": ["node1", "node2"],
    "prompt": "what is this text about?",
    "promptChatContext": [],
    "aiTopics": false,
    "modifyAnalyzedText": "",
    "replaceEntities": false,
    "stopwords": [],
    "systemPrompt": ""
}

requestMode options: 'question', 'idea', 'fact', 'continue', 'challenge', 'response', 'gptchat', 'summary', 'graph summary', 'reprompt'

Response
{
    "aiAdvice": [
        {
            "text": "AI-generated response text...",
            "finish_reason": "stop"
        }
    ],
    "graph": { "graphologyGraph": {} },
    "statements": [],
    "usage": 338,
    "created_timestamp": 1722261741
}

3. Generate DOT Graph and GraphSummary

Ingest plain text or a Graphology JSON graph and get a compact DOT graph representation plus a graphSummary string, both suitable for forwarding to LLM models as context.

POST https://infranodus.com/api/v1/dotGraph
POST https://infranodus.com/api/v1/dotGraphFromText
Query Parameters
optimize: string ('auto' | 'reinforce' | 'develop' | 'gaps' | 'latent')
includeGraph: boolean (default: false)
includeGraphSummary: boolean (default: true)
extendedGraphSummary: boolean (default: true)
Request Body (for /dotGraphFromText)
{
    "name": "name of the text",
    "text": "apple and oranges are delicious fruits",
    "stopwords": ["car", "tool"],
    "aiTopics": true
}
Response
{
    "graphKeywords": "apple <-> orange [label=\"delicious, fruit\"]...",
    "clusterIds": [],
    "clusterKeywords": "\"delicious orange apple fruit\" and \"lemon make sense\"",
    "allClusters": [
        { "text": "delicious orange apple fruit" },
        { "text": "lemon make sense" }
    ],
    "graphSummary": "",
    "bigrams": [
        "orange <-> delicious",
        "apple <-> orange",
        "delicious <-> fruit"
    ]
}

4. AI-Generated Advice from Knowledge Graph

Submit a knowledge graph in InfraNodus/Graphology format and obtain an AI-generated question or idea that leverages the structural and semantic information.

POST https://infranodus.com/api/v1/graphAiAdvice
Query Parameters
optimize: string ('gaps' | 'reinforce' | 'develop' | 'imagine')
transcend: boolean // go beyond the graph structure
Request Body
{
    "prompt": "What connections exist between these concepts?",
    "userPrompt": [{ "role": "user", "content": "prompt text" }],
    "promptContext": "",
    "promptChatContext": [],
    "requestMode": "question",
    "language": "EN",
    "modelToUse": "gpt-4",
    "pinnedNodes": [],
    "topicsToProcess": [],
    "graph": {
        "nodes": [],
        "edges": [],
        "attributes": {
            "top_nodes": [],
            "top_clusters": [],
            "gaps": [],
            "statementHashtags": []
        }
    },
    "statements": []
}
Response
{
    "aiAdvice": [
        {
            "text": "AI-generated insight...",
            "finish_reason": "stop"
        }
    ],
    "usage": 338,
    "created_timestamp": 1722261741
}

5. List Existing Graphs

Retrieve all graphs created by a user with various filters (favorite, name, date, type, language).

POST https://infranodus.com/api/v1/listGraphs
Request Body
Parameter Type Description
query string Search term(s) to match against contextName and description
type string Filter by contextType (e.g. "CSV", "GOOGLE", "STANDARD")
fromDate string (ISO) Filter graphs created on or after this date
toDate string (ISO) Filter graphs created on or before this date
language string Filter by language code (e.g. "EN", "DE")
favorite boolean Filter by favorite status

Use comma-separated values for OR logic: "csv,google" matches CSV or GOOGLE.

{
    "query": "expert,ontology",
    "type": "STANDARD",
    "language": "EN"
}

6. Search Statements and Build Graph

Submit a search term and get all matching statements, then build a graph from them.

POST https://infranodus.com/api/v1/search
Request Body
{
    "query": "graphrag",
    "contextNames": "",
    "userName": "",
    "maxNodes": 150,
    "showContexts": false
}
Response

Returns a list of statements and a graph in JSON format following the InfraNodus return object schema.

7. Compare Graphs of Multiple Contexts

Submit several contexts (existing graphs, statement arrays, or text strings) and obtain a graph that merges them, shows overlap, or highlights differences.

POST https://infranodus.com/api/v1/compareGraphs
Query Parameters
doNotSave: boolean (default: true)
addStats: boolean (default: true)
includeStatements: boolean (default: false)
includeGraphSummary: boolean (default: false)
includeGraph: boolean (default: true)
mode: string ('merge' | 'overlap' | 'difference')
Request Body
{
    "contexts": [
        { "text": "first text to compare" },
        { "text": "second text to compare" },
        { "name": "existing_graph_name" }
    ]
}

Each context can be provided as text (plain text string), name (existing graph name), or statements (array). For the full specification, see the complete API documentation.

8. AI-Generated Advice for Several Graphs or Their Difference

Submit plain texts, existing contexts, or arrays of statements and obtain AI-generated advice that takes the underlying graph structure (or the difference of the graphs) into account.

POST https://infranodus.com/api/v1/graphsAndAiAdvice
Query Parameters

Same parameters as the graphAndAdvice endpoint (#2), plus the compareMode parameter from the compareGraphs endpoint (#7).

Request Body

Contexts should follow the same format as the compareGraphs endpoint (#7). You can also include body parameters from the graphAndAdvice endpoint (#2).

const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/graphsAndAiAdvice'
  + '?doNotSave=true&addStats=true&optimize=gaps';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    contexts: [
      { text: 'First text to analyze' },
      { text: 'Second text to compare' }
    ],
    requestMode: 'question',
    compareMode: 'difference'
  })
});

const data = await response.json();
console.log(data.aiAdvice);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/graphsAndAiAdvice',
    params={'doNotSave': 'true', 'addStats': 'true', 'optimize': 'gaps'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'contexts': [
            {'text': 'First text to analyze'},
            {'text': 'Second text to compare'}
        ],
        'requestMode': 'question',
        'compareMode': 'difference'
    }
)

data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/graphsAndAiAdvice?\
doNotSave=true&addStats=true&optimize=gaps" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contexts": [
      {"text": "First text to analyze"},
      {"text": "Second text to compare"}
    ],
    "requestMode": "question",
    "compareMode": "difference"
  }'
const url = 'https://infranodus.com/api/v1/graphsAndAiAdvice'
  + '?doNotSave=true&addStats=true&optimize=gaps';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    contexts: [
      { text: 'First text to analyze' },
      { text: 'Second text to compare' }
    ],
    requestMode: 'question',
    compareMode: 'difference'
  })
});

const data = await response.json();
console.log(data.aiAdvice);

9. Build a Graph of Google Search Results

Submit a search query to generate a knowledge graph of the top Google search results. Useful for getting an overview of the current informational supply, finding content gaps, performing SEO optimization, and integrating search results data into LLM workflows.

POST https://infranodus.com/api/v1/import/googleSearchResultsGraph
Query Parameters
doNotSave: boolean (default: false)
// plus other parameters from the graphAndStatements endpoint (#1)
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "doNotAddGraph": false,
    "importCountry": "US",
    "importLanguage": "AUTO"
}
const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/import/googleSearchResultsGraph'
  + '?doNotSave=true&addStats=true&compactGraph=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    importCountry: 'US',
    importLanguage: 'EN'
  })
});

const data = await response.json();
console.log(data.entriesAndGraphOfContext);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchResultsGraph',
    params={'doNotSave': 'true', 'addStats': 'true', 'compactGraph': 'true'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True,
        'importCountry': 'US',
        'importLanguage': 'EN'
    }
)

data = response.json()
print(data['entriesAndGraphOfContext'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchResultsGraph?\
doNotSave=true&addStats=true&compactGraph=true" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "importCountry": "US",
    "importLanguage": "EN"
  }'
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsGraph'
  + '?doNotSave=true&addStats=true&compactGraph=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    importCountry: 'US',
    importLanguage: 'EN'
  })
});

const data = await response.json();
console.log(data.entriesAndGraphOfContext);
Response
{
    "entriesAndGraphOfContext": {
        "statements": [{
            "content": "Statement content",
            "categories": ["category 1", "category 2"]
        }],
        "graph": {
            "nodes": [],
            "edges": [],
            "graph": { "nodes_to_statements_map": {} }
        }
    }
}

10. AI Advice for Google Search Results

Get AI-generated advice and research questions based on topical clusters or content gaps identified in Google search results for a query.

POST https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice
Query Parameters
doNotSave: boolean (default: false)
// plus other parameters from the graphAndAdvice endpoint (#2)
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question",
    "importCountry": "US",
    "importLanguage": "AUTO"
}
const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice'
  + '?doNotSave=true&optimize=gaps';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    requestMode: 'question'
  })
});

const data = await response.json();
console.log(data.aiAdvice);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice',
    params={'doNotSave': 'true', 'optimize': 'gaps'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True,
        'requestMode': 'question'
    }
)

data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice?\
doNotSave=true&optimize=gaps" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question"
  }'
const url = 'https://infranodus.com/api/v1/import/googleSearchResultsAiAdvice'
  + '?doNotSave=true&optimize=gaps';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    requestMode: 'question'
  })
});

const data = await response.json();
console.log(data.aiAdvice);
Response

Same structure as the graphAndAdvice endpoint (#2) response.

11. Build a Graph of Search Intent

Submit a search query to generate a knowledge graph of related keywords (from Google's suggested keywords or AdWords recommendations) that people use to search for this topic. Useful for understanding informational demand, finding topical clusters and related keywords, and SEO optimization.

POST https://infranodus.com/api/v1/import/googleSearchIntentGraph
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "doNotAddGraph": false,
    "keywordsSource": "related",
    "importCountry": "US",
    "importLanguage": "AUTO"
}
const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/import/googleSearchIntentGraph'
  + '?doNotSave=true&addStats=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    keywordsSource: 'related',
    importCountry: 'US'
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchIntentGraph',
    params={'doNotSave': 'true', 'addStats': 'true'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True,
        'keywordsSource': 'related',
        'importCountry': 'US'
    }
)

data = response.json()
print(data)
curl -X POST "https://infranodus.com/api/v1/import/googleSearchIntentGraph?\
doNotSave=true&addStats=true" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "keywordsSource": "related",
    "importCountry": "US"
  }'
const url = 'https://infranodus.com/api/v1/import/googleSearchIntentGraph'
  + '?doNotSave=true&addStats=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    keywordsSource: 'related',
    importCountry: 'US'
  })
});

const data = await response.json();
console.log(data);
Response

Returns a list of statements and a graph in JSON format following the InfraNodus return object schema.

12. AI Advice for Search Intent

Get AI-generated advice and research questions based on topical clusters or content gaps identified in suggested Google search queries. Useful for generating ideas based on current informational demand.

POST https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question",
    "keywordsSource": "related"
}
const fetch = require('node-fetch');

const response = await fetch(
  'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?doNotSave=true',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer your_api_token_here'
    },
    body: JSON.stringify({
      searchQuery: 'graphrag',
      aiTopics: true,
      requestMode: 'question',
      keywordsSource: 'related'
    })
  }
);

const data = await response.json();
console.log(data.aiAdvice);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice',
    params={'doNotSave': 'true'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True,
        'requestMode': 'question',
        'keywordsSource': 'related'
    }
)

data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?\
doNotSave=true" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question",
    "keywordsSource": "related"
  }'
const response = await fetch(
  'https://infranodus.com/api/v1/import/googleSearchIntentAiAdvice?doNotSave=true',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer your_api_token_here'
    },
    body: JSON.stringify({
      searchQuery: 'graphrag',
      aiTopics: true,
      requestMode: 'question',
      keywordsSource: 'related'
    })
  }
);

const data = await response.json();
console.log(data.aiAdvice);
Response

Same structure as the graphAndAdvice endpoint (#2) response.

13. Compare Search Results vs. Search Intent

Generate a graph showing relations that exist in search intent but not in search results, along with topical clusters and content gaps. Useful for understanding what people search for but don't find and adjusting content strategy to cater to underserved niches.

POST https://infranodus.com/api/v1/import/googleSearchVsIntentGraph
Query Parameters
compareMode: string ('difference' | 'difference_nodes')
// plus other parameters from the graphAndStatements endpoint (#1)
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true
}
const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph'
  + '?compareMode=difference&doNotSave=true&addStats=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph',
    params={'compareMode': 'difference', 'doNotSave': 'true', 'addStats': 'true'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True
    }
)

data = response.json()
print(data)
curl -X POST "https://infranodus.com/api/v1/import/googleSearchVsIntentGraph?\
compareMode=difference&doNotSave=true&addStats=true" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true
  }'
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentGraph'
  + '?compareMode=difference&doNotSave=true&addStats=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true
  })
});

const data = await response.json();
console.log(data);

14. AI Advice on Search Results vs. Search Intent

Get AI-generated advice and research questions based on the graph of what people search for but don't find. Useful for generating ideas based on informational demand not catered to by current supply.

POST https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice
Query Parameters
compareMode: string ('difference' | 'difference_nodes')
// plus other parameters from the graphAndAdvice endpoint (#2)
Request Body
{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question",
    "keywordsSource": "related"
}
const fetch = require('node-fetch');

const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice'
  + '?compareMode=difference&doNotSave=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    requestMode: 'question',
    keywordsSource: 'related'
  })
});

const data = await response.json();
console.log(data.aiAdvice);
import requests

response = requests.post(
    'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice',
    params={'compareMode': 'difference', 'doNotSave': 'true'},
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer your_api_token_here'
    },
    json={
        'searchQuery': 'graphrag',
        'aiTopics': True,
        'requestMode': 'question',
        'keywordsSource': 'related'
    }
)

data = response.json()
print(data['aiAdvice'])
curl -X POST "https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice?\
compareMode=difference&doNotSave=true" \
  -H "Authorization: Bearer your_api_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "graphrag",
    "aiTopics": true,
    "requestMode": "question",
    "keywordsSource": "related"
  }'
const url = 'https://infranodus.com/api/v1/import/googleSearchVsIntentAiAdvice'
  + '?compareMode=difference&doNotSave=true';

const response = await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_token_here'
  },
  body: JSON.stringify({
    searchQuery: 'graphrag',
    aiTopics: true,
    requestMode: 'question',
    keywordsSource: 'related'
  })
});

const data = await response.json();
console.log(data.aiAdvice);
Response

Same structure as the graphAndAdvice endpoint (#2) response.

Appendix 1: AI Request Types

The requestMode parameter controls what kind of insight the model generates. It influences the final prompt sent to the LLM.

Value Description
summary Generates a summary augmented with graph structure and your custom prompt
graph summary Generates summaries for each topical cluster. Use with aiTopics=true for best results
question Generates a question that bridges structural gaps in the graph
paraphrase Extracts the graph's structure and paraphrases main topics in one paragraph
outline Generates a title and article outline based on the graph's structure
continue Generates a statement connecting concepts in the prompt using the graph structure
response Direct response to the prompt, taking graph structure and conversation context into account
idea Generates an innovative idea that bridges structural gaps in the graph
fact Generates a factual statement that bridges structural gaps in the graph
challenge Generates a challenging statement that bridges structural gaps in the graph
reprompt Rewrites your original prompt using context information — useful for GraphRAG prompt augmentation
custom Uses your own prompt from the prompt parameter. The graph data is appended automatically, so adjust your prompt accordingly
transcend Selects topical clusters based on the optimize value (or content gaps by default) and then generates ideas that go beyond the graph structure — while still taking the identified topics and conceptual gateways into account. Useful for exploring how the discourse connects to broader themes and for generating novel perspectives that are informed by the graph but not constrained by it

Appendix 2: Optimize Modes

The optimize query parameter controls how the algorithm selects which parts of the knowledge graph to focus on when generating AI advice. Each mode uses a different strategy based on the graph's topical structure.

Value Description
develop Gets the top nodes from all clusters of the graph, helping develop the current discourse broadly. If pinnedNodes or topicsToProcess are provided, it focuses on those instead.
reinforce Gets the top nodes from the top clusters only, reinforcing the dominant themes of the current discourse.
gaps Identifies structural gaps in the graph and directs the prompt to bridge them. When the graph is diverse, focuses on the most common gap. When highly connected, encourages exploring the least connected topics on the periphery. Use the gapDepth parameter (0–3) to reach deeper, less obvious gaps — higher values select further gaps with smaller topics in focus.
latent Identifies the least represented topical clusters and attempts to bridge them, bringing underdeveloped areas of the discourse into focus.
imagine Identifies the least represented clusters and the ideal entry points into the graph — nodes with the highest ratio of influence (betweenness centrality) to degree. These conceptual gateways can potentially connect the text to other discourses, helping explore beyond the periphery.
optimize Analyzes the level of bias and coherence in the text network structure automatically. If the structure is too biased, it focuses on the least represented topics. If focused or diversified, it develops the content gaps. If dispersed, it develops the most common gap topics. This is the best choice when you want the algorithm to adapt to the text automatically.