{"openapi":"3.1.0","info":{"title":"Scrapigator API","version":"1.0.0","description":"Export LinkedIn Sales Navigator leads and accounts, read and filter them, check what you already exported, and send them to webhooks or Google Sheets. Exports run in the user's own Chrome extension (their LinkedIn session never leaves their browser), so starting an export is asynchronous: poll GET /exports/{id} or attach a destination. Available on every plan; Free plan row limits apply.","contact":{"email":"support@scrapigator.com","url":"https://scrapigator.com/docs/api"}},"servers":[{"url":"https://scrapigator.com/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Account"},{"name":"Exports"},{"name":"Leads"},{"name":"Destinations"}],"paths":{"/account":{"get":{"tags":["Account"],"summary":"Plan, monthly usage and whether the extension is online","operationId":"getAccount","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports":{"get":{"tags":["Exports"],"summary":"List exports (newest first), including agent-queued ones","operationId":"listExports","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["needs_approval","waiting_for_browser","queued","planning","running","paused","finished","partial","failed","cancelled"]}},{"name":"kind","in":"query","schema":{"type":"string","enum":["leads","accounts"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"before","in":"query","schema":{"type":"string","format":"date-time"},"description":"Pagination: pass next_before from the previous page."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Export"}},"next_before":{"type":["string","null"]}}}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Exports"],"summary":"Start an export from a Sales Navigator search or saved list URL","description":"Queues the export for the user's Scrapigator extension. The user must allow agent exports once (status needs_approval) and have Chrome open (status waiting_for_browser). Pacing and LinkedIn limits are enforced by the extension. Searches over 2,500 leads are split automatically.","operationId":"startExport","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":200},"description":"Retries with the same key return the same export."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"https://www.linkedin.com/sales/search/people?query=..., /sales/search/company?query=..., /sales/lists/people/<id> or an account list URL."},"list_name":{"type":"string","maxLength":100},"only_new":{"type":"boolean","default":false,"description":"Skip leads/accounts this account exported before (not counted against quota)."},"max_rows":{"type":"integer","minimum":1,"maximum":100000},"destination_id":{"type":"string","format":"uuid","description":"Send rows to this webhook/Sheets destination when the export finishes."},"template":{"type":"string","enum":["all","essentials","crm"],"default":"all","description":"Column layout: all fields, essentials (name, title, company, location, links) or CRM import labels."}}}}}},"responses":{"202":{"description":"Accepted; poll the export","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports/{id}":{"get":{"tags":["Exports"],"summary":"Export status and progress","operationId":"getExport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Exports"],"summary":"Cancel an export started through the API","operationId":"cancelExport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports/{id}/rows":{"get":{"tags":["Leads"],"summary":"Read rows with filters (cursor pagination)","operationId":"getRows","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive text match across name, title, company, location and industry."},{"name":"title","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on title."},{"name":"company","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on company."},{"name":"location","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on location."},{"name":"industry","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on industry."},{"name":"template","in":"query","schema":{"type":"string","enum":["all","essentials","crm"],"default":"all","description":"Column layout: all fields, essentials (name, title, company, location, links) or CRM import labels."}},{"name":"fields","in":"query","schema":{"type":"string"},"description":"Comma-separated field names; overrides template."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","schema":{"type":"integer","minimum":0},"description":"next_cursor from the previous page."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"export_id":{"type":"string"},"kind":{"type":"string"},"total_rows":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","additionalProperties":true}},"next_cursor":{"type":["integer","null"]}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports/{id}/summary":{"get":{"tags":["Leads"],"summary":"Top companies, titles, seniority, locations, industries + 5-row sample","operationId":"summarizeExport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive text match across name, title, company, location and industry."},{"name":"title","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on title."},{"name":"company","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on company."},{"name":"location","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on location."},{"name":"industry","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive contains-match on industry."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports/{id}/csv-link":{"post":{"tags":["Leads"],"summary":"Signed CSV download link (15 minutes), optional filters","operationId":"createCsvLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","enum":["all","essentials","crm"],"default":"all","description":"Column layout: all fields, essentials (name, title, company, location, links) or CRM import labels."},"fields":{"type":"array","items":{"type":"string"}},"q":{"type":"string"},"title":{"type":"string"},"company":{"type":"string"},"location":{"type":"string"},"industry":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/exports/{id}/deliveries":{"post":{"tags":["Destinations"],"summary":"Send saved rows to a destination (idempotent per export snapshot)","operationId":"sendExport","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["destination_id"],"properties":{"destination_id":{"type":"string","format":"uuid"},"template":{"type":"string","enum":["all","essentials","crm"],"default":"all","description":"Column layout: all fields, essentials (name, title, company, location, links) or CRM import labels."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/deliveries/{id}":{"get":{"tags":["Destinations"],"summary":"Delivery progress","operationId":"getDelivery","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/identities/check":{"post":{"tags":["Leads"],"summary":"Which LinkedIn profiles/companies did this account already export?","operationId":"checkExported","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string"},"description":"linkedin.com/in/..., Sales Navigator lead/company URLs or lead IDs."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/destinations":{"get":{"tags":["Destinations"],"summary":"Connected webhooks and Google Sheets","operationId":"listDestinations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"default":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Destinations"],"summary":"Add an HTTPS webhook (returns signing secret once)","operationId":"addWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","url"],"properties":{"name":{"type":"string","maxLength":80},"url":{"type":"string","description":"Public https URL on port 443."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"signing_secret":{"type":"string"}}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/destinations/{id}":{"delete":{"tags":["Destinations"],"summary":"Disconnect a destination (cancels queued deliveries)","operationId":"removeDestination","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key (sgk_...) from https://scrapigator.com/agents, or an OAuth access token."}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":["string","null"]}}}}}}}}},"schemas":{"Account":{"type":"object","properties":{"email":{"type":"string"},"plan":{"type":"string","enum":["free","pro"]},"rows_used_this_month":{"type":"integer"},"rows_left_this_month":{"type":["integer","null"]},"resets_at":{"type":"string"},"extension_online":{"type":"boolean"},"extension_last_seen":{"type":["string","null"]},"agent_exports_allowed":{"type":"boolean"}}},"Export":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["leads","accounts"]},"source":{"type":"string"},"status":{"type":"string"},"next_step":{"type":["string","null"],"description":"What the user must do, if anything."},"row_count":{"type":"integer"},"skipped_already_exported":{"type":"integer"},"only_new":{"type":"boolean"},"coverage":{"type":"string"},"message":{"type":["string","null"]},"parts":{"type":"array","items":{"type":"object"}},"requested_by":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"Delivery":{"type":"object","properties":{"id":{"type":"string"},"export_id":{"type":"string"},"destination":{"type":"string"},"destination_kind":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["queued","sending","delivered","failed","cancelled"]},"sent_rows":{"type":"integer"},"total_rows":{"type":"integer"},"error":{"type":["string","null"]},"result_url":{"type":["string","null"]}}}}}}