{"openapi":"3.1.0","info":{"title":"CrawlNest API","version":"1.0.0","description":"Asynchronous crawler jobs. Each accepted job counts as one request."},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"paths":{"/v1/crawlers/instagram-comments/run":{"post":{"summary":"Instagram Comments","description":"## Instagram Comments\n\nExtract comments from a public Instagram post or reel.\n\nThe crawler loads the page using Scrapy + Playwright, extracts initial comments, and continues pagination using Scrapy.\n\n### Input parameters\n\n- `url` — Required. HTTPS Instagram post or reel URL.\n- `max_comments` — Optional. Maximum comments to return. Default: `12`. Use `0` for all available comments within the runtime limit.\n\n### Example input\n\n{\n  \"url\": \"https://www.instagram.com/p/DdkAAtEvK0Y/\",\n  \"max_comments\": 100\n}\n\n### Output\n\nReturns a list of comment objects. Every field supplied by Instagram is preserved, including nested objects and null values. Each comment also includes `post_url`.\n\nFields may include comment ID, text, author information, creation time, likes, and reply count, depending on Instagram's response.\n\nWhen structured comment data is unavailable, HTML fallback records include:\n`pk`, `source`, `username`, `text_candidates`, `created_at_iso`,\n`comment_url`, `profile_pic_url`, `post_url`, and `raw_html`.\n\n### Pagination\n\nPagination is automatic. Collection stops when the requested limit is reached or Instagram indicates there are no further pages. A request failure may leave partial results.\n\n### URL formats\n\nAccepts `/p/CODE/`, `/reel/CODE/`, and `/reels/CODE/`, including username-prefixed paths. Supported URLs normalize to `https://www.instagram.com/p/CODE/`.\n","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"params":{"type":"object","properties":{"url":{"type":"string","description":"Instagram post or reel URL.","example":"https://www.instagram.com/p/DdkAAtEvK0Y/"},"max_comments":{"type":"integer","description":"Maximum comments. 0 collects all available within the runtime limit.","default":12,"minimum":0,"maximum":100000}},"required":["url"],"additionalProperties":false}},"required":["params"],"additionalProperties":false}}}},"responses":{"202":{"description":"Job accepted. Poll /v1/jobs/{job_id}; download /v1/jobs/{job_id}/download?format=json or csv."},"401":{"description":"Invalid API key"},"429":{"description":"Quota or queue limit reached"}}}},"/v1/crawlers/instagram-posts/run":{"post":{"summary":"Instagram Posts","description":"Supply a username without @. amount defaults to 12; use 0 for no item-count limit. Jobs have a 20-minute runtime limit. Initial posts are extracted from embedded page JSON before following Show more and subsequent Scrapy pagination. Every field returned in each post node is retained, including nested objects and null values. post_url is added from code as https://www.instagram.com/p/{code}/. Duplicate posts are removed by ID. Instagram may return different fields for initial and later pages; fields absent upstream are not invented. Private or unavailable profiles may fail or return fewer records. POST creates a job (HTTP 202); poll /v1/jobs/{job_id} and download complete JSON or CSV after completion.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"params":{"type":"object","properties":{"username":{"type":"string","description":"Instagram username without @","example":"leomessi"},"amount":{"type":"integer","description":"0: no record-count limit; 20-minute runtime limit still applies.","default":12,"minimum":0,"maximum":5000}},"required":["username"],"additionalProperties":false}},"required":["params"],"additionalProperties":false}}}},"responses":{"202":{"description":"Job accepted. Poll /v1/jobs/{job_id}; download /v1/jobs/{job_id}/download?format=json or csv."},"401":{"description":"Invalid API key"},"429":{"description":"Quota or queue limit reached"}}}}}}