Sarafa.pk Developer API
Use secure API keys to fetch city-wise gold and silver prices from Sarafa.pk.
Quick Start
- Login to your Sarafa account.
- Create your key from Developers > API Access page.
- For web usage, add your allowed website origins (domains).
- Include X-API-Key and X-Client-Platform headers in requests.
- Monitor daily usage and limits from the API access workspace.
Available Endpoints
GET `/api/v1/public-rates/gold/cities/{location_slug}`
GET `/api/v1/public-rates/gold/cities?slugs={karachi,lahore}`
GET `/api/v1/public-rates/silver/cities/{location_slug}`
GET `/api/v1/public-rates/silver/cities?slugs={karachi,lahore}`
Use clean city slugs like karachi, lahore, or islamabad.
Sample Request
curl -X GET "https://sarafa.pk/api/v1/public-rates/gold/cities/karachi" \ -H "X-API-Key: YOUR_API_KEY"
Response headers include daily limit and remaining quota details. Use X-Client-Platform for server/mobile usage.
Support
For technical help or enterprise integration: zubyrbutt@gmail.com | +923471468300
