Skip to main content
The client groups scraping functions by platform. Each function validates your input against the endpoint’s schema, sends the request, and returns the typed data payload wrapped in an ApiResult. Calls are billed in credits; see Credits. Invalid inputs can throw a validation error before a request is sent.
For the exact request fields and response shape of any function, open the API Reference — each endpoint page shows the equivalent SDK call alongside its schema.

Pagination

List functions take the same paging fields as the API: count for the page size, and cursor or start to pick the page. See Pagination for how each list pages, which lists come back in a single response, and why to fetch pages promptly.

Automatic pagination

Pass pagination: true to any list function and the SDK fetches the pages for you. count becomes the total number of results to collect across all pages; leave it out to collect every page. The call keeps requesting pages until there are no more results or count results are collected, then returns them all in one response, shaped like a single page. The results are collected as the platform serves them, so a list that changes while it is paged can hold the same result twice; see Results that repeat or are missing.
  • timeMs and creditsCost add up every page fetched.
  • nextCursor (or nextStart) is the last page’s, so a call stopped by count can be continued by passing it back as cursor (or start).
  • Pass cursor or start to begin from a later page.
  • If any page fails, the call returns that page’s error.

Paging by hand

client.x — X (Twitter)

client.reddit — Reddit

client.linkedin — LinkedIn

A member’s posts, comments and reactions page with cursor. Every other list, including search, pages with start.

client.github — GitHub

client.instagram — Instagram

Use the username shown in the profile URL. For posts and comments, use the shortcode in the post URL, such as DdHNbqDJusb from https://www.instagram.com/p/DdHNbqDJusb/. Set pagination: true on methods that support cursors to follow continuation pages automatically. Stories, highlight contents, and the visible post-liker list are returned together. Instagram may limit liker accounts and content visibility.

client.tiktok — TikTok

Pass the username from the profile URL, such as tiktok from https://www.tiktok.com/@tiktok. A post ID is the number at the end of the post URL, and a sound ID is the number at the end of the sound URL or a post’s sound.id. Profiles include biography, avatar URLs, verification and privacy flags, website link, follower, following, like, and video counts, and scheduled live events when available. Lists of a private account’s posts, followers or playlists, and the liked videos of an account that hides them, return a 403. Missing metadata is returned as null.

client.facebook — Facebook

Profiles and groups accept a link, a username or a numeric ID. Posts, comments and replies take the post link; reel, video and photo links are not posts. Events and Marketplace listings take their link or numeric ID. Use searchLocations to turn a city name into the locationId that getEventsByLocation takes and the coordinates searchMarketplace takes. Follower and play counts are the rounded numbers Facebook shows, such as 28000000 for 28M.

client.youtube — YouTube

client.metaAds — Meta Ad Library

Get an advertiser’s Page ID from searchCompanies or from page.id on an ad, and pass it as pageId to search to list that advertiser’s ads. Spend, impressions and audience shares are published for ads about social issues, elections or politics; targeting and reach by age and gender for ads shown in the EU, the UK or Brazil.

Next steps

Account management

Create API keys and manage credits from code.

Errors

Handle API and network failures predictably.