Endpoint
Query Parameters
string
required
The task ID returned by any LinkedIn API endpoint
Response
boolean
Whether the request was successful
string
The task ID
string
Current task status:
pending, completed, or failedobject
The original input you provided when creating the task
object | null
The task result.
null while status is pending, populated when completedstring | null
Why the task failed. Present only when status is
failed, either the error the Chrome extension reported or a note that no extension picked the task up within 24 hours. Failed tasks are retryable: submit the same request again.Status Values
There is no
processing status. A task is pending until it is completed or failed.
Polling Pattern
Since all LinkedIn API tasks are asynchronous, you need to poll this endpoint to get results. Here is the recommended pattern:- Call a LinkedIn API endpoint (e.g.,
fetch-profile) to create a task - Receive the
api_agent_task_idin the response - Poll
get-task-statusevery 5 seconds - Stop polling when
statusiscompletedorfailed - Read the results from
task_output, or the reason fromerrorif it failed
Code Examples
Basic Polling
Polling with Bash Loop
Team Scoping
Task status queries are scoped to your team. You can only retrieve the status of tasks that were created with your API key. Attempting to check a task that belongs to a different team will return a404 error.
Error Responses
FAQ
How often should I poll?
How often should I poll?
We recommend polling every 5 seconds. This provides a good balance between responsiveness and avoiding unnecessary requests. Most tasks complete within 10-60 seconds.
What happens if a task never completes?
What happens if a task never completes?
A task stays
pending while no Chrome extension has picked it up. If none does within 24 hours, the task turns failed with the reason in error. Do not wait that long in code: set a client timeout of 2 to 3 minutes, check that the extension is active, and submit the task again.Can I check the status of multiple tasks at once?
Can I check the status of multiple tasks at once?
Currently, you can only check one task at a time. If you need to monitor multiple tasks, make separate requests for each task ID.
Do tasks expire?
Do tasks expire?
No. Task records are kept indefinitely. You can check the status of a completed task at any time to re-read its output.
What task_type values will I see in task_input?
What task_type values will I see in task_input?
The
task_type field in task_input indicates which endpoint created the task:agent_profile_fetch- from Fetch Profileagent_profiles_tracking- from Fetch Postsagent_company_fetch- from Fetch Companyagent_company_tracking- from Fetch Company Postsagent_like_post- from Like Postagent_comment_post- from Comment on Postagent_send_message- from Send Messageagent_search_profiles- from Search Profilesagent_fetch_connections- from Fetch Connections
Related
- Fetch Profile - Creates profile fetch tasks
- Fetch Posts - Creates post fetch tasks
- Fetch Company - Creates company fetch tasks
- Fetch Company Posts - Creates company post fetch tasks
- Like Post - Creates like tasks
- Comment on Post - Creates comment tasks
- Send Message - Creates message send tasks
- Search Profiles - Creates profile search tasks
- Fetch Connections - Creates connection fetch tasks

