GuidesAPI EndpointsAPI Changelog
Live AI Demo
API Endpoints

🧠 Tag a Text

Predict the most likely tags for one or several texts with one of your Tagging Algorithms, or against an ad-hoc list of labels.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Prerequisites

  1. ✨ Create a Workspace
  2. 🔑 Get your API Key
  3. 🧠 Activate Text Tagging API
🚧

Batch Mode with 'texts' parameter

  • Batch size = lenght(texts) should be < 32 (and a multiple of 2 for an optimum speed).

The algorithm_key selects the tagger:

  • the algorithm_key of a Tagging Algorithm of your workspace, created in AI Studio > My Tagging Algorithms on a taxonomy you forked from HrFlow.ai or France Travail (ROME 4.0, skills, seniority, degree, contract type) or created yourself. See the Tagging API guide;
  • tagger-hrflow-dynamic, the dynamic tagger, which classifies texts against the labels given in dynamic_labels without any taxonomy.

Headers

HeaderValue
Content-Typeapplication/json
X-API-KEYYour API Key
X-USER-EMAILYour HrFlow.ai account email

Body parameters

ParameterTypeRequiredDescription
algorithm_keystringYesThe algorithm_key of one of your Tagging Algorithms, or tagger-hrflow-dynamic.
textsarray of stringsYesThe texts to tag: the full text of a job, a resume, a profile, a work experience, and more. Maximum 32 texts per request.
top_nintegerNoNumber of predicted tags returned per text. Defaults to 1. With tagger-hrflow-dynamic, it cannot exceed the number of labels.
dynamic_labelsarray of stringsOnly with tagger-hrflow-dynamicThe labels to choose from, up to 32.
dynamic_contextstringNoWith tagger-hrflow-dynamic, a text that explains the labels to the model.

Response

Success

data contains one object per input text, in the same order as texts. Inside each object, the three lists are synchronized: the n-th prediction goes with the n-th tag and the n-th id.

FieldTypeDescription
codeintegerHTTP status code
messagestringResponse message
data[].predictionsarray of numbersPrediction scores between 0 and 1, sorted in descending order
data[].tagsarray of stringsThe label of the predicted tags, in the language of the taxonomy. For the dynamic tagger, the label itself.
data[].idsarray of stringsThe value of the predicted tags (for a fork of a ROME taxonomy, the ROME 4.0 code). For the dynamic tagger, the position of the label in dynamic_labels.

Error

FieldTypeDescription
codeintegerHTTP error code
messagestringError description

Common causes:

  • texts is missing or empty, or contains more than 32 texts.
  • algorithm_key does not match a Tagging Algorithm of your workspace: Bad request. Invalid algorithm key: ...
  • top_n is lower than 1, or higher than the number of labels with tagger-hrflow-dynamic: Bad request. topN must be greater than 0.
  • The Tagging Algorithm has not been deployed yet, or its taxonomy has no tags.
📘

Batch size

texts accepts up to 32 texts per request. For an optimal speed, send batches whose size is a multiple of 2.

Body Params
string
required
Defaults to tagger-hrflow-dynamic
texts
array of strings
required
Defaults to Data Insights Corp. is seeking a Senior Data Scientist for a contract-to-direct position. You will be responsible for designing and implementing advanced machine learning algorithms and playing a key role in shaping our data science initiatives. The CDI arrangement offers a pathway to a full-time role,DataTech Solutions is hiring a Data Scientist for a fixed-term contract of 12 months. You will work on various data analysis and modeling projects and assisting in short-term projects; with the possibility of extension or permanent roles

Tag a list of texts. Each text can be: the full text of a Job, a Resume, a Profile, an experience, a Job and more. Maximum length is 32.

texts*
int32
Defaults to 1

Number of predicted tags that will be returned.

string

A context for given labels if algorithm_key="tagger-hrflow-labels".

dynamic_labels
array of strings
Defaults to CDI,CDD

List of output tags if algorithm_key ="tagger-hrflow-labels".

dynamic_labels
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json