apyhub
DATA VALIDATION · DEVELOPER TOOLS

Detect Phones Numbers API

What it does

Phone Number Detector finds phone numbers in text and returns the detected results asynchronously. Send a content string, get back a job_id and a status_url, then poll the job status endpoint until the job completes.

Use it when you need to scan user-generated text, notes, tickets, chat logs, or imported documents for phone numbers without building your own parsing logic. The submitted content is the only input for the detection job, so it fits cleanly into automated validation or enrichment workflows.

When the job finishes, the status response includes a data object with attributes.status and attributes.result. Each result item contains parsed_number and detected_number, letting you compare the normalized number with the original value that was found in the text.

Phone Number Detector is a good fit for contact cleanup, lead processing, compliance checks, and any workflow where phone numbers need to be identified from free-form text before further processing.

▣ ENDPOINT 01 / 02
POST
Submit Detect Phone Numbers job
http://localhost:8080/sharpapi/detect-phone-numbers
QUICKSTARTGUIDE

Quickstart

Submit text containing phone numbers to start an asynchronous detection job.

curl -X POST "http://localhost:8080/sharpapi/detect-phone-numbers" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Call me at +1 415 555 0134 or +44 20 7946 0958."}'

What you'll get back

Returns a JSON object with job_id and status_url fields. job_id is the submitted job's UUID, and status_url is the URL to check its status.

{
  "status_url": "https://apyhub.com/services/provider/sharpapi/api/v1/content/detect_phones/job/status/7cc14d8f-f0c6-4104-98c1-1f521a5f3438",
  "job_id": "7cc14d8f-f0c6-4104-98c1-1f521a5f3438"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Provide the content from where mobile number needs to be detected.

About this endpoint

What it does

Submits an asynchronous job to detect phone numbers from the provided content. The response returns the job identifier and a status URL so you can check progress later.

Request Body

ParameterTypeMandatoryDescription
contentStringYesProvide the content from where mobile number needs to be detected.

Response

Returns a JSON object with two required string fields: job_id and status_url. job_id is the identifier for the submitted asynchronous job, and status_url is the URL used to check the job status.

ParameterTypeMandatoryDescription
job_idStringYesIdentifier of the submitted asynchronous job. Format: UUID.
status_urlStringYesURL used to check the submitted job status. Format: URI.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job identifier from job_id.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
Get Detect Phone Numbers job status
http://localhost:8080/sharpapi/detect-phone-numbers/job/status/:job_id
QUICKSTARTGUIDE

Quickstart

Check the status of a phone-number detection job by its job ID.

curl -X GET "http://localhost:8080/sharpapi/detect-phone-numbers/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. Inside data, id and type are strings, and attributes is an object containing type (string), status (string), and result (an array of objects with parsed_number and detected_number strings).

{
  "data": {
    "id": "job_123",
    "type": "job",
    "attributes": {
      "type": "phone-number-detection",
      "status": "completed",
      "result": [
        {
          "parsed_number": "+14155552671",
          "detected_number": "+14155552671"
        }
      ]
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the current status of a Detect Phone Numbers job identified by job_id. The response includes a data object with the job identifier, job type, and an attributes object that contains the job status and any parsed phone-number results when available.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier, UUID format.

Response

Returns a JSON object with a data object. data contains the job id and type fields, plus an attributes object with its own type, status, and result fields.

AttributeTypeMandatoryDescription
dataObjectYesJob payload wrapper. Contains id, type, and attributes.
data.idStringYesJob identifier.
data.typeStringYesJob type.
data.attributesObjectYesJob attributes wrapper. Contains type, status, and result.
data.attributes.typeStringYesAttribute type.
data.attributes.statusStringYesJob status.
data.attributes.resultObject ArrayNoArray of detected phone-number result objects. Each item contains parsed_number and detected_number.
data.attributes.result[].parsed_numberStringNoParsed phone number.
data.attributes.result[].detected_numberStringNoDetected phone number.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.