Create and setup your API key

Get your Exa API key


Create a .env file

Create a file called .env in the root of your project and add the following line.

EXA_API_KEY=your api key without quotes

Make an API request

Use our python or javascript SDKs, or call the API directly with cURL.

Install the python SDK with pip

pip install exa-py

Once you’ve installed the SDK, create a file called exa.py and add the code below.

Get a list of results and their full text content.

python
from exa_py import Exa

import os

exa = Exa(os.getenv('EXA_API_KEY'))

result = exa.search_and_contents(
  "An article about the state of AGI",
  type="auto",
  text=True,
)

print(result)