# Helper Codes
source: https://developer.mastercard.com/bin-lookup/documentation/developer-tools/developer-tooling/index.md

## Sample Code {#sample-code}

We have provided some sample code via *Python* scripts that you can follow to see how to use the API. The scripts include examples of:

* All examples demonstrate how to use the Mastercard OAuth 1.0a library to authenticate with Python requests
* Using pagination to call the API in sequence and download all records
* Using filtering to limit the result set to just the records you need
* Performing a real time single lookup request using an 8 digit BIN

To get started simply download the source code, install the requirements, 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) section.
