### Installation Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Install the Serper client library using npm, yarn, or pnpm. ```APIDOC ## Installation Install the Serper client library using npm, yarn, or pnpm. # npm npm install serper # yarn yarn add serper # pnpm pnpm add serper ``` -------------------------------- ### Install Serper Client Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Install the Serper client library using npm, yarn, or pnpm. This is the first step to using the API. ```bash # npm npm install serper # yarn yarn add serper # pnpm pnpm add serper ``` -------------------------------- ### Install Serper Package Source: https://github.com/tkdkid1000/serper/blob/main/README.md Install the Serper package using npm, yarn, or pnpm. ```sh # npm npm install serper # yarn yarn add serper # pnpm pnpm add serper ``` -------------------------------- ### Basic Usage Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Initialize the Serper client with your API key and perform a search. ```APIDOC ## Basic Usage Initialize the Serper client with your API key and perform a search. ```javascript import { Serper } from "serper"; // ES Modules // const { Serper } = require("serper"); // CommonJS Modules const serper = new Serper({ apiKey: process.env.SERPER_API_KEY // Get your API key at https://serper.dev/api-key }); const results = await serper.search("search terms"); ``` ``` -------------------------------- ### Initialize Serper Client (ES Modules) Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Initialize the Serper client using ES Modules syntax. Ensure you have your API key available as an environment variable. ```javascript import { Serper } from "serper"; // ES Modules const serper = new Serper({ apiKey: process.env.SERPER_API_KEY // Get your API key at https://serper.dev/api-key }); const results = await serper.search("search terms"); ``` -------------------------------- ### Serper Constructor Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Initializes a new instance of the Serper client. ```APIDOC ## new Serper(SerperClientOptions) ### Description Initializes a new Serper client instance with the provided options. ### Parameters #### * **SerperClientOptions** (object) - Required - Options for configuring the Serper client. ### Returns * [Serper](Serper.html) ### Example ```typescript import Serper from 'serper'; const serper = new Serper({ apiKey: 'YOUR_API_KEY' }); ``` ``` -------------------------------- ### Configuration Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Configure the Serper client with an API key, timeout, and cache toggle. ```APIDOC ## Configuration Configure the Serper client with an API key, timeout, and cache toggle. ```javascript const serper = new Serper({ apiKey: process.env.SERPER_API_KEY, // Your API key, this is required timeout: 10000, // Request timeout in milliseconds, 10000 by default doCache: true // Enable to cache responses, true by default }); ``` ``` -------------------------------- ### Initialize Serper Client (CommonJS) Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Initialize the Serper client using CommonJS syntax. Your API key should be accessible via environment variables. ```javascript const { Serper } = require("serper"); // CommonJS Modules const serper = new Serper({ apiKey: process.env.SERPER_API_KEY // Get your API key at https://serper.dev/api-key }); const results = await serper.search("search terms"); ``` -------------------------------- ### Initialize Serper Client Source: https://github.com/tkdkid1000/serper/blob/main/README.md Initialize the Serper client with your API key. Supports both ES Modules and CommonJS. ```js import { Serper } from "serper"; // ES Modules const { Serper } = require("serper"); // CommonJS Modules const serper = new Serper({ apiKey: process.env.SERPER_API_KEY // Get your API key at https://serper.dev/api-key }); const results = await serper.search("search terms"); ``` -------------------------------- ### SerperClientOptions Configuration Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/SerperClientOptions.html Configure the Serper Client with essential options for API interaction. ```APIDOC ## SerperClientOptions Options for initializing a Serper Client. ### Properties * **apiKey** (string) - The Serper API key. * **basePath?** (string) - Optional. Different Serper API root, if needed. Defaults to production Serper path. * **cache?** (boolean) - Optional. Enable cache if true. Defaults to true. * **timeout?** (number) - Optional. Request timeout in milliseconds. Defaults to true. ``` -------------------------------- ### Pagination Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html Use `nextPage`, `prevPage`, and `toPage` functions for pagination. ```APIDOC ## Pagination Use `nextPage`, `prevPage`, and `toPage` functions for pagination. ```javascript let results = await serper.search("dog shelters"); for (let x = 0; x < 5; x++) { results = await results.nextPage(); } ``` ``` -------------------------------- ### Configure Serper Client Source: https://github.com/tkdkid1000/serper/blob/main/README.md Configure the Serper client with an API key, optional request timeout, and cache toggle. ```js const serper = new Serper({ apiKey: process.env.SERPER_API_KEY, // Your API key, this is required timeout: 10000, // Request timeout in milliseconds, 10000 by default doCache: true // Enable to cache responses, true by default }); ``` -------------------------------- ### Supported Routes Source: https://github.com/tkdkid1000/serper/blob/main/docs/index.html The client supports all Serper API routes: Search, News, Images, Videos, and Places. ```APIDOC ## Supported Routes The client supports all Serper API routes: Search, News, Images, Videos, and Places. All of these can be called using the exact same client API and the respective name of the route as the function name. By replacing "search" in the quick start function, you can run any search imaginable! ``` -------------------------------- ### RequestOptions Interface Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/RequestOptions.html Options for making an arbitrary result length search request. Used for images, videos, and places. For search and news, use NumRequestOptions. ```APIDOC ## Interface: RequestOptions ### Description Options for making an arbitrary result length search request. Used for images, videos, and places. For search and news, use [NumRequestOptions](NumRequestOptions.html). ### Properties * **q** (string) - Required - The search query. * **autocorrect?** (boolean) - Optional - Enable autocorrection if true. * **country?** (string) - Optional - Optional country code. * **locale?** (string) - Optional - Optional locale for language or region. * **page?** (number) - Optional - Page number for paginated results. ``` -------------------------------- ### VideosResponse Interface Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/VideosResponse.html The VideosResponse interface defines the structure of the response when requesting video search results from the Serper API. It includes parameters used for the search and an array of video results. ```APIDOC ## Interface: VideosResponse ### Description Represents the response structure for video search queries. ### Properties * **searchParameters** (ResponseParameters<"videos">") - The parameters used for the search query. * **videos** (Video[]) - An array of video search results. ``` -------------------------------- ### prevPage Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/Paginate.html Paginate to the previous page of search results. This method does not replace the current object but returns a promise for the previous page's data. ```APIDOC ## prevPage ### Description Paginate to the previous page, does not replace the object. ### Method prevPage() ### Returns Promise> - The previous page of search results. ### Defined in src/types.ts:25 ``` -------------------------------- ### Videos Method Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Retrieves video search results based on a query. ```APIDOC ## videos() ### Description Retrieves video search results based on a query. ### Method videos(query: string | RequestOptions) ### Parameters #### query - **query** (string | RequestOptions) - The search query string or request options object. ### Returns Promise> ### Defined in src/serper.ts:97 ``` -------------------------------- ### Search Method Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Performs a search query and returns paginated search results. ```APIDOC ## search() ### Description Performs a search query and returns paginated search results. ### Method search(query: string | NumRequestOptions) ### Parameters #### query - **query** (string | NumRequestOptions) - The search query string or request options object. ### Returns Promise> ### Defined in src/serper.ts:82 ``` -------------------------------- ### NumRequestOptions Properties Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/NumRequestOptions.html This interface extends RequestOptions and adds a 'num' property for specifying the number of results. It also includes inherited properties like 'autocorrect', 'country', 'locale', 'page', and 'q'. ```APIDOC ## Interface: NumRequestOptions ### Description Options for making a fixed result length search request. Used for search and news. ### Hierarchy * [RequestOptions](RequestOptions.html) * NumRequestOptions ### Properties #### `Optional` autocorrect * **Type**: boolean * **Description**: Enable autocorrection if true. * **Inherited from**: [RequestOptions](RequestOptions.html#autocorrect) #### `Optional` country * **Type**: string * **Description**: Optional country code. * **Inherited from**: [RequestOptions](RequestOptions.html#country) #### `Optional` locale * **Type**: string * **Description**: Optional locale for language or region. * **Inherited from**: [RequestOptions](RequestOptions.html#locale) #### `Optional` num * **Type**: number * **Description**: Number of results to return. * **Defined in**: src/types.ts:61 #### `Optional` page * **Type**: number * **Description**: Page number for paginated results. * **Inherited from**: [RequestOptions](RequestOptions.html#page) #### q * **Type**: string * **Description**: The search query. * **Inherited from**: [RequestOptions](RequestOptions.html#q) ``` -------------------------------- ### Paginate Search Results Source: https://github.com/tkdkid1000/serper/blob/main/README.md Iterate through search results using nextPage. Note that there is no indicator for the end of all pages. ```js let results = await serper.search("dog shelters"); for (let x = 0; x < 5; x++) { results = await results.nextPage(); } ``` -------------------------------- ### nextPage Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/Paginate.html Paginate to the next page of search results. This method does not replace the current object but returns a promise for the next page's data. ```APIDOC ## nextPage ### Description Paginate to the next page, does not replace the object. ### Method nextPage() ### Returns Promise> - The next page of search results. ### Defined in src/types.ts:20 ``` -------------------------------- ### news Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Fetches news articles. ```APIDOC ## news(query) ### Description Retrieves the latest news articles based on the specified query. ### Parameters #### query * **query** (string | NumRequestOptions) - Required - The news query string or an object with numeric request options. ### Returns * Promise> ### Example ```typescript const newsResults = await serper.news('latest tech news'); ``` ``` -------------------------------- ### SearchResponse Interface Properties Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/SearchResponse.html This interface outlines the properties available in the search response, including knowledge graph data, organic search results, 'people also ask' questions, related searches, and search parameters. ```APIDOC ## Interface: SearchResponse ### Description Represents the structured response from a search query. ### Properties * **searchParameters** (ResponseParameters<"search">") - The parameters used for the search request. * **knowledgeGraph** (KnowledgeGraph[]) - Optional. Contains knowledge graph information related to the search query. * **organic** (OrganicSearchResult[]) - An array of organic search results. * **peopleAlsoAsk** (PeopleAlsoAsk[]) - An array of 'people also ask' questions related to the search query. * **relatedSearches** (Array<{ query: string }>) * **query** (string) - The related search query string. ``` -------------------------------- ### ImagesResponse Interface Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/ImagesResponse.html The ImagesResponse interface defines the structure for image search results. It contains a list of images and associated search parameters. ```APIDOC ## Interface: ImagesResponse ### Description Represents the response structure for image search queries. ### Properties * **images** (Image[]) - An array of image objects returned by the search. * **searchParameters** (ResponseParameters<"images">) - The parameters used for the image search request. ``` -------------------------------- ### MissingApiKeyError Constructor Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/MissingApiKeyError.html Initializes a new instance of the MissingApiKeyError class. This constructor overrides the base Error constructor. ```APIDOC ## constructor ### Description Initializes a new instance of the MissingApiKeyError class. ### Returns [MissingApiKeyError] ### Overrides Error.constructor ### Defined in src/errors.ts:9 ``` -------------------------------- ### images Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Retrieves image search results. ```APIDOC ## images(query) ### Description Fetches image search results based on the provided query. ### Parameters #### query * **query** (string | RequestOptions) - Required - The search query string or an object with request options. ### Returns * Promise> ### Example ```typescript const imageResults = await serper.images('cute cats'); ``` ``` -------------------------------- ### toPage Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/Paginate.html Paginate to a specific page number of search results. This method does not replace the current object but returns a promise for the specified page's data. ```APIDOC ## toPage ### Description Paginate to a specific page, does not replace the object. ### Method toPage(page: number) ### Parameters #### Path Parameters * **page** (number) - Required - The page to navigate to. Must be an integer greater than 0. ### Returns Promise> - The specified page of search results. ### Defined in src/types.ts:31 ``` -------------------------------- ### Place Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/Place.html Defines the structure of a Place object, which includes address, category, unique identifier (cid), geographical coordinates (latitude, longitude), optional contact details (phoneNumber, website), position, rating, and title. ```APIDOC ## Place Type ### Description Represents a geographical place with detailed information. ### Type Declaration ```typescript Place: { address: string; category: string; cid: string; latitude: number; longitude: number; phoneNumber?: string; position: number; rating: number; ratingCount: number; title: string; website?: string; } ``` ### Properties * **address** (string) - The street address of the place. * **category** (string) - The category the place belongs to. * **cid** (string) - The unique identifier for the place. * **latitude** (number) - The latitude coordinate of the place. * **longitude** (number) - The longitude coordinate of the place. * **phoneNumber** (string) - Optional. The phone number of the place. * **position** (number) - The position of the place in a list or search result. * **rating** (number) - The user rating for the place. * **ratingCount** (number) - The number of ratings the place has received. * **title** (string) - The name or title of the place. * **website** (string) - Optional. The website URL of the place. ``` -------------------------------- ### search Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Performs a general search query. ```APIDOC ## search(query) ### Description Executes a general search query using the Serper API. ### Parameters #### query * **query** (string | RequestOptions) - Required - The search query string or an object with request options. ### Returns * Promise> ### Example ```typescript const results = await serper.search('typescript documentation'); ``` ``` -------------------------------- ### MissingApiKeyError Static Methods Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/MissingApiKeyError.html Details the static methods available on the Error class, which are also accessible on MissingApiKeyError. ```APIDOC ## Static Methods ### captureStackTrace * `Static` captureStackTrace(targetObject, constructorOpt?): void * Create .stack property on a target object * Parameters: * targetObject: object * `Optional` constructorOpt?: Function * Returns: void * Inherited from Error.captureStackTrace * Defined in node_modules/@types/node/globals.d.ts:4 ``` -------------------------------- ### PlacesResponse Interface Source: https://github.com/tkdkid1000/serper/blob/main/docs/interfaces/PlacesResponse.html The PlacesResponse interface represents the structure of the response when querying for places. It contains an array of Place objects and response parameters. ```APIDOC ## Interface: PlacesResponse ### Description Represents the response structure for place-related search queries. ### Properties * **searchParameters** (ResponseParameters<"places">") - Contains parameters related to the search response, such as pagination information. * **places** (Place[]) - An array of Place objects, each representing a location found by the search. ### Source Defined in `src/types.ts:159` ``` -------------------------------- ### places Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/Serper.html Searches for places. ```APIDOC ## places(query) ### Description Searches for places based on the given query. ### Parameters #### query * **query** (string | RequestOptions) - Required - The place search query string or an object with request options. ### Returns * Promise> ### Example ```typescript const placeResults = await serper.places('restaurants near me'); ``` ``` -------------------------------- ### ResponseParameters Type Alias Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/ResponseParameters.html Defines the structure for response parameters, including search query, pagination, and localization settings. ```APIDOC ## ResponseParameters ### Description Represents the parameters for a response from the Serper API, including search query details, localization, and response type. ### Type Parameters * **T** - Extends `string`. Represents the specific type of the response (e.g., 'search', 'images'). ### Type Declaration * **autocorrect**: `boolean` - Indicates if autocorrection was applied to the query. * **engine**: `string` - The search engine used (e.g., 'google', 'bing'). * **gl**: `string` - The Google country domain to use. * **hl**: `string` - The language to use for the query. * **num**?: `number` - Optional. The number of results to return per page. * **page**: `number` - The current page number of the results. * **q**: `string` - The search query. * **type**: `T` - The type of the response, determined by the generic parameter T. ``` -------------------------------- ### PeopleAlsoAsk Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/PeopleAlsoAsk.html Defines the structure for a "People Also Ask" item, including the link, question, snippet, and title. ```APIDOC ## Type alias PeopleAlsoAsk ### Description Represents a "People Also Ask" question from search results. ### Type Declaration * **link**: string - The URL associated with the answer. * **question**: string - The text of the question. * **snippet**: string - A brief summary or answer snippet. * **title**: string - The title of the search result or answer. ``` -------------------------------- ### MissingApiKeyError Static Properties Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/MissingApiKeyError.html Details the static properties available on the Error class, which are also accessible on MissingApiKeyError. ```APIDOC ## Static Properties ### prepareStackTrace * `Static` `Optional` prepareStackTrace?: ((err, stackTraces) => any) * Type declaration: * (err, stackTraces): any * Optional override for formatting stack traces * Parameters: * err: Error * stackTraces: CallSite[] * Returns: any * See: * https://v8.dev/docs/stack-trace-api#customizing-stack-traces * Inherited from Error.prepareStackTrace * Defined in node_modules/@types/node/globals.d.ts:11 ### stackTraceLimit * `Static` stackTraceLimit: number Inherited from Error.stackTraceLimit * Defined in node_modules/@types/node/globals.d.ts:13 ``` -------------------------------- ### Video Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/Video.html Defines the structure of a Video object, including its properties and their types. This type is used to represent individual video search results. ```APIDOC ## Video Type ### Description Represents a video search result with details such as its publication date, thumbnail image, link, position in the results, a summary snippet, and title. ### Type Declaration ```typescript { date?: string; imageUrl: string; link: string; position: number; snippet: string; title: string; } ``` ### Properties * **date** (string) - Optional - The publication date of the video. * **imageUrl** (string) - Required - The URL of the video's thumbnail image. * **link** (string) - Required - The URL of the video. * **position** (number) - Required - The position of the video in the search results. * **snippet** (string) - Required - A short summary or description of the video content. * **title** (string) - Required - The title of the video. ``` -------------------------------- ### News Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/News.html Defines the structure of a news item, including its date, link, source, title, and snippet. ```APIDOC ## News Type ### Description Represents a single news result from a search query. ### Type Declaration ```typescript News: { date: string; imageUrl?: string; link: string; position: number; snippet: string; source: string; title: string; } ``` ### Fields * **date** (string) - The date the news was published. * **imageUrl** (string, optional) - The URL of an associated image. * **link** (string) - The URL of the news article. * **position** (number) - The position of this news item in the search results. * **snippet** (string) - A short summary or excerpt of the news article. * **source** (string) - The source or publication of the news article. * **title** (string) - The title of the news article. ``` -------------------------------- ### Image Type Declaration Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/Image.html The Image type is a data structure used to represent information about an image, typically from search results. It includes details such as the image URL, source, dimensions, and associated link. ```APIDOC ## Type alias Image ### Description Represents an image object, typically returned in image search results. ### Type Declaration ```typescript { domain: string; googleUrl: string; imageHeight: number; imageUrl: string; imageWidth: number; link: string; position: number; source: string; thumbnailHeight: number; thumbnailUrl: string; thumbnailWidth: number; title: string; } ``` ### Properties * **domain** (string) - The domain where the image originates. * **googleUrl** (string) - The URL of the image on Google. * **imageHeight** (number) - The height of the image in pixels. * **imageUrl** (string) - The direct URL to the image. * **imageWidth** (number) - The width of the image in pixels. * **link** (string) - The URL of the page where the image is found. * **position** (number) - The position of the image in the search results. * **source** (string) - The source of the image (e.g., website name). * **thumbnailHeight** (number) - The height of the image thumbnail in pixels. * **thumbnailUrl** (string) - The URL to the image thumbnail. * **thumbnailWidth** (number) - The width of the image thumbnail in pixels. * **title** (string) - The title associated with the image or the page it's on. ``` -------------------------------- ### OrganicSearchResult Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/OrganicSearchResult.html This snippet details the structure of the OrganicSearchResult type, outlining its properties and their types. ```APIDOC ## OrganicSearchResult Type ### Description Represents a single organic search result item. ### Type Declaration ```typescript { attributes?: Record; date?: string; link: string; position: number; sitelinks?: { link: string; title: string; }[]; snippet: string; title: string; } ``` ### Properties * **attributes** (Record) - Optional. Additional attributes associated with the search result. * **date** (string) - Optional. The publication date of the search result. * **link** (string) - Required. The URL of the search result. * **position** (number) - Required. The position of the search result on the page. * **sitelinks** (Array<{ link: string; title: string; }>) - Optional. Sitelinks associated with the search result. * **snippet** (string) - Required. A short description or snippet of the search result content. * **title** (string) - Required. The title of the search result. ``` -------------------------------- ### MissingApiKeyError Properties Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/MissingApiKeyError.html Details the properties available on the MissingApiKeyError class, including inherited properties from the base Error class. ```APIDOC ## Properties ### message * message: string Inherited from Error.message * Defined in node_modules/typescript/lib/lib.es5.d.ts:1068 ### name * name: string Inherited from Error.name * Defined in node_modules/typescript/lib/lib.es5.d.ts:1067 ### stack * `Optional` stack?: string Inherited from Error.stack * Defined in node_modules/typescript/lib/lib.es5.d.ts:1069 ``` -------------------------------- ### InvalidArgumentError Constructor Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/InvalidArgumentError.html Initializes a new instance of the InvalidArgumentError class. This constructor is inherited from the base Error class and may be overridden for specific error handling. ```APIDOC ## constructor ### Description Initializes a new instance of the InvalidArgumentError class. ### Method `new InvalidArgumentError()` ### Returns [InvalidArgumentError] ### Overrides Error.constructor ### Defined in src/errors.ts:2 ``` -------------------------------- ### InvalidArgumentError Methods Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/InvalidArgumentError.html Static methods available on the InvalidArgumentError class, including inherited methods. ```APIDOC ## Methods ### captureStackTrace * **Static** **captureStackTrace**(targetObject: object, constructorOpt?: Function): void * Create .stack property on a target object. * Parameters: * **targetObject**: object * **constructorOpt?**: Function * Returns: void * Inherited from Error.captureStackTrace * Defined in node_modules/@types/node/globals.d.ts:4 ``` -------------------------------- ### NewsResponse Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/NewsResponse.html Defines the structure of the NewsResponse object, which contains an array of News items and response parameters. ```APIDOC ## NewsResponse Type ### Description Represents the response structure for news-related searches, containing a list of news articles and associated search parameters. ### Type Declaration ```typescript NewsResponse: { news: News[]; searchParameters: ResponseParameters<"news">; } ``` ### Fields * **news** (`News[]`): An array of news articles. * **searchParameters** (`ResponseParameters<"news">`): Parameters related to the news search. ### Defined in [src/types.ts:174](https://github.com/TKDKid1000/serper/blob/5cc0130/src/types.ts#L174) ``` -------------------------------- ### KnowledgeGraph Type Definition Source: https://github.com/tkdkid1000/serper/blob/main/docs/types/KnowledgeGraph.html The KnowledgeGraph type defines the structure for knowledge graph data, including attributes, description, title, and source information. ```APIDOC ## KnowledgeGraph Type ### Description Represents structured knowledge graph information. ### Fields - **attributes** (Record) - Key-value pairs of additional attributes. - **description** (string) - A textual description of the knowledge graph entity. - **descriptionLink** (string) - A URL linking to a more detailed description. - **descriptionSource** (string) - The source of the description. - **imageUrl** (string) - URL of an image associated with the knowledge graph entity. - **title** (string) - The title or name of the knowledge graph entity. - **type** (string) - The type of the knowledge graph entity (e.g., 'Person', 'Organization'). - **website** (string) - The primary website URL for the entity. ``` -------------------------------- ### InvalidArgumentError Properties Source: https://github.com/tkdkid1000/serper/blob/main/docs/classes/InvalidArgumentError.html Properties available on the InvalidArgumentError class, including inherited properties from the Error class. ```APIDOC ## Properties ### message * **message**: string * Inherited from Error.message * Defined in node_modules/typescript/lib/lib.es5.d.ts:1068 ### name * **name**: string * Inherited from Error.name * Defined in node_modules/typescript/lib/lib.es5.d.ts:1067 ### stack * **stack?**: string * Inherited from Error.stack * Defined in node_modules/typescript/lib/lib.es5.d.ts:1069 ### prepareStackTrace * **Static** **Optional** **prepareStackTrace?**: ((err, stackTraces) => any) * Type declaration: * (err: Error, stackTraces: CallSite[]) => any * Optional override for formatting stack traces. * See: https://v8.dev/docs/stack-trace-api#customizing-stack-traces * Inherited from Error.prepareStackTrace * Defined in node_modules/@types/node/globals.d.ts:11 ### stackTraceLimit * **Static** **stackTraceLimit**: number * Inherited from Error.stackTraceLimit * Defined in node_modules/@types/node/globals.d.ts:13 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.