Snipget.ai

Text extract urls

Exact
text_extract_urls

Deterministic and authoritative — the canonical answer for this input.

Pull all http/https URLs out of free text, in order of appearance. Trailing sentence punctuation is trimmed. Processing multiple inputs? Use `text_extract_urls_batch` to do up to 1000 in one call.

Parameters

valuestringrequired

The free text to extract values from.

Call it

curl -X POST https://api.snipget.ai/v1/text/extract/urls \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"value":"Docs at https://acme.com/start and https://acme.com/api."}'

The Batch tab sends up to 1000 inputs in one call via /v1/text/extract/urls/batch.

Example response

{
  "input": "Docs at https://acme.com/start and https://acme.com/api.",
  "is_valid": true,
  "values": [
    "https://acme.com/start",
    "https://acme.com/api"
  ],
  "count": 2
}

FAQ

What does this do?

It pulls every http and https web address out of a block of text, in order, and counts them. Handy for pulling links from a message, document, or pasted paragraph.

Does it find links without http, like www.acme.com?

No. It only matches full http:// and https:// URLs. Bare domains without the scheme are not captured.

Does it clean up trailing punctuation?

Yes. A period or comma at the end of a sentence is trimmed, so 'https://acme.com/api.' comes back as 'https://acme.com/api'.

Does it check that the links work?

No. It extracts the addresses as written; it does not visit them or confirm they load. That would need a separate request.

Is the result stable?

Yes. It is deterministic and authoritative: the same text always returns the same URLs in the same order.

Related tools