# Sample Code
source: https://developer.mastercard.com/bin-lookup/documentation/developer-tools/sample-code/index.md

We provide sample Python scripts that demonstrate how to use the API. The scripts include examples of how to:

* Authenticate requests using the Mastercard OAuth 1.0a library with Python
* Use pagination to call the API sequentially and download all records
* Apply filters to limit the result set to only the required records
* Perform a real-time single lookup using an eight-digit BIN

To get started, download the source code, install the required dependencies, update the key and URL parameters, and run the script.

```cli
git clone https://github.com/Mastercard-Samples/BIN-Lookup-API-Sample-Code.git
cd BIN-Lookup-API-Sample-Code
pip install -r requirements.txt
cd Examples
python single-lookup-example.py
```

Each script is explained in more detail in the [Tutorials](https://developer.mastercard.com/bin-lookup/documentation/tutorials-and-guides/index.md) sections.
