Response Format

Understanding the structure and format of API responses.

Success Response

A successful response returns a JSON object with the scraped data organized by category.

Loading code...
Response Fields
  • success - Always true for successful responses
  • url - The URL that was scraped
  • extractedCategories - Array of categories that were successfully extracted
  • data - Object containing extracted data organized by category
  • cached - Boolean indicating if the response was served from cache

Cached Response

When a response is served from cache, the cached field is set to trueand the X-Cache header is set to HIT.

Loading code...

Error Response

Error responses follow a consistent format with error details.

Loading code...
Error Response Fields
  • success - Always false for error responses
  • error - Short error identifier
  • message - Human-readable error message
  • retryAfter - Present on rate limit errors, seconds to wait before retrying

Data Structure by Category

Each category in the data object has its own structure:

metadata
Loading code...
openGraph
Loading code...
PageSight | PageSight