How to test our API?
The API can be tested using the following approaches:
via the API sample code: allows you to run a ready-to-use integration example to test API requests directly in your coding environment.
via the Swagger interface: allows you to execute API requests and view responses directly from your browser, without any technical prerequisites.
Download the sample
Log in to our OEM customer portal.
Click on the "Download the API Sample code" button, to begin the download process.
Contents of the API Sample Code file
This directory contains a streamlined Python SDK for interacting with the Olfeo OEM API. It is built with only one dependency, the well-established requests library.
The SDK provides a thin layer over the standard Request and Response message models, so that you can follow the Swagger documentation directly for all attributes and payload definitions.
Included scripts:
src/get_url_info.py: retrieves category information for domains and URLs via the command line.src/list_domain_categories.py: lists metadata for available domain categories.src/batch_categorize.py: a full example that reads a list of domains from a CSV file and outputs their domain categories.
Run the sample
Create and activate a virtual environment. For Example :
$ cd api/python $ pipenv install Creating a virtualenv for this project... Pipfile: /home/name/dev/data-tools/nexus-sdk/api/python/Pipfile Using /home/name/.pyenv/versions/3.12.3/bin/python3 (3.12.3) to create virtualenv... ⠧ Creating virtual environment...created virtual environment CPython3.12.3.final.0-64 in 484ms creator CPython3Posix(dest=/home/name/.local/share/virtualenvs/python-NH1Ffy5a, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/name/.local/share/virtualenv) added seed packages: pip==24.0 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator ✔ Successfully created virtual environment! Virtualenv location: /home/name/.local/share/virtualenvs/python-NH1Ffy5a Installing dependencies from Pipfile.lock (e34973)... To activate this project's virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run.Edit the file
src/credentials.pyfile to specify your credentials (username and password) for API access.Run any of the sample scripts. For example:
$ pipenv run python src/get_url_info.py http://olfeo.com Information for url http://olfeo.com You can still categorize 3 urls out of 10000 today Domain category: Business Services
This step-by-step guide walks you through accessing our API, from authenticating yourself and obtaining your API key to testing the various endpoints, all in just a few minutes. You will be able to test the endpoints directly from the documentation.
Go to this page to access the swagger interface.
Scroll down the page until you reach this part:

Click the Authorize button.

In the pop-up window, enter the Username and Password provided by email.

Click the first Authorize button, then close the pop-up window.

No confirmation message
No confirmation message will appear – this is normal.
Locate the POST method called GetNewApiKey, then click the Try it out button.

Now, click the Execute button.

The authorization key is located within the server response section, directly below the Execute and Clear buttons, and is required for Step 4 - Use the API.
Copy the “value” field from the server response.

Note
The cURL should look like this:

And, the 200-server response should look like this:

Go to this page to use the API.
Scroll down the page until you reach this part:

Click the Authorize button.

Paste the authorization key in the required field.
Now, click the Authorize button.
Explore API endpoints
You can now try any of the endpoints available in the documentation. If you still have doubt on how to use an endpoint? Check this example out.
After you've done steps 1, 2, 3 and 4, you can use this example to learn how to use an endpoint.
Select the POST method called "/olfeo.database.v1.CategorizeService/GetCategory"
Click the Try it out button.
Change the request parameters
{ "host": "olfeo.com", "url": "/check/for/this.html?q=foo" }by what you want to test, for example:
Click the Execute button.

All information regarding the application will be accessible in both English and French within the server response section, immediately beneath the Execute and Clear buttons.

You are now free to use any endpoint you like.