Skip to main content

API quickstart

This workflow lists your recent reports, reads one report's overview and screenshot, searches for related history, and checks a URL's reputation.

Before you begin​

You need a urlquery API key. Store it in an environment variable rather than placing it directly in shell history or source code:

export URLQUERY_API_KEY='<API_KEY>'

All examples use the v2 API base URL:

https://api.urlquery.net/public/v2

This quickstart reads existing reports. To analyze a new URL, use the Submission API. You also need an API key; see get an API key.

1. List your recent reports​

curl --fail-with-body \
--header "x-apikey: ${URLQUERY_API_KEY}" \
"https://api.urlquery.net/public/v2/reports/recent?scope=user&limit=5"

Each item in data.items is a report overview. Pick a report_id. Other scopes are team for your team's reports, alerted for reports with alerts, and all for recent reports open to your account.

2. Read the overview​

export REPORT_ID='<REPORT_ID>'

curl --fail-with-body \
--header "x-apikey: ${URLQUERY_API_KEY}" \
"https://api.urlquery.net/public/v2/reports/${REPORT_ID}/overview"

Start with the overview. It shows the submitted and final URL, page title, target IP, tags, and alert counts. Fetch the full report at /public/v2/reports/${REPORT_ID} only when the investigation needs its evidence.

3. Download the screenshot​

curl --fail-with-body \
--header "x-apikey: ${URLQUERY_API_KEY}" \
--output screenshot.png \
"https://api.urlquery.net/public/v2/reports/${REPORT_ID}/screenshot"
curl --fail-with-body --get \
--header "x-apikey: ${URLQUERY_API_KEY}" \
--data-urlencode 'query=url.domain:example.com AND date:[2026-09-01 TO 2026-09-30]' \
--data-urlencode 'limit=25' \
https://api.urlquery.net/public/v2/reports/search

5. Check reputation​

curl --fail-with-body --request POST \
--header "x-apikey: ${URLQUERY_API_KEY}" \
--header 'content-type: application/json' \
--data '{"url":"https://example.com/"}' \
https://api.urlquery.net/public/v2/reputation/lookup

Continue the investigation​