This endpoint creates new tasks within a specified squid. Tasks define the specific scraping jobs to be executed, such as URLs to scrape or search parameters.Note: The accepted task input keys (e.g., url, city, activity) depend on the crawler used in your squid. Use the Get Crawler Parameters endpoint to discover valid keys for your crawler.
Identifier of the crawler module this task belongs to.
Use the Get Crawler Parameters endpoint to discover which task keys are valid for your specific crawler.
Duplicate tasks (same parameters) are automatically detected and not added. Check duplicated_count in the response.
Tasks you add while a run is in progress join that run: it checks the task list again each time a scraper finishes a task. If the run has already finished, start a new one with Start Run.
Task parameters vary by crawler. Using invalid keys will result in task creation failure.
For bulk task creation, consider using the Upload Tasks endpoint with a CSV file instead.
{ "error": { "message": "Invalid task parameters. Each task must contain required fields for the crawler.", "type": "validation_error", "param": "tasks" }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"lobstr.io","colors":{"primary":"#ff0000","light":"#ff3333","dark":"#cc0000"},"logo":{"light":"https://mintcdn.com/lobstrio-1abc571c/DC4W-U36rZa-JMtR/logo/light.svg?fit=max\u0026auto=format\u0026n=DC4W-U36rZa-JMtR\u0026q=85\u0026s=57f8a1cecd8d7769fa2a89b10a92e3d3","dark":"https://mintcdn.com/lobstrio-1abc571c/DC4W-U36rZa-JMtR/logo/dark.svg?fit=max\u0026auto=format\u0026n=DC4W-U36rZa-JMtR\u0026q=85\u0026s=45241588af9c1e3237e448279a993681"},"favicon":"https://mintcdn.com/lobstrio-1abc571c/to9RtopRArtv238L/favicon.svg?fit=max\u0026auto=format\u0026n=to9RtopRArtv238L\u0026q=85\u0026s=a8baa387944aae029967a070d3815fd3","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.lobstr.io"}},"navbar":{"links":[{"href":"https://www.lobstr.io","label":"lobstr.io"}],"primary":{"type":"button","label":"Get Started","href":"https://app.lobstr.io"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lobstrio-1abc571c","hasAudioNarration":false,"actualSubdomain":"lobstrio-1abc571c","customDomains":["docs.lobstr.io"],"gitSource":{"type":"github","owner":"lobstrio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae09e9aa121a5eeefc698be","collectionId":"0cd4da48-9bb2-4c24-8b28-89387a666179","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae09e9aa121a5eeefc698be"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae09e9aa121a5eeefc698be","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Examples","count":329},{"language":"default","tag":"API Reference","count":60},{"language":"default","tag":"Changelog","count":34},{"language":"default","tag":"2026","count":33},{"language":"default","tag":"Run","count":10},{"language":"default","tag":"Squid","count":10},{"language":"default","tag":"Account","count":9},{"language":"default","tag":"Developer Tools","count":8},{"language":"default","tag":"Google Maps Leads Scraper","count":7},{"language":"default","tag":"Task","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"docs/add-tasks","slug":"/docs/add-tasks","pageMetadata":{"title":"Add Tasks","description":"Create new tasks within a specified squid","api":"POST https://api.lobstr.io/v1/tasks","href":"/docs/add-tasks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create new tasks within a specified squid\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,ResponseField,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint creates new tasks within a specified squid. Tasks define the specific scraping jobs to be executed, such as URLs to scrape or search parameters.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note:`}),` The accepted task input keys (e.g., `,_jsx(_components.code,{children:`url`}),`, `,_jsx(_components.code,{children:`city`}),`, `,_jsx(_components.code,{children:`activity`}),`) depend on the crawler used in your squid. Use the Get Crawler Parameters endpoint to discover valid keys for your crawler.`]}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Your API authentication token. Value: `,_jsx(_components.code,{children:`Token YOUR_API_KEY`})]})}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,required:true,id:`param-content-type`,children:_jsxs(_components.p,{children:[`Must be application/json. Value: `,_jsx(_components.code,{children:`application/json`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`squid`,type:`string`,required:true,id:`param-squid`,children:_jsxs(_components.p,{children:[`The hash ID of the squid to add tasks to. Example: `,_jsx(_components.code,{children:`\"a1b2c3d4e5f6g7h8i9j0\"`})]})}),`\n`,_jsx(ParamField,{body:`tasks`,type:`array`,required:true,id:`param-tasks`,children:_jsxs(_components.p,{children:[`Array of task objects. Each task contains parameters specific to the crawler. Example: `,_jsx(_components.code,{children:`[{\"url\": \"https://example.com\"}]`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`response-field-explanations`,children:`Response Field Explanations`}),`\n`,_jsx(ResponseField,{name:`duplicated_count`,type:`integer`,id:`param-duplicated-count`,children:_jsxs(_components.p,{children:[`Number of tasks that were duplicates and not added. Example: `,_jsx(_components.code,{children:`0`})]})}),`\n`,_jsx(ResponseField,{name:`tasks`,type:`array`,id:`param-tasks-1`,children:_jsx(_components.p,{children:`Array of created task objects.`})}),`\n`,_jsx(ResponseField,{name:`tasks[].id`,type:`string`,id:`param-tasks-id`,children:_jsxs(_components.p,{children:[`Unique task identifier (hash). Example: `,_jsx(_components.code,{children:`\"c5e29d2aba8b77cdc56391e7405302de\"`})]})}),`\n`,_jsx(ResponseField,{name:`tasks[].object`,type:`string`,id:`param-tasks-object`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`\"task\"`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`tasks[].created_at`,type:`string`,id:`param-tasks-created-at`,children:_jsxs(_components.p,{children:[`Task creation timestamp (ISO 8601). Example: `,_jsx(_components.code,{children:`\"2025-02-10T14:19:32.916901\"`})]})}),`\n`,_jsx(ResponseField,{name:`tasks[].is_active`,type:`boolean`,id:`param-tasks-is-active`,children:_jsxs(_components.p,{children:[`Whether the task is active and ready to run. Example: `,_jsx(_components.code,{children:`true`})]})}),`\n`,_jsx(ResponseField,{name:`tasks[].params`,type:`object`,id:`param-tasks-params`,children:_jsxs(_components.p,{children:[`Task parameters specific to the crawler (URL, search terms, etc.). Example: `,_jsx(_components.code,{children:`{\"url\": \"https://...\"}`})]})}),`\n`,_jsx(ResponseField,{name:`tasks[].module`,type:`string`,id:`param-tasks-module`,children:_jsx(_components.p,{children:`Identifier of the crawler module this task belongs to.`})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Use the Get Crawler Parameters endpoint to discover which task keys are valid for your specific crawler.`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Duplicate tasks (same parameters) are automatically detected and not added. Check duplicated_count in the response.`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Tasks you add while a run is in progress join that run: it checks the task list again each time a scraper finishes a task. If the run has already finished, start a new one with Start Run.`})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Task parameters vary by crawler. Using invalid keys will result in task creation failure.`})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`For bulk task creation, consider using the Upload Tasks endpoint with a CSV file instead.`})}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code Examples`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.lobstr.io/v1/tasks\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Token YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"squid\": \"a1b2c3d4e5f6g7h8i9j0\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tasks\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"url\": \"https://www.linkedin.com/in/johndoe\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"url\": \"https://www.linkedin.com/in/janedoe\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`26`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`url `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.lobstr.io/v1/tasks\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Token YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Define tasks to add to the squid`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`payload `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"squid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a1b2c3d4e5f6g7h8i9j0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tasks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.linkedin.com/in/johndoe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.linkedin.com/in/janedoe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`payload)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Added `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'tasks'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tasks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Duplicates skipped: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'duplicated_count'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Display created task IDs`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` task `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'tasks'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" - `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`task[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:`200`,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"duplicated_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tasks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6b9d3afdf4e76df374915a50d7a495c4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-02-10T14:19:32.916901\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.linkedin.com/in/johndoe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"module\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4734d096159ef05210e0e1677e8be823\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c5e29d2aba8b77cdc56391e7405302de\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-02-10T14:19:32.916901\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.linkedin.com/in/janedoe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"module\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"4734d096159ef05210e0e1677e8be823\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`400`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid task parameters. Each task must contain required fields for the crawler.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"validation_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"param\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tasks\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Add Tasks","description":"Create new tasks within a specified squid","api":"POST https://api.lobstr.io/v1/tasks","href":"/docs/add-tasks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response Field Explanations","slug":"response-field-explanations","depth":2,"children":[]},{"title":"Code Examples","slug":"code-examples","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Add Tasks","path":"/v1/tasks","servers":[{"url":"https://api.lobstr.io"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Your API authentication token. Value: `Token YOUR_API_KEY`","required":true}]},"Content-Type":{"schema":[{"type":"string","description":"Must be application/json. Value: `application/json`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"squid":[{"type":"string","description":"The hash ID of the squid to add tasks to. Example: `\"a1b2c3d4e5f6g7h8i9j0\"`","required":true}],"tasks":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Array of task objects. Each task contains parameters specific to the crawler. Example: `[{\"url\": \"https://example.com\"}]`","required":true}]}}],"examples":{"example":{"value":{"squid":"\u003cstring>","tasks":[{}]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"duplicated_count":[{"type":"integer","description":"Number of tasks that were duplicates and not added. Example: `0`"}],"tasks":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Array of created task objects."}],"tasks[].id":[{"type":"string","description":"Unique task identifier (hash). Example: `\"c5e29d2aba8b77cdc56391e7405302de\"`"}],"tasks[].object":[{"type":"string","description":"Always `\"task\"` ."}],"tasks[].created_at":[{"type":"string","description":"Task creation timestamp (ISO 8601). Example: `\"2025-02-10T14:19:32.916901\"`"}],"tasks[].is_active":[{"type":"boolean","description":"Whether the task is active and ready to run. Example: `true`"}],"tasks[].params":[{"type":"object","properties":{},"description":"Task parameters specific to the crawler (URL, search terms, etc.). Example: `{\"url\": \"https://...\"}`"}],"tasks[].module":[{"type":"string","description":"Identifier of the crawler module this task belongs to."}]}}],"examples":{"example":{"value":{"duplicated_count":123,"tasks":[{}],"tasks[].id":"\u003cstring>","tasks[].object":"\u003cstring>","tasks[].created_at":"\u003cstring>","tasks[].is_active":true,"tasks[].params":{},"tasks[].module":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"lobstrio-1abc571c","siteName":"lobstr.io","title":"Add Tasks - lobstr.io","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-20T14:01:42.807Z","originalFileLocation":"docs/add-tasks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create new tasks within a specified squid\">\u003cmeta data-mint-head name=\"application-name\" content=\"lobstr.io\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Add Tasks - lobstr.io\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create new tasks within a specified squid\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"lobstr.io\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lobstr.io/docs/add-tasks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lobstrio-1abc571c.mintlify.app/_mintlify/api/og/v2?division=Task\u0026amp;title=Add+Tasks\u0026amp;description=Create+new+tasks+within+a+specified+squid\u0026amp;theme=8ea60e66a94c321fc923be1d\u0026amp;signature=bde29588ee0bc1c2067e5c79e2dc0a2bf51278883162132b3d361fe256b8e50d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Add Tasks - lobstr.io\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create new tasks within a specified squid\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lobstrio-1abc571c.mintlify.app/_mintlify/api/og/v2?division=Task\u0026amp;title=Add+Tasks\u0026amp;description=Create+new+tasks+within+a+specified+squid\u0026amp;theme=8ea60e66a94c321fc923be1d\u0026amp;signature=bde29588ee0bc1c2067e5c79e2dc0a2bf51278883162132b3d361fe256b8e50d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lobstrio-1abc571c/QoUCw7MJzBACafij/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"lobstr.io\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff0000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lobstr.io/docs/add-tasks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/add-tasks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lobstr.io/#organization\",\"name\":\"lobstr.io\",\"url\":\"https://docs.lobstr.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lobstrio-1abc571c/DC4W-U36rZa-JMtR/logo/light.svg?fit=max\u0026auto=format\u0026n=DC4W-U36rZa-JMtR\u0026q=85\u0026s=57f8a1cecd8d7769fa2a89b10a92e3d3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lobstr.io#website\",\"name\":\"lobstr.io\",\"url\":\"https://docs.lobstr.io\",\"publisher\":{\"@id\":\"https://docs.lobstr.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lobstr.io/docs/add-tasks#webpage\",\"url\":\"https://docs.lobstr.io/docs/add-tasks\",\"name\":\"Add Tasks\",\"description\":\"Create new tasks within a specified squid\",\"dateModified\":\"2026-10-20T14:01:42.807Z\",\"isPartOf\":{\"@id\":\"https://docs.lobstr.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lobstr.io/docs/add-tasks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lobstr.io/docs/add-tasks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"lobstr.io\",\"item\":\"https://docs.lobstr.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Tasks\",\"item\":\"https://docs.lobstr.io/docs/add-tasks\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lobstr.io/docs/add-tasks#apireference\",\"headline\":\"Add Tasks\",\"name\":\"Add Tasks\",\"description\":\"Create new tasks within a specified squid\",\"url\":\"https://docs.lobstr.io/docs/add-tasks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lobstr.io/docs/add-tasks#webpage\"},\"dateModified\":\"2026-10-20T14:01:42.807Z\",\"publisher\":{\"@id\":\"https://docs.lobstr.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lobstr.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"lobstr.io\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"lobstr.io","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"lobstr.io API Documentation","href":""}]},{"group":"Getting Started","pages":[{"title":"Quickstart","href":"/docs/quickstart"},{"title":"Authentication","api":"GET https://api.lobstr.io/v1/me","href":"/docs/authentication"},{"title":"Rate Limiting","href":"/docs/rate-limiting"}]},{"group":"Core Concepts","pages":[{"title":"Concepts","href":"/docs/concepts"},{"title":"Pricing","href":"/docs/pricing"},{"title":"Pagination","href":"/docs/pagination"},{"title":"Errors","href":"/docs/errors"},{"title":"Supported Timezones","href":"/docs/timezones"}]},{"group":"User","pages":[{"title":"Get User Profile","api":"GET https://api.lobstr.io/v1/me","href":"/docs/user-me"},{"title":"Get Balance","api":"GET https://api.lobstr.io/v1/user/balance","href":"/docs/get-balance"},{"title":"Auto Billing Reset","api":"GET https://api.lobstr.io/v1/plans/auto-reset","href":"/docs/auto-billing-reset"},{"title":"Rotate API Key","api":"POST https://api.lobstr.io/v1/me/rotate_token","href":"/docs/rotate-api-key"},{"title":"Community Story Rewards","href":"/docs/community-rewards"}]},{"group":"Crawler","pages":[{"title":"List Crawlers","api":"GET https://api.lobstr.io/v1/crawlers","href":"/docs/list-crawlers"},{"title":"Get Crawler Details","api":"GET https://api.lobstr.io/v1/crawlers/{crawler_hash}","href":"/docs/get-crawler-details"},{"title":"Get Crawler Parameters","api":"GET https://api.lobstr.io/v1/crawlers/{crawler_hash}/params","href":"/docs/get-crawler-parameters"},{"title":"Get Crawler Attributes","api":"GET https://api.lobstr.io/v1/crawlers/{crawler_hash}/attributes","href":"/docs/get-crawler-attributes"}]},{"group":"Squid","pages":[{"title":"Create Squid","api":"POST https://api.lobstr.io/v1/squids","href":"/docs/create-squid"},{"title":"Update Squid","api":"POST https://api.lobstr.io/v1/squids/{squid_hash}","href":"/docs/update-squid"},{"title":"List Squids","api":"GET https://api.lobstr.io/v1/squids","href":"/docs/list-squids"},{"title":"Get Squid Details","api":"GET https://api.lobstr.io/v1/squids/{squid_hash}","href":"/docs/get-squid-details"},{"title":"Empty Squid","api":"POST https://api.lobstr.io/v1/squids/{squid_hash}/empty","href":"/docs/empty-squid"},{"title":"Delete Squid","api":"DELETE https://api.lobstr.io/v1/squids/{squid_hash}","href":"/docs/delete-squid"},{"title":"Configure Squid Chain","api":"POST https://api.lobstr.io/v1/squids/{id}/chain","href":"/docs/configure-squid-chain"},{"title":"Get Squid Chain","api":"GET https://api.lobstr.io/v1/squids/{id}/chain","href":"/docs/get-squid-chain"},{"title":"Update Squid Chain","api":"PATCH https://api.lobstr.io/v1/squids/{id}/chain","href":"/docs/update-squid-chain"},{"title":"Delete Squid Chain","api":"DELETE https://api.lobstr.io/v1/squids/{id}/chain","href":"/docs/delete-squid-chain"}]},{"group":"Delivery","pages":[{"title":"Configure Email Delivery","api":"POST https://api.lobstr.io/v1/delivery?squid={squid_hash}","href":"/docs/configure-email-delivery"},{"title":"Configure SFTP Delivery","api":"POST https://api.lobstr.io/v1/delivery?squid={squid_hash}","href":"/docs/configure-sftp-delivery"},{"title":"Configure Google Sheet Delivery","api":"POST https://api.lobstr.io/v1/delivery?squid={squid_hash}","href":"/docs/configure-google-sheet-delivery"},{"title":"Configure Amazon S3 Delivery","api":"POST https://api.lobstr.io/v1/delivery?squid={squid_hash}","href":"/docs/configure-s3-delivery"},{"title":"Configure Webhook Delivery","api":"POST https://api.lobstr.io/v1/delivery?squid={squid_hash}","href":"/docs/configure-webhook-delivery"},{"title":"Test Delivery Configuration","api":"POST https://api.lobstr.io/v1/delivery/test-webhook","href":"/docs/test-delivery"}]},{"group":"Account","pages":[{"title":"List Accounts","api":"GET https://api.lobstr.io/v1/accounts","href":"/docs/list-accounts"},{"title":"List Account Types","api":"GET https://api.lobstr.io/v1/account_types","href":"/docs/list-account-types"},{"title":"Get Account Details","api":"GET https://api.lobstr.io/v1/accounts/{account_hash}","href":"/docs/get-account-details"},{"title":"Link Account to Squid","api":"POST https://api.lobstr.io/v1/squids/{squid_hash}","href":"/docs/link-account-to-squid"},{"title":"Sync Account","api":"POST https://api.lobstr.io/v1/accounts/cookies","href":"/docs/sync-account"},{"title":"Check Sync Status","api":"GET https://api.lobstr.io/v1/synchronize/{sync_task_id}","href":"/docs/check-sync-status"},{"title":"Update Account Limits","api":"POST https://api.lobstr.io/v1/accounts","href":"/docs/update-account-limits"},{"title":"Refresh Cookies","api":"POST https://api.lobstr.io/v1/accounts/cookies","href":"/docs/refresh-cookies"},{"title":"Delete Account","description":"Permanently remove a platform account from your Lobstr account","api":"DELETE https://api.lobstr.io/v1/accounts/{account_hash}","href":"/docs/delete-account"}]},{"group":"Task","pages":[{"title":"Add Tasks","api":"POST https://api.lobstr.io/v1/tasks","href":"/docs/add-tasks"},{"title":"Upload Tasks","description":"Upload a CSV/TSV file containing multiple tasks for a squid","api":"POST https://api.lobstr.io/v1/tasks/upload","href":"/docs/upload-tasks"},{"title":"Check Upload Status","api":"GET https://api.lobstr.io/v1/tasks/upload/{upload_task_id}","href":"/docs/check-upload-status"},{"title":"List Tasks","api":"GET https://api.lobstr.io/v1/tasks","href":"/docs/list-tasks"},{"title":"Get Task","api":"GET https://api.lobstr.io/v1/tasks/{task_hash}","href":"/docs/get-task"},{"title":"Delete Task","api":"DELETE https://api.lobstr.io/v1/tasks/{task_hash}","href":"/docs/delete-task"}]},{"group":"Run","pages":[{"title":"Start Run","api":"POST https://api.lobstr.io/v1/runs","href":"/docs/start-run"},{"title":"List Runs","api":"GET https://api.lobstr.io/v1/runs","href":"/docs/list-runs"},{"title":"Get Run","api":"GET https://api.lobstr.io/v1/runs/{run_hash}","href":"/docs/get-run"},{"title":"Get Run Stats","api":"GET https://api.lobstr.io/v1/runs/{run_hash}/stats","href":"/docs/get-run-stats"},{"title":"Get Run Credits","api":"GET https://api.lobstr.io/v1/runs/{run_hash}/credits","href":"/docs/get-run-credits"},{"title":"Get Run Tasks","api":"GET https://api.lobstr.io/v1/runtasks","href":"/docs/get-run-tasks"},{"title":"Retry Run Task","api":"POST https://api.lobstr.io/v1/runs/{run_hash}/tasks/{task_hash}/retry","href":"/docs/retry-run-task"},{"title":"Resurrect Run","api":"POST https://api.lobstr.io/v1/runs/{run_key}/resurrect","href":"/docs/resurrect-run"},{"title":"Abort Run","api":"POST https://api.lobstr.io/v1/runs/{run_hash}/abort","href":"/docs/abort-run"},{"title":"Download Run","api":"GET https://api.lobstr.io/v1/runs/{run_hash}/download","href":"/docs/download-run"}]},{"group":"Result","pages":[{"title":"Get Results","api":"GET https://api.lobstr.io/v1/results","href":"/docs/get-results"}]}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples"}]},{"tab":"Developer Tools","pages":[{"title":"Developer Tools","href":"/docs/sdk"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"title":"Add Tasks - lobstr.io","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js"]}