Skip to main content
The AiSearchEntity is a unified entity designed to enable AI-driven search capabilities within the Tedi API. This entity allows you to send search prompts to various AI search providers and receive structured responses that include citations, sources, and relevant paragraphs. We use High-Level Scraping (HLS) techniques to extract and structure information from AI search results, providing comprehensive and organized responses that can be easily integrated into your applications.

Supported Providers

ProviderDescription
ai-modeGoogle AI Mode - AI-generated answers integrated into Google Search
ai-overviewGoogle AI Overview - AI summaries displayed at the top of search results
chatgptChatGPT Search - OpenAI’s ChatGPT with real-time web search capabilities
copilotMicrosoft Copilot - Microsoft’s AI assistant powered by GPT with web search
perplexityPerplexity - AI search engine with real-time web information
geminiGoogle Gemini - Google’s AI assistant with search capabilities
grokGrok - xAI’s AI assistant with real-time information access
Screenshots Deprecated: The screenshots field has been deprecated and is no longer supported for performance reasons. All AI search endpoints no longer return screenshot data.
Parameter Renamed: The query parameter has been renamed to prompt across all AI search endpoints. Please update your API calls accordingly.
Request Timeout: AI search requests have a timeout of 45 minutes. Complex queries or high-traffic periods may require longer processing times.
Copilot Performance: Microsoft Copilot scraping is currently slower than other providers. We are actively working on optimizations.

Definition

Below are the key definitions for the AiSearchEntity:
interface AiSearchEntity {
  prompt: string;
  countryCode?: string;
  languageCode?: string;
  webSearch?: boolean;
  providers?: Provider[];
  fields?: {
    citations?: keyof Citation[];
    sources?: keyof Source[];
    paragraphs?: {
      text: string;
      citations: keyof Citation[];
    }; 
  };
}
PropertyDefaultDescription
prompt-Required. The search prompt to be sent to the AI search provider (formerly query).
countryCodeatOptional. ISO 3166-1 alpha-2 country code to tailor search results based on geographic location (e.g., us, de, uk).
languageCodeenOptional. ISO 639-1 language code to tailor search results based on language (e.g., en, de, es).
webSearchtrueOptional. Boolean indicating whether to include web search results. Only applicable for ChatGPT Search.
providers[]Optional. Array of provider names to specify which AI search providers to query.
fields-Optional. Object specifying which fields to include in the response (citations, sources, paragraphs).
All AI search endpoints return the same response structure, providing developers with a unified experience across different AI search providers.

Response Structure

The response from the AiSearchEntity includes the following fields:
{
  "text": "Hier sind einige Barf-Shops ...",
  "markdown": "Hier sind einige **Barf-Shops und Geschäfte mit hochwertigen Hundefutter-Angeboten** ...",
  "model": "gpt-5-2",
  "sources": [
    {
      "url": "https://www.barfhouse.de/?utm_source=chatgpt.com",
      "title": "BarfHouse | Dein Online BARF Store",
      "snippet": "Um unseren Store in vollem Umfang nutzen zu ...",
      "rank": 3,
      "datePublished": "2026-01-02T00:00:00.000Z"
    }
    // ...rest
  ],
  "citations": [
    {
      "url": "https://feedandmeat.de/?utm_source=chatgpt.com",
      "title": "feedandmeat – Dein Online-Shop für hochwertiges BARF-Hundefutter",
      "description": null,
      "icon": null,
      "domain": "Feed and Meat",
      "cited": true
    }
    // ...rest
  ],
  "paragraphs": [
    {
      "text": "✅ Achte auf **Ausgewogenheit** – Fleisch, Innereien, Knochen ....",
      "citations": [
        {
          "url": "https://niendogs-barfshop.de/pages/...",
          "title": "Hochwertiges BARF-Futter für Hunde online kaufen – Niendogs BARF-Shop",
          "description": null,
          "icon": null,
          "domain": "Niendogs BARF-Shop"
        }
      ]
    },
    {
      "text": "Wenn du mir sagst, **welche Art von BARF-Futter du suchst** ...",
      "citations": []
    }
  ]
}
PropertyDefaultDescription
text-The plain text response generated by the AI search provider based on the input prompt.
markdown-Formatted version of the response with Markdown syntax (bold, italics, links, lists, etc.).
model-The AI model used to generate the response (e.g., gpt-5-2). May not be returned by all providers.
sources[]Array of source URLs that were used to generate the response, including titles, snippets, and publication dates.
citations[]Array of citations referenced in the response, including URLs, titles, descriptions, icons, and domain names.
paragraphs[]Array of response paragraphs, each containing text and its associated inline citations.

Type Definitions

Source

A Source represents a web page that was used by the AI to generate its response. Sources are the underlying references that the AI consulted.
PropertyTypeDescription
urlstringThe full URL of the source webpage.
titlestringThe title of the source webpage.
snippetstring | nullA brief excerpt or summary from the source content. May be null if not available.
ranknumberThe relevance ranking of the source (lower numbers indicate higher relevance).
datePublishedstring | nullISO 8601 formatted publication date of the source. May be null if unknown.

Citation

A Citation represents a specific reference that appears inline within the AI’s response text. Citations link specific statements to their source websites.
PropertyTypeDescription
urlstringThe full URL of the cited webpage.
titlestringThe title of the cited webpage.
descriptionstring | nullA brief description of the cited content. May be null if not available.
iconstring | nullURL to the favicon or icon of the cited website. May be null if not available.
domainstringThe display name or domain of the cited website (e.g., “Wikipedia”, “Reuters”).
citedbooleanIndicates whether this citation was directly referenced in the response text. Optional field.

Paragraph

A Paragraph represents a segment of the AI’s response, typically containing a complete thought or section. Each paragraph can have its own inline citations.
PropertyTypeDescription
textstringThe text content of the paragraph, may include Markdown formatting.
citationsCitation[]Array of citations that are referenced within this specific paragraph. Empty array if none.

Provider

The Provider type defines the available AI search providers that can be queried.
ValueDescription
ai-modeGoogle AI Mode - AI answers integrated directly into Google Search.
ai-overviewGoogle AI Overview - AI-generated summaries at the top of search results.
chatgptChatGPT Search - OpenAI’s ChatGPT with web search capabilities.
copilotMicrosoft Copilot - Microsoft’s AI assistant powered by GPT with web search.
perplexityPerplexity - AI search engine combining LLM with real-time web data.
geminiGoogle Gemini - Google’s conversational AI with search integration.
grokGrok - xAI’s AI assistant with access to real-time information.