Skip to main content
The official @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 fetch is stable from v18)
  • A Geekflare API key — get one free

Installation

Set your API key

Create a .env file at your project root:
.env
Never commit your .env file. Add it to .gitignore.

Initialize the client


Web Scraping

Scrape the full content of any URL. Returns HTML, Markdown, and more depending on the format you request.
Key parameters: Example response:
The data field is a URL to the scraped output file. For full response details, see the Web Scraping endpoint reference.
Run a web search and get ranked results with titles, URLs, and descriptions.
Key parameters: Example response:

Screenshot

Capture a screenshot of any URL. Returns a hosted image URL.
Key parameters: Example response:
The 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 in try/catch and inspect the error for actionable codes.

Common error codes

See Rate Limit Exceeded and Credit Exhausted for strategies to handle these gracefully.

Next steps