{"version":3,"file":"searchapi.d.cts","names":["Document","BaseDocumentLoader","JSONPrimitive","JSONValue","JSONObject","JSONArray","Array","SearchApiParameters","SearchApiLoader","Record","Promise"],"sources":["../../../src/document_loaders/web/searchapi.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseDocumentLoader } from \"@langchain/core/document_loaders/base\";\ntype JSONPrimitive = string | number | boolean | null;\ntype JSONValue = JSONPrimitive | JSONObject | JSONArray;\ninterface JSONObject {\n    [key: string]: JSONValue;\n}\ninterface JSONArray extends Array<JSONValue> {\n}\n/**\n * SearchApiParameters Type Definition.\n *\n * For more parameters and supported search engines, refer specific engine documentation:\n * Google - https://www.searchapi.io/docs/google\n * Google News - https://www.searchapi.io/docs/google-news\n * Google Scholar - https://www.searchapi.io/docs/google-scholar\n * YouTube Transcripts - https://www.searchapi.io/docs/youtube-transcripts\n * and others.\n *\n */\ntype SearchApiParameters = {\n    [key: string]: JSONValue;\n};\n/**\n * Class representing a document loader for loading search results from\n * the SearchApi. It extends the BaseDocumentLoader class.\n * @example\n * ```typescript\n * const loader = new SearchApiLoader({\n *   q: \"{query}\",\n *   apiKey: \"{apiKey}\",\n *   engine: \"google\",\n * });\n * const docs = await loader.load();\n * ```\n */\nexport declare class SearchApiLoader extends BaseDocumentLoader {\n    private apiKey;\n    private parameters;\n    constructor(params: SearchApiParameters);\n    /**\n     * Builds the URL for the SearchApi search request.\n     * @returns The URL for the search request.\n     */\n    buildUrl(): string;\n    /**\n     * Extracts documents from the provided output.\n     * @param output - The output to extract documents from.\n     * @param responseType - The type of the response to extract documents from.\n     * @returns An array of Documents.\n     */\n    private extractDocuments;\n    /**\n     * Processes the response data from the SearchApi search request and converts it into an array of Documents.\n     * @param data - The response data from the SearchApi search request.\n     * @returns An array of Documents.\n     */\n    processResponseData(data: Record<string, unknown>): Document[];\n    private fetchData;\n    /**\n     * Loads the search results from the SearchApi.\n     * @returns An array of Documents representing the search results.\n     * @throws An error if the search results could not be loaded.\n     */\n    load(): Promise<Document[]>;\n}\nexport {};\n//# sourceMappingURL=searchapi.d.ts.map"],"mappings":";;;;KAEKE,aAAAA;KACAC,SAAAA,GAAYD,gBAAgBE,aAAaC;AAF6B,UAGjED,UAAAA,CAFQ;EACbD,CAAAA,GAAAA,EAAAA,MAAS,CAAA,EAEKA,SAFL;;UAIJE,SAAAA,SAAkBC,KAJKF,CAICD,SAJDC,CAAAA,CAAAA;AAAsB;AAAA;AAE3B;AAEK;AA6BjC;;;;;;;AAA+D,KAhB1DG,mBAAAA,GAgB0D;iBAf5CJ;;;;;;;;;;;;;;;cAeEK,eAAAA,SAAwBP,kBAAAA;;;sBAGrBM;;;;;;;;;;;;;;;;;;4BAkBME,0BAA0BT;;;;;;;UAO5CU,QAAQV"}