Endpoints
External API
Access your saved JSON APIs
External API
The External API endpoint allows you to retrieve JSON data from your saved API configurations. This endpoint returns data in your specified format, either from cache or freshly scraped from the source webpage.
Endpoint
Headers
Header | Required | Description |
---|---|---|
apikey | Yes | Your Pulpminer API key |
Path Parameters
Parameter | Type | Description |
---|---|---|
apiId | string | The ID of your saved API configuration |
Response
Response Fields
Field | Type | Description |
---|---|---|
data | object | The JSON data in your specified format |
errors | array | Array of error objects if any errors occurred |
Error Responses
Invalid API Key
Invalid API ID
No Credits
Server Error
Example Usage
Using cURL
Using JavaScript/Node.js
Using Python
Caching Behavior
The endpoint’s caching behavior depends on your API configuration:
Cache Enabled
- Returns cached data if available and less than 15 minutes old
- Automatically refreshes cache in the background if data is old
- Ensures fast response times while maintaining data freshness
Cache Disabled
- Always fetches fresh data from the source webpage
- May have slightly longer response times
- Guarantees up-to-date information
Notes
- This endpoint uses 2 credits per request
- Response format matches your saved API configuration
- Consider enabling caching for better performance
- Monitor your credit usage to avoid interruptions
Best Practices
-
Use Appropriate Caching
- Enable caching for static or slowly changing data
- Disable caching for real-time data requirements
- Consider your application’s freshness vs. performance needs
-
Handle Errors
- Implement proper error handling
- Use retry logic with exponential backoff
- Monitor for recurring errors
-
Optimize Usage
- Cache responses on your end when possible
- Batch related requests together
- Implement rate limiting in your application
Rate Limiting
- 2 credits per API request
- Requests are processed in order
- Consider implementing backoff strategies for retries
Monitoring
Monitor your API usage through:
- Last fetched timestamp in the API dashboard
- Credit usage tracking
- Response times and error rates
Need Help?
If you encounter issues:
- Verify your API key and API ID
- Check your available credits
- Contact support at hello@pulpminer.com