How to use Linkup Javascript SDK natively in your apps.
Parameter | Type | Description | Default |
---|---|---|---|
query | str | The input query string | Required |
depth | string | Type of search to perform “standard” or “deep” | Required |
outputType | string | Linkup response type, can be “sourcedAnswer”, “searchResults”, “structuredOutput” | Required |
structuredOutputSchema | string | The returned schema from the Linkup API. It should be used only if the outputType is ‘structured’. | undefined |
includeImages | boolean | To also return images | undefined |
fromDate | date | From date to search | undefined |
toDate | date | To date to search | undefined |
include_domains | string[] | To include domain(s) | undefined |
exclude_domains | string[] | To exclude domain(s) | undefined |
query
parameter is the core input string that defines your search intent. It represents the question or information request that you want Linkup to answer. How you formulate this query significantly impacts the quality and relevance of results.
Effective queries should be:
depth
field is used to select the type of search you want to perform:
structuredOutputSchema
. If you want a full guide on how to use it, you check it herestructuredOutputSchema
field.
If you want a full guide on how to use it, you check it here
includeImages
parameter allows you to receive image results alongside text results in your search responses. When set to true
, Linkup will return relevant images related to your query, each with a URL and metadata. This is particularly useful for:
type: "image"
.
fromDate
parameter filters search results to only include content published after the specified date. This helps you:
new Date("2024-01-01")
.
toDate
parameter complements fromDate
by restricting search results to only include content published or updated before the specified date. This is useful for:
fromDate
, the date should be a Date type, for example: new Date("2024-12-31")
.
When used together, fromDate
and toDate
create a date range filter for your search results.
includeDomains
parameter allows you to specify a list of domains that must be included in the search results. This is useful for:
excludeDomains
parameter allows you to specify a list of domains that should be excluded from the search results. This is useful for:
Last Formula 1 race
Standard example
This example show you how to combine the standard search with a sourced answer
Company Revenue
Deep + structured output
This example shows you how to use the deep with a relative complexe structured output:
Latest politic news
Search results as outputType
This example shows you how to use the standard with a search results:
Amazon deforestation
IncludeImages filter
This example return text and images sources
AI Avancements
Dates filtering
This example shows you how to use the dates filter: