URL to JSON
Paste a URL and get the page back as JSON: its title, its main text, its dates, its email addresses and its links. It runs on the Extract API after sign-up, on the $10 of credit a new account gets, no card.
What the JSON holds
Every page comes back with the same fields, so your code reads one shape.
- title
- The page’s title.
- text
- The page’s main text as Markdown, with its headings, lists and links. Menus, banners and footers are left out.
- published, modified
- When the page says it was published and when it says it was last changed.
- emails
- Every email address the page carries, each with where the page carries it.
- links
- Each link the page prints, once, as a full address with its words. The API returns it when the request’s include names links.
- status
- ok when the page was read. Otherwise a reason in plain words, and the page is not charged.
- read_from
- Where the text was read: the live page, the site’s own API or feed, or a public web archive capture.
The same call from your code
The tool sends one request, POST /v1/extract. The playground shows the code of that request, and the same request runs from your program with an API key.
curl https://api.specstream.ai/v1/extract \ -H "Authorization: Bearer $SPECSTREAM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"urls": ["https://en.wikipedia.org/wiki/Narbonne"], "format": "markdown"}'
{
"data": {
"results": [
{
"url": "https://en.wikipedia.org/wiki/Narbonne",
"status": "ok",
"title": "Narbonne - Wikipedia",
"published": "2002-10-11T13:08:41+00:00",
"read_from": "live",
"text": "... ## Etymology\n\nThe etymology of the town's original name, **Narbo**, is lost in antiquity ..."
}
],
"took_ms": 441,
"price_usd": 0.0008
}
}URL to JSON questions
Something we didn't answer? Talk to a human
Is it free?
A new account gets $10 of credit with no card, and the tool runs on that credit. The Extract API costs $0.80 per 1,000 pages, and a page that gives no text is not charged.
Why do I sign up first?
The tool is the Extract API’s playground in the workspace. It runs on your account’s credit, so it opens after sign-up with your URL already in the box.
Can I set my own JSON fields?
No. Every page comes back with the same fields, the ones listed on this page. There is no schema of your own and no prompt.
How many URLs can one call read?
Up to 20 in one call.
Does it read PDFs?
Yes. It reads web pages and documents: PDF, Word, Excel and EPUB files, and images.
Turn a page into JSON
Sign up, paste a URL and read the reply. It runs on the credit a new account gets.