@geekflare/api-node SDK gives you full TypeScript support and handles auth, serialization, and response parsing out of the box. Raw fetch examples are included for dependency-free setups.
Prerequisites
- Node.js 18+ (native
fetchis stable from v18) - A Geekflare API key — get one free
Installation
- pnpm
- npm
- yarn
Set your API key
Create a.env file at your project root:
.env
Initialize the client
Web Scraping
Scrape the full content of any URL. Returns HTML, Markdown, and more depending on theformat you request.
- SDK
- fetch
Example response:
data field is a URL to the scraped output file. For full response details, see the Web Scraping endpoint reference.
Search
Run a web search and get ranked results with titles, URLs, and descriptions.- SDK
- fetch
Example response:
Screenshot
Capture a screenshot of any URL. Returns a hosted image URL.- SDK
- fetch
Example response:
data field is a direct URL to the screenshot image. See the Screenshot endpoint reference.
Error handling
The SDK throws on API errors. Wrap calls intry/catch and inspect the error for actionable codes.
Common error codes
Next steps
- Next.js quickstart — Server Actions and Route Handlers
- NestJS quickstart — Injectable services and modules
- API Reference — Full endpoint documentation
- SDK on npm