# Code Samples V4
The Odds API is easy to use with your favorite coding language. We've included simple Python and Node.js code examples to help you get started.
Be sure to specify your api key in order for the examples to work. Get a free API key here.
For more details, see the API docs. Code samples are also available on Github (opens new window)
# Python
Note
This example uses python's requests library (opens new window), which can be installed with
pip install requests
Security Tip for Repl.it users
This example uses Repl.it (opens new window)* to run live code. If you continue coding using a free Repl.it account, anyone visiting your Repl.it repo might see your api key.
To make sure it stays secret, create a file called .env
containing
api_key=YOUR_API_KEY
Back in main.py, bring in your api key with:
import os
api_key = os.getenv("api_key")
For more info, see the Repl.it docs (opens new window)
This code sample can also be found on Github (opens new window)
# Node.js
Note
This example uses Node's axios library (opens new window), which can be installed with npm install axios
or bower install axios
Security Tip for Repl.it users
This example uses Repl.it (opens new window)* to run live code. If you continue coding using a free Repl.it account, anyone visiting your Repl.it repo might see your api key.
To make sure it stays secret, create a file called .env
containing
api_key=YOUR_API_KEY
Back in index.js, bring in your api key with:
const api_key = process.env.api_key
For more info, see the Repl.it docs (opens new window)
This code sample can also be found on Github (opens new window)