Skip to main content

Introduction

The Python SDK allows for easy interaction with the Linkup API, offering the full range of our search functionality. Easily integrate smart search capabilities into your applications, harnessing Linkup’s powerful search features. You can use our playground to have interactive examples and see how to implement them with the SDK.

Quickstart

Get started with our Python SDK in less than 5 minutes!

Get your API key

Create a Linkup account for free to get your API key.

Installation

You can install the Linkup Python SDK as any Python package, for instance using pip:
pip install linkup-sdk

Usage

Here is a basic usage example showing how to use the Linkup Python SDK:
from linkup import LinkupClient

client = LinkupClient(
    api_key="<your-api-key>", # Or set the LINKUP_API_KEY environment variable
)

# Perform a search query
search_response = client.search(
    query="What are the 3 major events in the life of Abraham Lincoln?",
    depth="deep",
    output_type="sourcedAnswer",
)
print(search_response)

# Fetch the content of a web page
response = client.fetch(
    url="https://docs.linkup.so",
)
print(response)

Search parameters

ParameterTypeDescriptionDefault
querystrThe input queryRequired
depthtyping.Literal["standard", "deep"]The depth of the searchRequired
output_typetyping.Literal["searchResults", "sourcedAnswer", "structured"]The desired output typeRequired
structured_output_schemapydantic.BaseModel, str or NoneThe desired schema for the output, if output_type is structuredNone
include_imagesdatetime.bool or NoneWhether to include images in the searchNone
from_datedatetime.date or NoneThe date from which the search results should be consideredNone
to_datedatetime.date or NoneThe date until which the search results should be consideredNone
exclude_domainslist[str] or NoneThe domains to exclude from the searchNone
include_domainslist[str] or NoneThe domains to restrict the search withNone
include_inline_citationsbool or NoneWhether to include inline citations in the answer, if output_type is sourcedAnswerNone
include_sourcesbool or NoneWhether to include the sources, if output_type is structured (modifies the schema of the output)None

Query

The 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:
  • Clear and specific: “What were the key findings of NASA’s James Webb telescope in 2023?” provides better results than “Tell me about space discoveries”
  • Contextually rich: Include relevant context when needed (“What are the environmental impacts of lithium mining for EV batteries?”)
  • Naturally phrased: Write as you would ask a knowledgeable person, not with keywords
For optimal results, consider reviewing our prompting guide, which provides detailed strategies for crafting effective queries.

Depth

The depth field is used to select the type of search you want to perform:
  • standard: the search will be straightforward and fast, suited for relatively simple queries (e.g. “What’s the weather in Paris today?”)
  • depth: the search will use an agentic workflow, which makes it in general slower, but it will be able to solve more complex queries (e.g. “What is the company profile of LangChain accross the last few years, and how does it compare to its concurrents?”)

Output type

The type of output which is expected:
  • sourcedAnswer: Provides a comprehensive natural language answer to the query along with citations to the source material. Ideal for when you need well-formed responses with verifiable information and transparent sourcing.
  • searchResults: Returns the raw search context data without synthesis, giving you direct access to the underlying information. Useful for custom processing, or when you need to implement your own answer generation logic.
  • structured: Allows you to receive responses in a custom format based on the format provided in structured_output_schema. If you want a full guide on how to use it, you check it here

Structured output schema

Linkup’s structured output feature allows you to receive responses in a custom format that you define. This is particularly useful when you need to integrate Linkup’s responses directly into your application’s data structure or when you want to ensure consistency in the response format. To do that, you have to use the structured_output_schema field. Supported formats are a pydantic.BaseModel or a string representing a valid object JSON schema. If you want a full guide on how to use it, you check it here

Include images

The include_images 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:
  • Creating visual search experiences
  • Building content that combines text and images
  • Researching topics where visual information is important
Image results are returned with the same structure as text results but with type: "image".

From date

The from_date parameter filters search results to only include content published after the specified date. This helps you:
  • Focus on recent information
  • Exclude outdated content
The date should be a datetime.date type, for example: datetime.date(2025, 3, 1).

To date

The to_date parameter complements from_date by restricting search results to only include content published or updated before the specified date. This is useful for:
  • Historical research on specific time periods
  • Analyzing content published within a specific date range
  • Avoiding more recent information that might skew results
Like from_date, the date should be a datetime.date type, for example: date(2025, 3, 15). When used together, from_date and to_date create a date range filter for your search results.

