Tagging API
Tag any text with only few lines of code.
The Text Tagging API is a service that addresses a wide range of business-critical needs. Our most advanced AI-powered taggers give you the ability to assign relevant tags to all documents of your databases automatically. Tagging API quickly brings out new functionalities for any search engine, from predicting missing skills in resumes to delivering crucial insights on your data.
This article will look at how to interact with the endpoint 🧠 Tag a Text with a few queries sent through our public HrFlow.ai Postman collection. The final goal is to leverage the tags provided by our API to get better search results.
Prerequisites
API Endpoint
Get more information about the endpoint 🧠 Tag a Text.
Step 1: Configure your Postman Environment
Following the steps from the HrFlow.ai Postman publication will make you land on this page:
First, click on the "Environments" tab on the left side of your Postman window. Then, fill in the Empty - Environment template with the correct values. The compulsory variables for Tagging are:
x-api-key
: follow the steps from 🔑 API Authentication to retrieve itx-user-email
: follow the steps from 🔑 API Authentication to retrieve it
Finally, save the environment and ensure that you selected Empty - Environment as your current environment.

Postman Environment Configuration
Step 2: Get your First Tagging Results
Now that the environment is selected, we can test our first request to Tag a Text. To do so, fill in your body parameters in a raw format:
- [MANDATORY]
text
: the text for which you want to assign some tags. - [MANDATORY]
algorithm_key
: the tagger's name can be one of the following
Algorithm Key | Tagging Set | Identifiers Set |
---|---|---|
tagger-rome-family | Grand domaines of job the French ROME | ROME Grand domaines codes |
tagger-rome-subfamily | Domaines of job the French ROME | ROME Domaines codes |
tagger-rome-category | Metiers of job the French ROME | ROME Metiers codes |
tagger-rome-jobtitle | Appellations of job the French ROME | OGR codes |
tagger-hrflow-skills | Predicts missing hard skills and soft skills | Identifiers defined by HrFlow.ai |
tagger-hrflow-labels | Predict any output given a list of texts and labels | Identifiers defined by HrFlow.ai |
- [OPTIONNAL]
top_n
: number of tags returned through the API. Defaults to1
. - [OPTIONNAL]
output_lang
: the returned tags will be either infr
(French) oren
(English). Defaults tofr
.
Current status on taggers development
We are actively working on releasing more taggers to the public. So keep an eye on our blog (https://blog.hrflow.ai/) and our product notes (https://updates.hrflow.ai/) to stay in touch with our latest taggers.
Let's break down the Tagging request's response. The field data of the response object contains three lists with the same length:
predictions
: AI prediction scores sorted in descending ordertags
: tags associated with the prediction scores.ids
: unique identifiers associated to each tag
How to read the values in predictions ?
Both
predictions
,tags
andids
lists are synchronized. The n-th prediction is associated with the n-th tag.In our example above:
- Installation and maintenance scores at 0.53517
- Transport and logistics scores at 0.20379
- Industry scores at 0.08764
Advanced Topics
1. Try Tagging in your Favorite Programming Language
Once you have tried the request in Postman, you can directly convert it to work with your favorite programming language. Here is an example with Python and the module Requests.
import requests
import json
url = "https://api.hrflow.ai/v1/text/tagging"
payload = json.dumps({
"algorithm_key": "tagger-rome-family",
"text": "Our client, specialized in the sale and mechanics of heavy goods vehicles with a national network, is looking for heavy goods vehicle mechanics for its sites based in Arras, Lens and Douai.",
"texts": [],
"top_n": 3,
"output_lang": "en",
"labels":[]
})
headers = {
'X-USER-EMAIL': 'FILL THIS',
'X-API-KEY': 'FILL THIS',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Updated 2 months ago