Use our age prediction model with Apify
By the How Old Do You Look team · Last updated
For a long time, developers have used our direct API to add age estimation to their own products. That is not changing, and the direct API remains fully available. If you already run your data workflows on Apify, though, there is now a second option: you can use the same analysis straight from your Apify account.
This article explains what our Apify Actor does, how it differs from the direct API, and how to decide which one fits your project.
Why we added an Apify option
Many teams already use Apify to collect, process, and enrich data. For them, opening another vendor account, managing a separate API key, and setting up another billing relationship is extra work that adds little value.
With our Actor, you can run the analysis with the account, billing, and tools you already have. Results are saved to an Apify dataset, so they fit into the same exports, schedules, and integrations as the rest of your workflow.
What the Actor does
Our Actor is called AI Face Age Estimator. It does not scrape websites. It sends your images to our own face-analysis API, which runs the same age-estimation model as our website and our direct API.
Each run performs one analysis on every image you supply:
- Age estimation: the apparent age of the face, with an optional bounding box and face crop.
- Attractiveness score: a score together with the detected gender, also with an optional bounding box and face crop.
- Face mesh: 478 three-dimensional facial landmarks with optional head-pose values.
Only the largest face in each image is analyzed. If you need two analyses for the same images, for example age and face mesh, start one run for each.
How a run works
- Open the Actor on Apify and add one or more public image URLs.
- Choose the analysis you want:
age,attractiveness, orfacemesh. - Start the run. Each successfully analyzed image becomes one item in the run's dataset, which you can export as JSON, CSV, or Excel, or read through the Apify API.
A minimal input looks like this:
{
"imageUrls": ["https://howolddoyoulook.com/static/images/sample/portrait_example_male.jpg"],
"analysis": "age"
}
An age result then looks like this:
{
"imageUrl": "https://howolddoyoulook.com/static/images/sample/portrait_example_male.jpg",
"status": "success",
"analysis": "age",
"apiVersion": "1.1",
"age": 25.42,
"boundaryBox": { "x": 113, "y": 89, "width": 142, "height": 180 }
}
If you know our direct API, the values will look familiar. Field names follow Apify's camelCase style, so boundary_box becomes boundaryBox and api_version becomes apiVersion.
Images that cannot be analyzed, for example because no face is found or the URL cannot be reached, are not added to the dataset. They are listed separately with an error code, so you can see exactly which images failed and why.
Calling the Actor from your own code
You can also start a run through the Apify API and receive the results in the same response:
curl -X POST "https://api.apify.com/v2/acts/faceanalysis2~face-age-estimator/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"imageUrls": ["https://howolddoyoulook.com/static/images/sample/portrait_example_male.jpg"], "analysis": "age"}'
Keep your Apify token on your server or in your automation environment, not in browser or app code that other people can inspect.
Pricing and billing
The Actor uses pay-per-result pricing. You pay for each successfully analyzed image, plus a very small fee each time a run starts, and the charges appear on your regular Apify bill. Images that fail are not charged, and you can set a maximum cost per run. Current prices are always listed on the Actor page.
Direct API or Apify?
Both options use the same model, so the choice mainly depends on how you work.
The direct API is usually the better fit if:
- you are building your own website, app, or backend service;
- you want to send images as base64 data as well as by URL;
- you want age and face mesh data from a single request;
- you expect steady or high volume and would like to discuss pricing with us directly.
Apify is usually the better fit if:
- your data pipelines, schedules, or integrations already run on Apify;
- you prefer to manage billing and API tokens through your Apify account;
- you want to process batches of public image URLs and export the results as JSON, CSV, or Excel;
- you want to try the analysis with a small test run before committing to anything.
You do not have to choose forever. Many projects start with a quick test on Apify and move to the direct API once their needs are clear, or the other way around.
Use the results responsibly
Whichever route you choose, the result is an estimate of how old someone looks in a particular photo. It is not proof of a person's real age or identity, and it should not be the only basis for decisions about people, such as legal age checks, hiring, credit, or access to services.
Face images and the data derived from them can count as personal data, and in some cases biometric data, under the GDPR and similar laws. Make sure you have a legal basis, and consent where required, for the images you process.
Questions and support
For questions about Apify runs, input fields, or output, open an issue in the Issues tab of the Actor on Apify. For the direct API, larger volumes, or help choosing between the two options, contact us. Either way, you are working with the same age-estimation technology that powers How Old Do You Look.
Find Out How Old You Look
Try our AI-powered age detection tool - it's quick, accurate, and completely free!
Try Age Detection Now