Exclude domains

The exclude_domains parameter allows you to specify a list of domains that should be excluded from the search results. This is useful for:
  • Filtering out unwanted sources
  • Avoiding results from specific domains that may not be relevant or trustworthy.

Include domains

The include_domains parameter allows you to specify a list of domains that must be included in the search results. This is useful for:
  • focus on specific sources
  • ensure that results come from trusted domains.

Include inline citations

The include_inline_citations parameter is specifically designed for use with the sourcedAnswer output type. When enabled, it embeds citations directly within the answer text, making it easier to identify which parts of the response correspond to specific sources. This is particularly useful for:
  • Academic or research applications where source attribution is critical
  • Creating content that needs verifiable claims with clear sourcing
  • Building applications where users need to quickly verify information
When include_inline_citations is set to True, the answer will contain inline references like [1], [2] that correspond to the sources in the response.

Include sources

The include_sources parameter is specifically designed for use with the structured output type. When enabled, it modifies the schema of the structured response to include source information alongside your custom data structure. This is particularly useful for:
  • Applications that need both structured data and source attribution
  • Building systems that require traceability of information
  • Creating responses where you want to maintain both custom format and source verification
When include_sources is set to True, the response will be wrapped in a LinkupSearchStructuredResponse object containing both your structured data and source information.

Fetch parameters

ParameterTypeDescriptionDefault
urlstrThe URL of the web page to fetchRequired
include_raw_htmlbool or NoneWhether to include the raw HTML in the responseNone
render_jsbool or NoneWhether the API should render JavaScript on the pageNone

URL

