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
- Visit the ScrapeHero App Store.
- Use the sidebar to filter for APIs.
- Choose the scraping API that meets your requirements.
- Add the selected API to your account.
Finding Your API Key
After adding an API to your account:
- Navigate to the API dashboard page.
- Locate your private API key. This key is unique to your account and should be kept secure.
- 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:
- Visit the Playground or Documentation page for your specific API.
- Review the available parameters and options.
- Incorporate any necessary configuration into your API request.
Best Practices
- Secure Your API Key: Never share your private API key publicly.
- URL Encoding: Ensure the URL you're scraping is properly encoded to avoid errors.
- Rate Limiting: Be aware of any rate limits for your chosen API and adhere to them.
- Error Handling: Implement proper error handling in your code to manage API responses effectively.
Troubleshooting
If you encounter issues:
- Double-check your API key is correct and active.
- Ensure your URL is properly encoded.
- Verify you're using the correct endpoint for your chosen API.
- Check the API documentation for any specific requirements or limitations.
For further assistance, contact ScrapeHero support through your account dashboard.