1. Install and construct the client
2. Make a call
Every scraping method takes a typed request object and returns a typed result. Here we fetch a Reddit user profile:3. Branch on the result
Methods never throw for API or network errors. Instead they return a discriminated union you narrow withres.type:
res.type === 'success', TypeScript knows res.data is present
and fully typed for that endpoint. In the error branch you get the HTTP
status and a human-readable message.
Try other platforms
The same shape works across every platform. Swap the namespace and method:Next steps
Functions
The full list of functions for X, Reddit, and LinkedIn.
Errors
Robust, typed error handling.