apyhub
Back
▣ DATA EXTRACTION · DEVELOPER TOOLS

URls Detector API

What it does

URL Detector finds web links in text and returns them in a structured job result. Send a content string, receive a job_id, then poll the status endpoint until the job finishes.

When the job succeeds, the result includes a data object with id, type, and attributes. Inside attributes, you get the job type, the final status, and a result array of detected URLs. Each item in that array includes the full url and its protocol, so you can separate https links from mailto, tel, ftp, and other schemes.

Use URL Detector when you need to pull links out of user-submitted text, support tickets, documents, or logs before saving them, validating them, or turning them into clickable references. It fits well in moderation pipelines, content ingestion jobs, and link audit workflows where you need the exact URLs rather than a broad text analysis.

The API is asynchronous, which makes it suitable for larger inputs and background processing. Check status for queued, running, failed, or success, then read the detected URLs from attributes.result once processing is complete.

▣ ENDPOINT 01 / 02
POST
URLs Detector - Submit Job
https://api.eu.apyhub.com/sharpapi/detect-urls

QUICKSTART

GUIDE

Quickstart

Submit text content to detect URLs in it.

curl -X POST "https://api.eu.apyhub.com/sharpapi/detect-urls" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Check out https://apyhub.com and https://docs.apyhub.com for more details."}'

What you'll get back

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

{
  "job_id": "ea6ff234-1b4b-4b60-acf2-8343ec37aa02"
}
TRY ITLIVE · 1000 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*
The content from which URLs are to be detected.

About this endpoint

What it does

Submits content for asynchronous URL detection and returns identifiers you can use to track the job's progress. The request body provides the text to scan, and the response returns a job identifier.

Request Body

ParameterTypeDescription
contentStringThe content from which URLs are to be detected.

Response

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

ParameterTypeDescription
job_idStringThe unique identifier of the submitted job. Format: UUID.

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. Use job_id to track the submitted job.

▣ ENDPOINT 02 / 02
GET
URLs Detector - Check Job Status
https://api.eu.apyhub.com/sharpapi/detect-urls/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a detect-urls job by its job ID.

curl -X GET "https://api.eu.apyhub.com/sharpapi/detect-urls/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object contains id and type, plus an attributes object with type, result, and status.

{
  "data": {
    "id": "2f3d9d3a-8c2d-4f2e-9c7f-3a1b2c4d5e6f",
    "type": "api_job_result",
    "attributes": {
      "type": "content_detect_urls",
      "result": [
        {
          "url": "https://example.com",
          "protocol": "https"
        }
      ],
      "status": "success"
    }
  }
}
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

Checks the status of an asynchronous URL-detection job by job ID and returns the job record, including its current status and any detected URL results when available.

Path Parameter(s)

AttributeTypeDescription
job_idStringThe job identifier, formatted as a UUID.

Response

Returns a JSON object with a data object field. data contains the job id string, type string, and an attributes object with type string, status string, and result array.

ParameterTypeDescription
dataObjectJob result wrapper. Contains id, type, and attributes.
data.idStringThe job identifier, formatted as a UUID.
data.typeStringThe response record type. The schema example value is api_job_result.
data.attributesObjectJob attributes, including type, status, and result.
data.attributes.typeStringThe job/result type. The schema example value is content_detect_urls.
data.attributes.statusENUMJob status. Allowed values: running, failed, queued, success.
data.attributes.resultObject ArrayDetected URL entries. Each item contains URL details.
data.attributes.result[].urlStringThe detected URL, including its scheme/protocol.
data.attributes.result[].protocolStringThe protocol/scheme of the detected URL, such as http, https, ftp, mailto, tel, or ssh.

Notes

Poll this endpoint with the job_id returned by the submit call. The status field cycles through transitional values (queued, running) before reaching a terminal state (success, failed). The result field is only populated once status is success; treat it as absent otherwise.

▣ 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.