Skip to main content

Using /getpng Endpoint

In this tutorial, we will be using the /getpng endpoint to get a circular's PNG file.

The /getpng endpoint returns a dict containing the direct URL to a PNG version of a BPS Circular.

Request Structure

Send a GET request to the following URL: https://bpsapi.rajtech.me/getpng?url={circular_url}

Parameters:

  • url : string. A valid URL pointing to a .pdf file on the BPS website [Mandatory]

The url parameter refers to the direct circular PDF download URL.

Example Requests

Here are example requests using Python's requests library:

import requests

url = "https://bpsapi.rajtech.me/getpng"
params = {'url': 'https://bpsdoha.com/circular/category/52-academic-year-2024-25?download=1618'}

request = requests.get(url, params=params)
print(request.text)

Example Responses

Here's a circular with a single page:

{
"status": "success",
"http_status": 200,
"data": [
"https://bpsapi.rajtech.me/circular-image/1618.png"
]
}

Thanks for reading!