{"_id":"@creatorcrawl/sdk","_rev":"3-1b1b4de50eeac6060374e2f694cda66d","name":"@creatorcrawl/sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@creatorcrawl/sdk","version":"0.1.0","keywords":["creatorcrawl","social-media-api","tiktok-api","instagram-api","youtube-api","linkedin-api","twitter-api","reddit-api","scraper","sdk","mcp"],"author":{"name":"CreatorCrawl","email":"support@creatorcrawl.com"},"license":"MIT","_id":"@creatorcrawl/sdk@0.1.0","maintainers":[{"name":"simonbalfe","email":"simon@simonbalfe.com"}],"homepage":"https://creatorcrawl.com","bugs":{"url":"https://github.com/simonbalfe/creatorcrawl-sdk-typescript/issues"},"dist":{"shasum":"52514e431a680304122d68e1710028baf641d355","tarball":"https://registry.npmjs.org/@creatorcrawl/sdk/-/sdk-0.1.0.tgz","fileCount":9,"integrity":"sha512-P4MhXGaSe4wwazsTRDAvtlP3gYgliBUe9QdSmqipfGhk2Bjq5mHf579dAdS53DQFAOVmVsoQiUbewXaAbbK1Kg==","signatures":[{"sig":"MEYCIQDyoV7pV4LkIS96wx4uxbXaxiERXMvUWuI9obmRUtjMWwIhAL8fgYumWbKqjR8KvqAVpEWO31+bAAy7T3MpFEYOhVTQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":95225},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f02ac415451858d43a280c2a34a0a8b2dde884c1","scripts":{"lint":"biome check .","build":"tsup","type-check":"tsc --noEmit","prepublishOnly":"pnpm build"},"_npmUser":{"name":"simonbalfe","email":"simon@simonbalfe.com"},"repository":{"url":"git+https://github.com/simonbalfe/creatorcrawl-sdk-typescript.git","type":"git"},"_npmVersion":"10.9.4","description":"Official TypeScript SDK for the CreatorCrawl social media data API. Scrape TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit profiles, posts, comments, transcripts, and ads.","directories":{},"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.9.3","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1778772330383_0.12945774847974878","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@creatorcrawl/sdk","version":"0.2.0","keywords":["creatorcrawl","social-media-api","tiktok-api","instagram-api","youtube-api","linkedin-api","twitter-api","reddit-api","scraper","sdk","mcp"],"author":{"name":"CreatorCrawl","email":"support@creatorcrawl.com"},"license":"MIT","_id":"@creatorcrawl/sdk@0.2.0","maintainers":[{"name":"simonbalfe","email":"simon@simonbalfe.com"}],"homepage":"https://creatorcrawl.com","bugs":{"url":"https://github.com/creatorcrawl/sdk-typescript/issues"},"dist":{"shasum":"bf1d2dbb87dc5b66669d128c72119509eb0f0b11","tarball":"https://registry.npmjs.org/@creatorcrawl/sdk/-/sdk-0.2.0.tgz","fileCount":9,"integrity":"sha512-s23w7oSRdFTQWbAkC5pdQgp3ogenw6QWkCmbtCpekiUFBdDcx83aKsmc9imt56X+kg+lL9ogI7/hTK4wjzG2iw==","signatures":[{"sig":"MEQCIDIktsc1FkbBjiFMvUVeTV4BSRy3k827sNWmgEV4M2y5AiBtQk0WkiHzjmCRgYLx8CeFnM9O1qjMTsYDLWgAS4hxTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129347},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e3683b32cd04ca8fe4acf5995625ea20bfa01203","scripts":{"lint":"biome check .","build":"tsup","type-check":"tsc --noEmit","prepublishOnly":"pnpm build"},"_npmUser":{"name":"simonbalfe","email":"simon@simonbalfe.com"},"repository":{"url":"git+https://github.com/creatorcrawl/sdk-typescript.git","type":"git"},"_npmVersion":"10.9.4","description":"Official TypeScript SDK for the CreatorCrawl social media data API. Scrape TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit profiles, posts, comments, transcripts, and ads.","directories":{},"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.9.3","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1778775707080_0.163408442867659","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@creatorcrawl/sdk","version":"0.3.0","description":"Official TypeScript SDK for the CreatorCrawl social media data API. Scrape TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit profiles, posts, comments, transcripts, and ads.","license":"MIT","author":{"name":"CreatorCrawl","email":"support@creatorcrawl.com"},"homepage":"https://creatorcrawl.com","repository":{"type":"git","url":"git+https://github.com/creatorcrawl/sdk-typescript.git"},"bugs":{"url":"https://github.com/creatorcrawl/sdk-typescript/issues"},"keywords":["creatorcrawl","social-media-api","tiktok-api","instagram-api","youtube-api","linkedin-api","twitter-api","reddit-api","scraper","sdk","mcp"],"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","type-check":"tsc --noEmit","lint":"biome check .","prepublishOnly":"pnpm build"},"engines":{"node":">=18"},"devDependencies":{"@biomejs/biome":"^1.9.4","tsup":"^8.3.5","typescript":"^5.9.3"},"publishConfig":{"access":"public"},"_id":"@creatorcrawl/sdk@0.3.0","gitHead":"ca92285abf4d0f8626104d27e234550af8a309c4","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-pVtRcY2xNYqlA5v62YLVlJuHuqts9lRnMKl4tAfPUbim5nxMk/2iIleuStzP/StG/V1Wb4/pdfh1CvydzEW8cQ==","shasum":"6914664af5fb79ab52ece6e5174bced5c8f04344","tarball":"https://registry.npmjs.org/@creatorcrawl/sdk/-/sdk-0.3.0.tgz","fileCount":9,"unpackedSize":144303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH90bRkQuN+Rs1OGO/eqvD7g2KOeLqtnjC9vp6lJfnzOAiEAgZK9/R3lVlEv4rS25XLtvy9OqoAx6sbe7ToGLrGtfRs="}]},"_npmUser":{"name":"simonbalfe","email":"simon@simonbalfe.com"},"directories":{},"maintainers":[{"name":"simonbalfe","email":"simon@simonbalfe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.3.0_1778866374988_0.8735130357018464"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-14T15:25:30.279Z","modified":"2026-05-15T17:32:55.245Z","0.1.0":"2026-05-14T15:25:30.538Z","0.2.0":"2026-05-14T16:21:47.235Z","0.3.0":"2026-05-15T17:32:55.134Z"},"bugs":{"url":"https://github.com/creatorcrawl/sdk-typescript/issues"},"author":{"name":"CreatorCrawl","email":"support@creatorcrawl.com"},"license":"MIT","homepage":"https://creatorcrawl.com","keywords":["creatorcrawl","social-media-api","tiktok-api","instagram-api","youtube-api","linkedin-api","twitter-api","reddit-api","scraper","sdk","mcp"],"repository":{"type":"git","url":"git+https://github.com/creatorcrawl/sdk-typescript.git"},"description":"Official TypeScript SDK for the CreatorCrawl social media data API. Scrape TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit profiles, posts, comments, transcripts, and ads.","maintainers":[{"name":"simonbalfe","email":"simon@simonbalfe.com"}],"readme":"# @creatorcrawl/sdk\n\nOfficial TypeScript / JavaScript SDK for the [CreatorCrawl](https://creatorcrawl.com) social media data API.\n\nOne typed client, six platforms: **TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit**. Profiles, posts, comments, transcripts, ads, search, and trending data as structured JSON.\n\n- 60+ endpoints across six platforms\n- Fully typed, ESM + CJS, zero runtime dependencies\n- Works in Node 18+, Bun, Deno, Cloudflare Workers, and browsers\n- Same endpoints are also available as a native MCP server for Claude, Cursor, Windsurf, and Zed\n\n## Breaking changes in 0.3\n\n0.3.0 unifies every response under a single canonical envelope. Field names are now `snake_case` and identical across platforms, so a `Creator` from TikTok and one from YouTube share the same shape.\n\n```ts\ntype Envelope<T> = {\n  data: T\n  page?: { cursor: string | null; has_more: boolean; total?: number }\n  meta: { platform: Platform; fetched_at: string }\n}\n```\n\nIf you were reading raw upstream fields (`legacy.screen_name`, `stats.followerCount`, `data.user.edge_followed_by.count`, etc.), you will need to update your call sites. Method names and parameters are unchanged. See `CHANGELOG.md` for migration notes.\n\n## Install\n\n```bash\nnpm install @creatorcrawl/sdk\n# or\npnpm add @creatorcrawl/sdk\n# or\nyarn add @creatorcrawl/sdk\n```\n\n## Quick start\n\nGet a key at [creatorcrawl.com](https://creatorcrawl.com). 250 credits are free on signup, no card required.\n\n```ts\nimport { CreatorCrawl } from '@creatorcrawl/sdk'\n\nconst cc = new CreatorCrawl({ apiKey: process.env.CREATORCRAWL_API_KEY! })\n\nconst profile = await cc.tiktok.profile({ handle: 'khaby.lame' })\nconst transcript = await cc.youtube.transcript({ url: 'https://youtu.be/...' })\nconst company = await cc.linkedin.company({ url: 'https://www.linkedin.com/company/openai' })\n```\n\n## Response shape\n\nEvery endpoint returns the same envelope:\n\n```ts\n{\n  data: T,                    // Creator | Post | Post[] | Comment[] | Transcript | ...\n  page?: {                    // present on list endpoints\n    cursor: string | null,\n    has_more: boolean,\n    total?: number\n  },\n  meta: {\n    platform: 'tiktok' | 'instagram' | 'twitter' | 'youtube' | 'reddit' | 'linkedin',\n    fetched_at: string        // ISO 8601\n  }\n}\n```\n\nA Twitter profile call:\n\n```ts\nconst res = await cc.twitter.profile({ handle: 'elonmusk' })\n// {\n//   data: {\n//     id: '44196397',\n//     handle: 'elonmusk',\n//     name: 'Elon Musk',\n//     bio: '...',\n//     url: 'https://twitter.com/elonmusk',\n//     avatar_url: 'https://...',\n//     verified: true,\n//     verified_tier: 'blue',\n//     follower_count: 200000000,\n//     following_count: 800,\n//     post_count: 50000,\n//     created_at: '2009-06-02T20:12:29.000Z',\n//     platform: 'twitter',\n//     recent_posts: [ /* Post[] */ ]\n//   },\n//   meta: { platform: 'twitter', fetched_at: '2025-01-15T12:00:00.000Z' }\n// }\n```\n\nA TikTok video list:\n\n```ts\nconst res = await cc.tiktok.profileVideos({ handle: 'khaby.lame' })\n// {\n//   data: [\n//     {\n//       id: '7234567890',\n//       url: 'https://www.tiktok.com/@khaby.lame/video/7234567890',\n//       type: 'video',\n//       created_at: '2024-12-01T15:30:00.000Z',\n//       text: 'Caption here #fyp',\n//       view_count: 12000000,\n//       like_count: 1200000,\n//       comment_count: 8000,\n//       share_count: 50000,\n//       author: { id: '...', handle: 'khaby.lame', name: 'Khaby Lame', url: '...', platform: 'tiktok' },\n//       hashtags: ['fyp'],\n//       platform: 'tiktok'\n//     }\n//   ],\n//   page: { cursor: '1701436200', has_more: true },\n//   meta: { platform: 'tiktok', fetched_at: '2025-01-15T12:00:00.000Z' }\n// }\n```\n\n## Resources\n\n```ts\ncc.tiktok.profile({ handle })\ncc.tiktok.profileVideos({ handle })\ncc.tiktok.videoInfo({ url })\ncc.tiktok.transcript({ url })\ncc.tiktok.searchKeyword({ query })\ncc.tiktok.searchUsers({ query })\ncc.tiktok.comments({ url })\n\ncc.instagram.profile({ handle })\ncc.instagram.posts({ handle })\ncc.instagram.postInfo({ url })\ncc.instagram.reels({ handle })\ncc.instagram.comments({ url })\ncc.instagram.transcript({ url })\n\ncc.youtube.channel({ handle })\ncc.youtube.channelVideos({ handle })\ncc.youtube.channelShorts({ handle })\ncc.youtube.video({ url })\ncc.youtube.search({ query })\ncc.youtube.transcript({ url })\ncc.youtube.comments({ url })\ncc.youtube.playlist({ url })\n\ncc.linkedin.profile({ url })\ncc.linkedin.company({ url })\ncc.linkedin.companyPosts({ url })\ncc.linkedin.post({ url })\ncc.linkedin.adsSearch({ query })\ncc.linkedin.ad({ url })\n\ncc.twitter.profile({ handle })\ncc.twitter.tweet({ url })\ncc.twitter.userTweets({ handle })\ncc.twitter.transcript({ url })\ncc.twitter.community({ url })\ncc.twitter.communityTweets({ url })\n\ncc.reddit.search({ query })\ncc.reddit.subredditDetails({ subreddit })\ncc.reddit.subredditPosts({ subreddit })\ncc.reddit.subredditSearch({ subreddit, query })\ncc.reddit.postComments({ url })\n```\n\n## Configuration\n\n```ts\nconst cc = new CreatorCrawl({\n  apiKey: 'cc_...',\n  baseUrl: 'https://app.creatorcrawl.com/api', // optional\n  timeout: 30_000,                             // optional, ms\n  fetch: customFetch,                          // optional\n})\n```\n\n## Error handling\n\nFailed requests throw a typed `CreatorCrawlError`:\n\n```ts\nimport {\n  AuthenticationError,\n  CreatorCrawlError,\n  InsufficientCreditsError,\n  RateLimitError,\n  UpstreamError,\n} from '@creatorcrawl/sdk'\n\ntry {\n  await cc.tiktok.profile({ handle: 'khaby.lame' })\n} catch (err) {\n  if (err instanceof InsufficientCreditsError) {\n    // top up credits\n  } else if (err instanceof RateLimitError) {\n    // back off\n  } else if (err instanceof CreatorCrawlError) {\n    console.error(err.status, err.message)\n  }\n}\n```\n\n## Cancellation\n\nEvery method accepts a `RequestOptions` argument with an `AbortSignal`:\n\n```ts\nconst controller = new AbortController()\nsetTimeout(() => controller.abort(), 5_000)\n\nawait cc.tiktok.profile({ handle: 'khaby.lame' }, { signal: controller.signal })\n```\n\n## Links\n\n- API docs: [creatorcrawl.com/mcp-docs](https://creatorcrawl.com/mcp-docs)\n- Pricing: [creatorcrawl.com/#pricing](https://creatorcrawl.com/#pricing)\n- MCP server: native MCP at `app.creatorcrawl.com/api/mcp` for AI agents\n- Status / issues: [github.com/creatorcrawl/sdk-typescript/issues](https://github.com/creatorcrawl/sdk-typescript/issues)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}