Sarafa.pk Developer API

Use secure API keys to fetch city-wise gold and silver prices from Sarafa.pk.

Quick Start

  1. Login to your Sarafa account.
  2. Create your key from Developers > API Access page.
  3. For web usage, add your allowed website origins (domains).
  4. Include X-API-Key and X-Client-Platform headers in requests.
  5. 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