This official Python SDK is the synchronous way to integrate with Linked API. It provides pre-defined workflow operations, direct account/statistics methods, admin APIs, authentication headers, polling, and structured error responses.
Get started
To get started with Linked API Python SDK, read these essential guides first:
- Core concepts - understand how Linked API works.
- Installation & authorization - install the SDK and authorize it.
- Predefined vs. custom workflows - choose ready-made operations or custom workflow definitions.
- Handling results and errors - process successful data and action errors.
- Persisting and cancelling workflows - save, resume, and cancel workflows.
Install the package:
pip install linkedapi
Initialize the client:
from linkedapi import LinkedApi, LinkedApiConfig
linkedapi = LinkedApi(
LinkedApiConfig(
linked_api_token="your-linked-api-token",
identification_token="your-identification-token",
)
)
Run a predefined workflow and poll the result:
from linkedapi import FetchPersonParams
workflow = linkedapi.fetch_person.execute(
FetchPersonParams(
person_url="https://www.linkedin.com/in/john-doe",
retrieve_experience=True,
retrieve_posts=True,
posts_retrieval_config={"limit": 10},
)
)
result = linkedapi.fetch_person.result(workflow.workflow_id)
if result.data:
print(result.data.name)
for error in result.errors:
print(error.type, error.message)
Execute a custom workflow:
workflow = linkedapi.custom_workflow.execute(
{
"actionType": "st.searchCompanies",
"term": "Tech Inc",
"filter": {
"sizes": ["51-200", "2001-5000"],
"locations": ["San Francisco", "New York"],
"industries": ["Software Development"],
},
"then": {"actionType": "st.openCompanyPage", "basicInfo": True},
}
)
result = linkedapi.custom_workflow.result(workflow.workflow_id)
print(result.data)
Continue polling after a workflow timeout:
from linkedapi import LinkedApiWorkflowTimeoutError
try:
result = linkedapi.fetch_person.result(workflow.workflow_id, timeout=30.0)
except LinkedApiWorkflowTimeoutError as error:
result = linkedapi.fetch_person.result(error.workflow_id)
Cancel a workflow:
cancelled = linkedapi.fetch_person.cancel(workflow.workflow_id)
print(cancelled)
License
This project is licensed under the MIT License. See LICENSE for details.
Metadata
Release files for linkedapi 1.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linkedapi-1.6.2.tar.gz | 73.9 kB | With provenance | Details for linkedapi-1.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linkedapi-1.6.2-py3-none-any.whl | Python 3 | none | any | Details for linkedapi-1.6.2-py3-none-any.whl |
Total release size: 171.1 kB
Release files / linkedapi-1.6.2.tar.gz
| Download URL | linkedapi-1.6.2.tar.gz |
|---|---|
| Size | 73.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a0a87545ed5cc42870023d5759cdc86b90a36d81fc2ad090db99debd0a81ecd
|
|
BLAKE2b-256 checksum How to use checksums |
80d3b6477cfb434c188ae16ae7395898885759c3bfb2b8a7d4541eab6b430f35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / linkedapi-1.6.2-py3-none-any.whl
| Download URL | linkedapi-1.6.2-py3-none-any.whl |
|---|---|
| Size | 97.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b41bc0ac2cc3f22fba8dc782417029881947a16b68cfab9aa7692f7cef49adc7
|
|
BLAKE2b-256 checksum How to use checksums |
b2209b3f930079f38bf9c6396885348c9a46faff658dd84886248400fe385fbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for linkedapi 1.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for linkedapi-1.6.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.