Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ benefit from Linkup services to the full extent. 📝
## 🌟 Features

- ✅ **Simple and intuitive API client.**
- 🔍 **Support all Linkup entrypoints and parameters.**
- 🔍 **Supports Linkup search, fetch, research, and task workflows.**
- ⚡ **Support synchronous and asynchronous calls.**
- 🔒 **Handle authentication and request management.**
- 💳 **Built-in x402 payment protocol support for on-chain payments.**
Expand Down Expand Up @@ -166,6 +166,50 @@ Check the code or the
[official documentation](https://docs.linkup.so/pages/documentation/api-reference/endpoint/post-fetch)
for the detailed list of available parameters.

#### 🧠 Research

The `research` function creates an asynchronous research task. You can then use `get_research` or
`list_research` to inspect it later.

```python
from linkup import LinkupClient, LinkupResearchTask

client = LinkupClient()
research_task: LinkupResearchTask = client.research(
query="What changed in the AI browser market this quarter?",
output_type="sourcedAnswer",
)
print(research_task.id)
```

#### 🗂️ Tasks

The `create_tasks` function lets you submit mixed `search`, `fetch`, and `research` jobs in a single
batch, then inspect them through `get_task` or `list_tasks`.

```python
from linkup import (
LinkupClient,
LinkupFetchTaskInput,
LinkupSearchTaskInput,
)

client = LinkupClient()
tasks = client.create_tasks(
[
LinkupSearchTaskInput(
query="Linkup latest product updates",
depth="deep",
output_type="sourcedAnswer",
),
LinkupFetchTaskInput(
url="https://docs.linkup.so",
),
]
)
print([task.id for task in tasks])
```

#### ⌛ Asynchronous Calls

All the Linkup main functions come with an asynchronous counterpart, with the same behavior and the
Expand Down
26 changes: 26 additions & 0 deletions src/linkup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,59 @@
LinkupUnknownError,
)
from ._types import (
LinkupFetchImageExtraction,
LinkupFetchResponse,
LinkupFetchTask,
LinkupFetchTaskInput,
LinkupResearchTask,
LinkupResearchTaskInput,
LinkupResearchTasksPage,
LinkupSearchImageResult,
LinkupSearchResults,
LinkupSearchStructuredResponse,
LinkupSearchTask,
LinkupSearchTaskInput,
LinkupSearchTextResult,
LinkupSource,
LinkupSourcedAnswer,
LinkupTask,
LinkupTaskInput,
LinkupTaskMetadata,
LinkupTaskQuota,
LinkupTasksPage,
)
from ._version import __version__

__all__ = [
"LinkupAuthenticationError",
"LinkupClient",
"LinkupFailedFetchError",
"LinkupFetchImageExtraction",
"LinkupFetchResponse",
"LinkupFetchResponseTooLargeError",
"LinkupFetchTask",
"LinkupFetchTaskInput",
"LinkupFetchUrlIsFileError",
"LinkupInsufficientCreditError",
"LinkupInvalidRequestError",
"LinkupNoResultError",
"LinkupPaymentRequiredError",
"LinkupResearchTask",
"LinkupResearchTaskInput",
"LinkupResearchTasksPage",
"LinkupSearchImageResult",
"LinkupSearchResults",
"LinkupSearchStructuredResponse",
"LinkupSearchTask",
"LinkupSearchTaskInput",
"LinkupSearchTextResult",
"LinkupSource",
"LinkupSourcedAnswer",
"LinkupTask",
"LinkupTaskInput",
"LinkupTaskMetadata",
"LinkupTaskQuota",
"LinkupTasksPage",
"LinkupTimeoutError",
"LinkupTooManyRequestsError",
"LinkupUnknownError",
Expand Down
Loading
Loading