We offer a TypeScript SDK to make interacting with our APIs simple and predictable. It is available on NPM here. Now you can get started with our APIs with just a few lines of code.
Get one for free on the You.com platform.
Now, you can perform a simple search to retrieve results from general web and news sources.
That’s it! You now have a comprehensive set of search results combining web and news sources.
Our search API offers several powerful filters that can help you find exactly what you need, whether you want to go broader or narrower. For example, to find recent information in the US about renewable energy from the past week limited to 10 results per source type (either general web, or news), you simply write the following:
Its capabilities don’t end there. Learn more about the Search API in the Search API reference, and the TypeScript SDK by visiting the open source repository on GitHub.
The Search API returns a SearchResponse object (see documentation):
results: Contains search results.
url: The URL of the web page.title: The title of the web page.description: A brief description of the web page.snippets: An array of relevant text snippets from the page.thumbnailUrl: (Optional) URL to a thumbnail image representing the page.pageAge: (Optional) Timestamp or date indicating the age of the page.faviconUrl: (Optional) URL to the favicon of the website.url: The URL of the news article.title: The title of the news article.description: A brief description of the news article.thumbnailUrl: (Optional) URL to a thumbnail image representing the article.pageAge: (Optional) Timestamp or date indicating the age of the article.metadata: Information about the search query and results.
query: The search query used to retrieve the results.searchUuid: Unique UUID identifying the search request.latency: The latency (in seconds) of the search call.Always handle potential errors when making API requests:
For more information on how to use the SDK, refer to the official NPM page or the open source repository on GitHub.