apyhub
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 and status_url, 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
http://localhost:8080/sharpapi/detect-urls
QUICKSTARTGUIDE

Quickstart

Submit text content to detect URLs in it.

curl -X POST "http://localhost:8080/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 job_id and status_url fields. job_id is a UUID for the submitted job, and status_url is the URI you can poll for status and results.

{
  "status_url": "https://apyhub.com/services/provider/sharpapi/api/v1/content/detect_urls/job/status/ea6ff234-1b4b-4b60-acf2-8343ec37aa02",
  "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 plus a status URL for polling.

Request Body

ParameterTypeMandatoryDescription
contentStringYesThe content from which URLs are to be detected.

Response

Returns a JSON object with two string fields: job_id and status_url. job_id is the unique identifier of the submitted job, and status_url is the URL used to poll for the job’s status and result.

ParameterTypeMandatoryDescription
job_idStringYesThe unique identifier of the submitted job. Format: UUID.
status_urlStringYesURL to poll for the job's status and result. 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. Use job_id to track the submitted job, and poll the returned status_url for updates.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
GET
URLs Detector - Check Job Status
http://localhost:8080/sharpapi/detect-urls/job/status/:job_id
QUICKSTARTGUIDE

Quickstart

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

curl -X GET "http://localhost:8080/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)

AttributeTypeMandatoryDescription
job_idStringYesThe 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.

ParameterTypeMandatoryDescription
dataObjectNoJob result wrapper. Contains id, type, and attributes.
data.idStringNoThe job identifier, formatted as a UUID.
data.typeStringNoThe response record type. The schema example value is api_job_result.
data.attributesObjectNoJob attributes, including type, status, and result.
data.attributes.typeStringNoThe job/result type. The schema example value is content_detect_urls.
data.attributes.statusENUMNoJob status. Allowed values: running, failed, queued, success.
data.attributes.resultObject ArrayNoDetected URL entries. Each item contains URL details.
data.attributes.result[].urlStringNoThe detected URL, including its scheme/protocol.
data.attributes.result[].protocolStringNoThe 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.

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.