Skip to main content

Authentication

Introduction

ScrapeHero provides pre-configured, reliable scraping APIs designed for ease of use. This guide will walk you through the process of authenticating and using these APIs.

Getting Started

  1. Visit the ScrapeHero App Store.
  2. Use the sidebar to filter for APIs.
  3. Choose the scraping API that meets your requirements.
  4. Add the selected API to your account.

Finding Your API Key

After adding an API to your account:

  1. Navigate to the API dashboard page.
  2. Locate your private API key. This key is unique to your account and should be kept secure.
  3. You can also obtain your API key from API Key section in the settings

API Structure

The general format for ScrapeHero API requests is:

https://get.scrapehero.com/<API_endpoint>/?url=<Encoded URL>&x-api-key=YOUR-API-KEY

Components:

  • <API_endpoint>: The specific endpoint for the scraping API you're using.
  • <Encoded URL>: The URL you want to scrape, properly encoded.
  • YOUR-API-KEY: Your private API key.

Example

For the Amazon Bestseller API, your request might look like this:

https://get.scrapehero.com/amz/best-seller/?url=<Encoded URL>&x-api-key=YOUR-API-KEY

API Configuration

Each API may have additional configuration options. To find these:

  1. Visit the Playground or Documentation page for your specific API.
  2. Review the available parameters and options.
  3. Incorporate any necessary configuration into your API request.

Best Practices

  1. Secure Your API Key: Never share your private API key publicly.
  2. URL Encoding: Ensure the URL you're scraping is properly encoded to avoid errors.
  3. Rate Limiting: Be aware of any rate limits for your chosen API and adhere to them.
  4. Error Handling: Implement proper error handling in your code to manage API responses effectively.

Troubleshooting

If you encounter issues:

  1. Double-check your API key is correct and active.
  2. Ensure your URL is properly encoded.
  3. Verify you're using the correct endpoint for your chosen API.
  4. Check the API documentation for any specific requirements or limitations.

For further assistance, contact ScrapeHero support through your account dashboard.