How to detect phone numbers and contact details in images
Check every uploaded photo with an image moderation API that reads the text in it, and hold the ones that carry a way to reach someone off your platform: a phone number, a messaging handle, an e-mail address, a bank account or a crypto wallet. Here is why scammers put them in photos, how detection works, what to do with a finding, and what each API publishes.
To find a phone number, a messaging handle, an e-mail address or a bank account written on a photo, check every uploaded image with an image moderation API that reads the text in pictures, and hold the images it flags for review. Detectivision's image check does this with its scam flag: one call per image, an answer with a confidence from 0 to 1, and no word list to keep.
Why scammers write contact details on photos
On a marketplace, a classifieds site, a rental site or a dating app, a scam usually needs one thing first: a way to talk to the buyer or the match somewhere else. Off the platform, its payment protection, its reports and its moderators no longer reach the conversation.
Most platforms already filter the text people type. A phone number in a listing title or a chat message is easy to catch. So the number moves into the picture:
- written on a sign held up in a profile photo;
- typed over a product photo, or added as a caption inside the image;
- spelled out in words or split with spaces, dots and emoji, so a pattern does not match it;
- given as a handle: "WhatsApp me", a Telegram name, a Snapchat or an Instagram username;
- given as a way to pay: an IBAN, a bank account or a crypto wallet address.
The same photos often carry the rest of the scam: a fake payment or bank screen that "proves" money was sent, a fake giveaway, a QR code that leads to a phishing page, or a promise of quick returns on an investment.
What to look for
| Kind | What it looks like in a picture |
|---|---|
| Phone number | Digits in any format, or the number written out in words |
| Messaging handle | A WhatsApp, Telegram, Snapchat or Instagram name, with or without the app's name next to it |
| E-mail address | An address written in full, or with "at" and "dot" spelled out |
| Payment details | An IBAN, a bank account number or a crypto wallet address |
| Fake proof | A screenshot of a payment or a bank transfer that did not happen |
| Lures | A "you won" prize, a phishing QR code or link, a get-rich-quick or investment promise |
Write down which of these your rules forbid, and where. A marketplace may forbid contact details in listing photos but allow a shop's address on its own page. A dating app may forbid them in profile photos and allow them in chat after a match.
How detection works
Every approach does two things: it reads the text in the picture, then decides whether that text is a way to reach someone.
- Reading the text. Optical character recognition (OCR) turns the pixels into words. Text on a photo is harder than text on a page: it can be rotated, handwritten, stylised, small, or half hidden behind an object.
- Deciding what the text is. Pattern matching looks for the shapes of phone numbers, e-mail addresses and account numbers. It is exact for the formats it knows and misses the ones it does not: a number in a country it does not cover, a number spelled out in words, a handle with no @ sign. A model that reads the picture as a whole, text and image together, can also judge a number written in words or a handle next to an app's logo.
- Scoring and acting. The answer says what was found and how sure the check is. Your rules decide what happens next.
Some APIs give you only the first step: they return the words and where they are, and the rest is your code. Others do all three and answer with a category.
What to do when a photo is flagged
- Hold, then decide. Keep a flagged photo out of view until a moderator has looked, or reject it at once if your rules forbid contact details everywhere. If your platform allows contact details in some places, treat the flag as a reason to look rather than to remove.
- Look at the account, not only the photo. A new account with several flagged photos is not the same as a long-standing seller with one. Keep your user and listing ids with each check, so a moderator sees the history.
- Tell the person why. Say which rule the photo broke and how to fix it, such as "remove the phone number and upload again", and give them a way to appeal.
- Warn the other side. On a dating app or a marketplace chat, a short notice that moving to another app removes the platform's protection helps people who have already seen the photo.
- Keep a record. Store the check's id, the flag, its confidence and the action taken. It answers appeals and shows where scams come from.
How Detectivision handles it
Send the photo as a file, its URL or base64 to POST /api/v1/moderation with "type": "image_moderation". By default every image flag of your account is checked in the same call, such as sexual, violence, hate and scam.
The scam flag covers fraud and contact details written on the picture. Detectivision's image docs list what counts: a phone number in digits or written out in words; a WhatsApp, Telegram, Snapchat or Instagram handle; an e-mail address; an IBAN or a crypto wallet; fake giveaways or prizes; phishing QR codes or links; fake payment or bank screens; and get-rich-quick or investment promises.
curl https://api.detectivision.ai/api/v1/moderation \
-H "Api-Key: $DETECTIVISION_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "image_moderation",
"input": "https://example.com/listings/7731/1.jpg",
"mode": "detect",
"metadata": { "listingId": 7731, "sellerId": "s_204" }
}'{
"id": 7120,
"type": "image_moderation",
"mode": "detect",
"status": "completed",
"flagged": true,
"flags": [{ "flag": "scam", "confidence": 0.94 }],
"checked": ["hate", "scam", "sexual", "violence"],
"unchecked": [],
"tookMs": 412,
"usage": { "charged": 2, "remaining": 9998 },
"metadata": { "listingId": 7731, "sellerId": "s_204" }
}The answer says which flags the photo raised and how sure the check is. metadata comes back unchanged, so the result finds its listing and its seller. Values in the example are illustrative.
- Price. An image costs 1 credit when the answer comes by webhook (
"async": true) and 2 when you wait for it. One image is checked for every flag for that price (Credits and billing). - Imports and backlogs. Send listings already online with
"async": true: each result comes to your webhook, signed, with your metadata (Async requests). - Moderators. A moderator opens a check in the dashboard's Logs and takes one of your own actions, such as Hold or Ban. Your system gets it as a
moderation.actionwebhook and carries it out (Metadata and actions). - Images kept? No. An image is checked and not stored.
APIs that detect contact details in images
| API | What it finds in a picture's text | What comes back | Notes from its own pages |
|---|---|---|---|
| Detectivision | Phone numbers in digits or words; WhatsApp, Telegram, Snapchat and Instagram handles; e-mail addresses; IBANs; crypto wallets; plus fake payment screens, phishing QR codes and fake giveaways | The scam flag with a confidence, next to the image's other flags | One image check, 1 credit by webhook. Monthly plans with a free trial on Basic |
| Sightengine | E-mail addresses (including obfuscated ones), phone numbers, usernames, US social security numbers, IP addresses, links, social accounts, profanity | The category found and a text extract | Phone numbers are matched for the countries you pass in opt_countries; without it, the United States, France and the United Kingdom. Its page marks the text-content model as legacy and points to text-content-2.0. A separate redaction endpoint returns the image with phone numbers, e-mails, social accounts, links and QR codes pixelated |
| Hive | E-mails, phone numbers, addresses and other personal information, through OCR moderation | Text classes, and pattern matches with their position in the text | Text in an image goes to its text moderation in the same call. Its phone pattern matching covers US numbers and, of international numbers, India; its text models also have a Phone Numbers class. Its docs say text moderation requires an annual contract |
| Amazon Rekognition with Amazon Comprehend | Rekognition returns up to 100 words per image with their boxes; Comprehend finds PHONE, EMAIL, URL, USERNAME and INTERNATIONAL_BANK_ACCOUNT_NUMBER in text | Words and lines with boxes; PII entities with their offsets | Two services: Rekognition reads English, Arabic, Russian, German, French, Italian, Portuguese and Spanish words; Comprehend's PII detection reads English or Spanish text |
| Google Cloud | Vision's text detection extracts the text and word boxes; Sensitive Data Protection inspects images for info types such as PHONE_NUMBER and EMAIL_ADDRESS | Findings with their likelihood and boxes | Vision describes extraction only; Sensitive Data Protection also has a guide to redact sensitive data from images |
| Lasso Moderation | Contact information, watermarks and hidden text; phone numbers, e-mail addresses, home addresses and social media handles | Rules in its dashboard, and an API | Says it reads "200+ languages including CJK, Arabic, Cyrillic" |
Each company's facts are from its own pages, as read on 5 November 2026. Detectivision is not affiliated with any of these companies. Prices and models change: read each page before you choose, and test with your own photos, including numbers written in words and handles without an @ sign.
Start with your own photos
Pick fifty photos your moderators removed for contact details and fifty they approved, and send all of them through the dashboard's Playground or the API. Count how many of the removed ones raise scam and how many of the approved ones do, then set your line on the confidence. The marketplace and dating app pages show which flags to check at each place on those platforms.
Frequently asked
Can an API detect a phone number written on a photo?
Yes. Detectivision's image check raises its scam flag when a picture carries a way to reach someone: a phone number in digits or written out in words, a WhatsApp, Telegram, Snapchat or Instagram handle, an e-mail address, an IBAN or a crypto wallet. Sightengine, Hive and Lasso Moderation also publish text-in-image moderation for contact details.
Why do scammers put phone numbers in listing and profile photos?
To move the conversation to a messaging app, where your platform's payment protection, reports and moderation no longer reach. Text filters on titles and chat catch typed numbers, so the number moves into the picture.
Should I remove every image that has a phone number on it?
Only if your rules forbid contact details everywhere. If your platform allows them in some places, hold a flagged photo for a moderator, look at the seller's or member's history, and decide. Tell the person why their photo was held.
Does it catch fake payment screens and phishing QR codes too?
Yes. Detectivision's scam flag also covers fake payment or bank screens, fake giveaways and prizes, phishing QR codes or links, and get-rich-quick or investment promises in a picture.
How much does it cost to check a listing photo?
On Detectivision an image costs 1 credit when the answer comes by webhook and 2 when you wait for it. Every image flag is checked in the same call, so a photo is checked for nudity, violence, hate and scams for one price.
Can I check profile photos on a dating app the same way?
Yes. Send each profile photo and each photo sent in chat. A photo with a phone number or a messaging handle on it raises scam; if your app allows sharing contact details later in a match, treat the flag as a reason for review.
Check images for nudity and sexual content, violence, hate and scams, including contact details written on a photo. One API call per image, up to 10 MB.
Check listing photos, titles, descriptions, reviews and buyer messages for nudity, hate, violence and scam images, with one API.
Check profile photos, bios and chat messages on your dating app for nudity, harassment, hate and scams, in 12 languages, with one API.
Rekognition, Azure, Google Cloud, Hive, OpenAI, Sightengine, WebPurify and Detectivision side by side: what each checks, live streams, the price of an image.
Check every image when it is uploaded, then block, blur or hold it when it shows nudity or sexual content. Step by step, with the API call.
- Image moderation (docs): the scam flag and contact details written on a picture
- Image moderation API
- Metadata and actions (docs)
- Credits and billing (docs)
- Text Moderation in Images/Videos (text-content, marked as a legacy model)
- Image Redaction Tutorial
- Sightengine pricing
- OCR Moderation with Hive: New Approaches to Online Content Moderation
- Text Moderation - Overview (PII pattern matching, the Phone Numbers class, the annual contract)
- Detecting text (Amazon Rekognition Developer Guide)
- Detecting PII entities (Amazon Comprehend Developer Guide)
- Detect text in images (Cloud Vision API)
- Inspect images for sensitive data (Sensitive Data Protection)
- OCR moderation