The url parameter specifies the web page URL that you want to fetch content from. This should be a fully qualified URL including the protocol (http:// or https://). The fetch endpoint will retrieve the page content and return it in a cleaned up mardown, making it easy to process the web page by AI agents or other applications.

Include raw HTML

The include_raw_html parameter controls whether the raw HTML source code of the web page is included in the response alongside the cleaned up markdown content. This is useful for applications that need to perform custom HTML parsing, preserve specific formatting, or access elements that might be filtered out during the standard content extraction process.

Render JS

The render_js parameter determines whether JavaScript should be executed when fetching the web page. When set to True, the API will render the page in a browser-like environment, executing JavaScript code and waiting for dynamic content to load before extracting the content. This is essential for modern web applications that rely heavily on JavaScript for content generation, such as single-page applications (SPAs) or pages with dynamically loaded content, but induces additional latency.

Examples

This example show you how to combine the standard search with a sourced answer

from linkup import LinkupClient

client = LinkupClient()

search_response = client.search(
    query="Last Formula 1 race",
    depth="standard",
    output_type="sourcedAnswer",
)
print(search_response)
Example response:
answer='The last Formula 1 race was the Australian Grand Prix, where Lando Norris won. The race took place recently, and it was marked by intermittent rain causing several challenges on the track. The next race is the Chinese Grand Prix, scheduled for March 21-23, 2025.'
sources=[
  LinkupSource(name='Formula 1 season begins with dramatic Australian Grand Prix', url='https://www.emorywheel.com/article/2025/03/pivexulgpch8', snippet='The Australian Grand Prix was a thrilling way to start the 2025 F1 season for the many fans eager to have F1 back after the long winter break. The excitement will continue with the Chinese Grand Prix, the first sprint race of the season, in Shanghai on March 21-23.'),
  LinkupSource(name="AUTO RACING: Bell's three-race win streak snapped and Norris takes the F1 season opener", url='https://www.washingtonpost.com/sports/auto-racing/2025/03/18/auto-racing-glance/414c4f32-0419-11f0-941f-6ca83a0bd35b_story.html', snippet='Schedule: Saturday, practice, 1:05 p.m., qualifying, 2:10 p.m.; Sunday, race, 3 p.m. (FS1). Track: Homestead-Miami Speedway. Race distance: 267 laps, 400.5 miles. Last year: Tyler Reddick secured the win from the pole after a last-lap pass of Ryan Blaney.'),
  LinkupSource(name='F1 Australian Grand Prix 2025 results: Norris wins, rookies spin out in the rain', url='https://www.yahoo.com/lifestyle/f1-australian-grand-prix-2025-083408114.html', snippet='Intermittent rain caused havoc on the track before and during the 2025 F1 Australian Grand Prix. The post F1 Australian Grand Prix 2025 results: Norris wins, rookies spin out in the rain appeared first on The Manual.'),
  LinkupSource(name='Eddie Jordan dies aged 76 as tributes pour in for ‘incredible spirit’ of F1 icon: latest', url='https://www.msn.com/en-us/sports/other/eddie-jordan-dies-aged-76-as-tributes-pour-in-for-incredible-spirit-of-f1-icon-latest/ar-AA1BindV', snippet='Eddie Jordan dies aged 76 as tributes pour in for ‘incredible spirit’ of F1 icon: latest - The 76-year-old passed away after a year-long battle with cancer'),
  LinkupSource(name='Verstappen faces F1 race ban as Red Bull replacement lined up', url='https://www.msn.com/en-gb/sport/motorsports/max-verstappen-faces-f1-race-ban-as-red-bull-replacement-lined-up/ar-AA1BieZw', snippet='Red Bull may have to look for a replacement for Max Verstappen during the 2025 Formula 1 season, with the team presented with a variety of candidates. The four-time world champion remains dangerously close to a one-race ban, issued by the FIA if a driver picks up 12 penalty points on their super licence over the course of 12 months.'),
  LinkupSource(name='F1 mailbag: Hadjar’s tears, Hamilton’s adjustment and a ‘Racing Dad’ award', url='https://www.nytimes.com/athletic/6213658/2025/03/19/f1-hadjar-lewis-hamilton-anthony-hamilton/', snippet='Some of the wrecks were caused by small mistakes, like Hadjar trying to warm up his tires. Sauber’s Gabriel Bortoleto, who crashed with 10 or so laps to go, said he “touched the curb and ultimately ended up in the wall.”'),
  LinkupSource(name='Eddie Jordan: Former F1 team owner dies aged 76', url='https://www.skysports.com/f1/news/12433/13332330/eddie-jordan-former-f1-team-owner-dies-aged-76', snippet='Eddie Jordan has passed away at the age of 76; Jordan had an F1 team for 15 seasons, winning four races; Irishman recently oversaw Adrian Neweys transfer from Red Bull to Aston Martin and led a consor'),
  LinkupSource(name='F1 Australian Grand Prix live updates: Lando Norris, McLaren wins chaotic opening race in Melbourne', url='https://www.nytimes.com/athletic/live-blogs/f1-australia-gp-live-updates-race-times-results/k6d5T4xUkEkD/', snippet='Follow live reaction from Formula One’s opening grand prix of 2025, where rain caused three safety cars and six retirements'),
  LinkupSource(name='A tough race for the rookies as F1 starts 2025 in Australia', url='https://arstechnica.com/cars/2025/03/a-tough-race-for-the-rookies-as-f1-starts-2025-in-australia/', snippet="True F1 junkies were probably following the preseason test earlier this month in Bahrain, as the sport now helpfully shows those three days of running on its streaming platform. But those devoted enough to watch the cars circulate for hours with nothing on the line also know you shouldn't read too much into a preseason test,"),
  LinkupSource(name='Formula 1', url='https://www.sportskeeda.com/f1', snippet='Additionally, unlike in over the last decade, wheel covers are back ... The 2022 season has Carlos Sainz and Monaco’s Charles Leclerc racing for legendary F1 team Ferrari. Their strongest ...')]

This example shows you how to use the deep with a relative complexe structured output:

from linkup import LinkupClient

client = LinkupClient(api_key="YOUR_API_KEY")

schema = """{
    "type": "object",
    "properties": {
        "companyName": {
            "type": "string",
            "description": "The name of the company"
        },
        "revenueAmount": {
            "type": "number",
            "description": "The revenue amount"
        },
        "fiscalYear": {
            "type": "string",
            "description": "The fiscal year for this revenue"
        }
    }
}"""

response = client.search(
    query="What is Microsoft's 2024 revenue?",
    depth="deep",
    output_type="structured",
    structured_output_schema=schema
)

print(response)
Example response:
{
    "companyName": "Microsoft",
    "revenueAmount": 245100000000,
    "fiscalYear": "2024"
}

This example shows you how to use the standard with a search results:

from linkup import LinkupClient

client = LinkupClient(api_key="YOUR_API_KEY")

search_response = client.search(
    query="Latest politic news",
    depth="standard",
    output_type="searchResults",
)

print(search_response)
Example response:
results=[
  LinkupSearchTextResult(type='text', name='CNN host Van Jones shares personal upbringing, reflects on state of American politics', url='https://www.browndailyherald.com/article/2025/03/cnn-host-van-jones-shares-personal-upbringing-reflects-on-state-of-american-politics', content='On Wednesday night, the Watson Institute for International and Public Affairs welcomed CNN Host Van Jones for a conversation on the state of American politics. In his talk, Jones explained increasingly strained ties between Jewish and Black activist communities,'),
  LinkupSearchTextResult(type='text', name='Politics latest: Billions being shaved off welfare bill - join our live Q&A on what it means for you', url='https://news.sky.com/story/politics-latest-trump-wants-to-shock-europe-into-action-with-false-ukraine-claims-says-boris-johnson-12593360', content='Work and Pensions Secretary Liz Kendall has announced changes to the welfare system - including merging some benefits and a plan to scrap the work capability assessment used to claim universal credit.'),
  LinkupSearchTextResult(type='text', name='Politics', url='https://www.npr.org/sections/politics/', content="March 19, 2025 • The decision offers a venue compromise in the bellwether case, while Khalil's legal team seeks to release him from detention and block his deportation."),
  LinkupSearchTextResult(type='text', name='Nevada Politics', url='https://lasvegassun.com/news/politics/', content='Nevada U.S. Sens. Jacky Rosen and Catherine Cortez Masto both voted against a GOP-constructed spending measure to avoid a government shutdown, though ... Nevada employers shortchange minimum wage ...'),
  LinkupSearchTextResult(type='text', name="Politics latest: Labour vows to 'unleash seismic reforms' for planning system", url='https://news.sky.com/story/politics-latest-live-starmer-ukraine-zelenskyy-war-trump-welfare-cuts-12593360', content='It arose, he explained, "out of a consultation begun by the previous government". Politics At Jack And Sam\'s: Keir the builder – can he fix it? 👉Listen to Politics At Jack And Sam\'s on your ...'),
  LinkupSearchTextResult(type='text', name='U.S. Politics', url='https://www.newsweek.com/topic/u.s.-politics', content="Senate Minority Leader Chuck Schumer has now announced he is in fact planning to back the stopgap bill. Newsweek's live blog is closed."),
  LinkupSearchTextResult(type='text', name='Editorial Cartoons on Politics', url='https://www.usnews.com/news/cartoons/editorial-cartoons-on-politics', content='Your trusted source for the latest news delivered weekdays from the team at U.S. News and World Report. Sign in to manage your newsletters » Sign up to receive the latest updates from U.S News ...'),
  LinkupSearchTextResult(type='text', name='BSc Politics and Philosophy', url='https://www.lse.ac.uk/study-at-lse/undergraduate/bsc-politics-and-philosophy', content='You won’t simply study politics and philosophy side by side. You’ll see how each subject helps us understand political practices and behaviour and the development of political ideals. This includes examining public policies from the perspective of ...'),
  LinkupSearchTextResult(type='text', name='The NPR Politics Podcast', url='https://www.npr.org/podcasts/510310/npr-politics-podcast', content="Every weekday, NPR's best political reporters are there to explain the big news coming out of Washington and the campaign trail. They don't just tell you what happened. They tell you why it matters."),
  LinkupSearchTextResult(type='text', name="Nahid calls for consensus to end 'Mujibbadi' politics in Bangladesh", url='https://www.tbsnews.net/bangladesh/politics/nahid-calls-consensus-end-mujibbadi-politics-bangladesh-1096916', content='National Citizen Party (NCP) Convener Nahid Islam today (19 March) urged political parties to reach a political consensus so that there would be no room for "Mujibbadi" politics in the election and politics of future Bangladesh.')
]

This example return text and images sources

from linkup import LinkupClient

client = LinkupClient(api_key="YOUR_API_KEY")

search_response = client.search(
    query="Amazon deforestation",
    depth="standard",
    output_type="searchResults",
    include_images=True
)

print(search_response)
Exemple response
results=[
  LinkupSearchTextResult(type='text', name='How a grassroots financing model is helping Indigenous communities save the Amazon', url='https://www.unep.org/news-and-stories/story/how-grassroots-financing-model-helping-indigenous-communities-save-amazon', content='A United Nations effort is channeling more finance to communities to help them conserve, restore and sustainably manage forests.'),
  LinkupSearchTextResult(type='text', name='Amazon Rainforest Razed To Build Highway For UN Climate Summit', url='https://ijr.com/amazon-rainforest-razed-to-build-highway-for-un-climate-summit/', content='Ahead of the COP30 climate summit in Belém, Brazil, developers are carving a four-lane highway through protected tracts of the'),
  LinkupSearchTextResult(type='text', name='Roads less traveled multiply deforestation in the Amazon and beyond', url='https://www.msn.com/en-us/news/world/roads-less-traveled-multiply-deforestation-in-the-amazon-and-beyond/ar-AA1AGYEe', content='James Cook University-led research has revealed secondary roads branching from major highways in tropical forests linked to extensive deforestation across the Brazilian Amazon, the Congo Basin, and New Guinea.'),
  LinkupSearchTextResult(type='text', name='Forest management ambitions in Brazilian Amazon aim to make up for lost time', url='https://www.msn.com/en-us/news/world/forest-management-ambitions-in-brazilian-amazon-aim-to-make-up-for-lost-time/ar-AA1ALyxz', content='In the early 2000s, deforestation levels in the Brazilian Amazon rose so tremendously that, faced with both national and international pressure, the federal government decided to implement forest timber management as a way to curb the destruction.'),
  LinkupSearchTextResult(type='text', name='Amazon Rainforest Slashed for Highway Ahead of Climate Summit, Sparking Outrage', url='https://www.nysun.com/article/amazon-rainforest-slashed-for-highway-ahead-of-climate-summit-sparking-outrage', content='Dubbed the Avenida Liberdade highway, the new stretch of highway cuts across tens of thousands of acres of rainforest located on the outskirts of Belem, where over 50,000 people, including world leaders, are anticipated to gather in November for the COP30 Climate Summit, according to a report from BBC News.'),
  LinkupSearchTextResult(type='text', name='Thousands of acres of Amazon rainforest cleared for climate summit highway in Brazil', url='https://www.msn.com/en-us/news/world/thousands-of-acres-of-amazon-rainforest-cleared-for-climate-summit-highway-in-brazil/ar-AA1AQQ04', content='A BBC report found on Wednesday that tens of thousands of acres of protected Amazonian rainforest are being cleared ahead of the COP30 climate summit in Brazil.'),
  LinkupSearchTextResult(type='text', name='Brazil Cuts Acres of Amazon Trees to Build Road for Climate Summit', url='https://greekreporter.com/2025/03/13/amazon-tree-cut-road-climate-summit/', content='A new road is being built by cutting down thousands of protected Amazon rainforest acres for the COP30 climate summit in Belém, Brazil.'),
  LinkupSearchTextResult(type='text', name='Amazon tree loss may worsen both floods and droughts: study', url='https://phys.org/news/2025-03-amazon-tree-loss-worsen-droughts.html', content='Deforestation in the Amazon causes more rain in the wet season and less rain in the dry season, according to new research published Wednesday underscoring the rainforest\'s "pivotal" role in regulating local and global climate.'),
  LinkupSearchTextResult(type='text', name='Amazon Rainforest Cut Down for Climate Summit Highway', url='https://www.msn.com/en-us/news/world/amazon-rainforest-cut-down-for-climate-summit-highway/ar-AA1ALWO1', content='Brazilian officials said the highway is sustainable with wildlife crossings for animals to use and solar lighting.'),
  LinkupSearchTextResult(type='text', name='Amazon Rainforest Chopped Down to Build Highway for Conference on Climate Change', url='https://www.msn.com/en-us/news/world/amazon-rainforest-chopped-down-to-build-highway-for-conference-on-climate-change/ar-AA1ALPK2', content='The Brazilian government has cleared protected Amazon rainforest to build a highway for the COP30 climate summit.'), LinkupSearchImageResult(type='image', name='Deforestation: Primary Forest Losses Impact Climate Change — Carmen ...', url='https://images.squarespace-cdn.com/content/v1/584738ff20099e6c2da92f74/1556207140784-08HFC1PNAYWX368IJGXM/ke17ZwdGBToddI8pDm48kNvT88LknE-K9M4pGNO0Iqd7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z5QPOohDIaIeljMHgDF5CVlOqpeNLcJ80NK65_fV7S1USOFn4xF8vTWDNAUBm5ducQhX-V3oVjSmr829Rco4W2Uo49ZdOtO_QXox0_W7i2zEA/Deforestation+in+Brazil'), LinkupSearchImageResult(type='image', name='11 Amazon Rainforest Deforestation Facts to Know About | Earth.Org', url='https://u4d2z7k9.rocketcdn.me/wp-content/uploads/2021/11/Untitled-design-88.jpg'),
  LinkupSearchImageResult(type='image', name='Amazon Fires and the Horrifying Science of Deforestation | WIRED', url='https://media.wired.com/photos/5d6027925af21f000859fc13/master/w_2000,c_limit/Science_AmazonASAP_1125307709.jpg'),
  LinkupSearchImageResult(type='image', name='Deforestation In The Amazon Rainforest | emr.ac.uk', url='https://en.mercopress.com/data/cache/noticias/73326/0x0/1-88.jpg'),
  LinkupSearchImageResult(type='image', name='Amazon Deforestation WWF - Green Queen', url='https://www.greenqueen.com.hk/wp-content/uploads/2020/06/Amazon-Deforestation-WWF.jpg'),
  LinkupSearchImageResult(type='image', name='Brazil warned to cut Amazon rainforest deforestation or lose funding ...', url='https://e3.365dm.com/17/06/1600x900/874f86bbc8aa7b82069469f195e8a13107ecb0e3602b2d6a7e1a9614a615d7e8_3985203.jpg?20170623162747'),
  LinkupSearchImageResult(type='image', name='In the Amazon, the World’s Largest Reservoir of Biodiversity, Two ...', url='https://insideclimatenews.org/wp-content/uploads/2021/09/amazon-rainforest_carl-de-souza-afp-getty-scaled.jpg'),
  LinkupSearchImageResult(type='image', name='Amazon rainforest destruction is accelerating, shows government data', url='https://imgs.mongabay.com/wp-content/uploads/sites/20/2020/09/01155427/GP0STURQQ_AmazonFiresAug20_PressMedia.jpg'),
  LinkupSearchImageResult(type='image', name="Deforestation in Brazil's Amazon surges to 12-year high | Daily Sabah", url='https://idsb.tmgrup.com.tr/ly/uploads/images/2020/12/01/thumbs/800x531/75990.jpg?v=1606825500'),
  LinkupSearchImageResult(type='image', name='√100以上 amazon rainforest deforestation rate per day 269464-Amazon ...', url='https://static01.nyt.com/images/2020/06/07/world/07amazon-bw/06amazon-mediumSquareAt3X.jpg'),
  LinkupSearchImageResult(type='image', name='Amazon Forest Deforestation', url='https://infoamazonia.org/wp-content/uploads/2022/02/50224578572_2b105d3b5e_o.jpg'),
  LinkupSearchImageResult(type='image', name='Brazil has deforested 10,000 square kilometers of Amazon rainforest in ...', url='https://idsb.tmgrup.com.tr/ly/uploads/images/2020/06/10/40283.jpg'),
  LinkupSearchImageResult(type='image', name='Describe Several Consequences of Rainforest Deforestation Read More ...', url='https://www.internetgeography.net/wp-content/uploads/2019/06/Gold-mining-in-the-Amazon-Rainforest.jpg'),
  LinkupSearchImageResult(type='image', name='Deforestation Amazon Rainforest', url='https://grist.org/wp-content/uploads/2022/03/GettyImages-1228062652.jpg'),
  LinkupSearchImageResult(type='image', name='Deforestation in Brazil is surging again — after years of decline - Vox', url='https://cdn1.vox-cdn.com/thumbor/dmZLKnfH2zl9uLLzyxti1yWEfO0=/cdn0.vox-cdn.com/uploads/chorus_asset/file/2373910/184252072.0.jpg'),
  LinkupSearchImageResult(type='image', name="Deforestation in Amazon forest affecting Brazil's climate - Dynamite News", url='https://www.dynamitenews.com/images/2019/08/31/deforestation-in-amazon-forest-affecting-brazils-climate/5d6a6147de851.jpeg'),
  LinkupSearchImageResult(type='image', name='Tropical forest loss sped up in 2022, despite pledges to halt ...', url='https://grist.org/wp-content/uploads/2023/06/amazon-deforestation-road.jpg'),
  LinkupSearchImageResult(type='image', name='5 ways to help the Amazon Rainforest | WWF', url='https://www.wwf.org.uk/sites/default/files/styles/content_slide_image/public/2019-08/Deforestation%20in%20the%20amazon.jpg?h=96614ff5&itok=UcoKwZ8q'),
  LinkupSearchImageResult(type='image', name='Amazon Deforestation', url='https://scx2.b-cdn.net/gfx/news/2020/1-ahandoutpict.jpg'),
  LinkupSearchImageResult(type='image', name='Illiegal_logging_indigineous_lands_Amazon_deforestation_via ...', url='https://modernconsensus.com/wp-content/uploads/2020/06/Illiegal_logging_indigineous_lands_Amazon_deforestation_via-CamillaCosta.jpg'),
]

This example shows you how to use the dates filter:

from linkup import LinkupClient
from datetime import date

client = LinkupClient(api_key="YOUR_API_KEY")

search_response = client.search(
    query="What are the recent advancements in artificial intelligence technology",
    depth="standard",
    output_type="sourcedAnswer",
    from_date=date(2025, 3, 1),
    to_date=date(2025, 3, 5),
)

print(search_response)
Example response:
answer='1. A call for a new approach to achieve human-level reasoning in AI systems has been highlighted by researchers. [Read more](https://www.nature.com/articles/d41586-025-00649-4).\n\n2. The release of DeepSeek, an AI chatbot, has raised new cybersecurity concerns. [Read more](https://www.law.com/newyorklawjournal/2025/03/04/deepseek-sparks-new-cyber-challenges-in-the-ai-chatbot-era/).\n\n3. AI continues to transform everyday life, influencing communication, work, and leisure activities. [Read more](https://signalscv.com/2025/03/how-technology-is-changing-our-everyday-life-from-ai-to-the-internet-of-things/).\n\n4. The integration of AI with other technologies is driving innovation and growth in business sectors. [Read more](https://www.independent.com.mt/articles/2025-03-02/newspaper-opinions/The-intersection-of-technology-and-business-Paving-the-way-for-innovation-and-growth-6736268254).'
sources=[
  LinkupSource(name='How AI can achieve human-level intelligence: researchers call for change in tack', url='https://www.nature.com/articles/d41586-025-00649-4', snippet='Artificial intelligence (AI) systems with human-level reasoning are unlikely to be achieved through the approach and technology ... Heights, New York, who spearheaded the survey in her role as president of the Association for the Advancement of Artificial ...'),
  LinkupSource(name='DeepSeek Sparks New Cyber Challenges In the AI Chatbot Era', url='https://www.law.com/newyorklawjournal/2025/03/04/deepseek-sparks-new-cyber-challenges-in-the-ai-chatbot-era/', snippet='This article discusses DeepSeek, an artificial intelligence chatbot that was released in January of this year, and the concerns it raises around security and rapidly advancing technology.'),
  LinkupSource(name='How Technology is Changing Our Everyday Life: From AI to the Internet of Things', url='https://signalscv.com/2025/03/how-technology-is-changing-our-everyday-life-from-ai-to-the-internet-of-things/', snippet='Technology has revolutionized our lives, transforming how we communicate, work, shop, and even unwind. In a world driven by rapid innovation, technologies like artificial intelligence (AI), the Internet of Things'),
  LinkupSource(name='The intersection of technology and business: Paving the way for innovation and growth', url='https://www.independent.com.mt/articles/2025-03-02/newspaper-opinions/The-intersection-of-technology-and-business-Paving-the-way-for-innovation-and-growth-6736268254', snippet='In the fast-paced world of business, the integration of innovative technologies has become a crucial driver of success. As an advocate for Artificial Intelligence (AI), Blockchain, Data Analytics, and')
]

Additional ressources

Prompting guide

We strongly recommend you to read our prompting guide to best prompt the Linkup API and get optimal results. Even small improvements in how you structure your prompts can dramatically enhance the quality of responses and the overall user experience.

Structured output guide

We strongly recommend you to read our structured output guide to ensure consistency in the response format. Mastering structured outputs allows you to fully leverage Linkup’s capabilities while maintaining complete control over how the information is presented and processed in your application.

Tutorials

Don’t hesitate to check our tutorials for other ideas of what to build with Linkup! And voilà ! You’re now ready to implement the Linkup SDK inside your fabulous project ! 🚀
Facing issues? Reach out to our engineering team at support@linkup.so or via our Discord or book a 15 minutes call with a member of our technical team.
I