REST API for managing Page watches, Group tags, and Notifications.
changedetection.io can be driven by its built in simple API, in the examples below you will also find curl command line examples to help you.
/api/v1/, so for example if you run changedetection.io locally on port 5000, then URL would be
http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history.https://<your login url>/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history
x-api-key: YOUR_API_KEY/api/v1/watch
Requires atleast `url` set, can accept the same structure as get single watch information to create.
curl http://localhost:5000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "nice list"}'
/api/v1/watch/:uuid
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Watch unique ID. |
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X DELETE -H"x-api-key:813031b16330fe25e3780cf0325daa45"
/api/v1/watch/:uuid
Updates an existing watch using JSON, accepts the same structure as returned in get single watch information
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Watch unique ID. |
Update (PUT)
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X PUT -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"url": "https://my-nice.com" , "tag": "new list"}'
/api/v1/watch/:uuid
Retrieve watch information and set muted/paused status
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Watch unique ID. |
| Name | Type | Required | Description |
|---|---|---|---|
recheck |
Boolean | Optional | Recheck this watch `recheck=1` |
paused |
String | Optional | =`paused` or =`unpaused` , Sets the PAUSED state |
muted |
String | Optional | =`muted` or =`unmuted` , Sets the MUTE NOTIFICATIONS state |
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091 -H"x-api-key:813031b16330fe25e3780cf0325daa45"
curl "http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091?muted=unmuted" -H"x-api-key:813031b16330fe25e3780cf0325daa45"
curl "http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091?paused=unpaused" -H"x-api-key:813031b16330fe25e3780cf0325daa45"
/api/v1/watch/<string:uuid>/history
Requires `uuid`, returns list
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json"
{
"1676649279": "/tmp/data/6a4b7d5c-fee4-4616-9f43-4ac97046b595/cb7e9be8258368262246910e6a2a4c30.txt",
"1677092785": "/tmp/data/6a4b7d5c-fee4-4616-9f43-4ac97046b595/e20db368d6fc633e34f559ff67bb4044.txt",
"1677103794": "/tmp/data/6a4b7d5c-fee4-4616-9f43-4ac97046b595/02efdd37dacdae96554a8cc85dc9c945.txt"
}
/api/v1/watch/<string:uuid>/history/<int:timestamp>
Requires watch `uuid` and `timestamp`. `timestamp` of "`latest`" for latest available snapshot, or use the list returned here
| Name | Type | Required | Description |
|---|---|---|---|
html |
String | Optional | Optional Set to =1 to return the last HTML (only stores last 2 snapshots, use `latest` as timestamp) |
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history/1677092977 -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json"
/api/v1/watch/<string:uuid>/favicon
Requires watch `uuid`
curl http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/favicon -H"x-api-key:813031b16330fe25e3780cf0325daa45"
/api/v1/watch
Return concise list of available watches and some very basic info
| Name | Type | Required | Description |
|---|---|---|---|
recheck_all |
String | Optional | Optional Set to =1 to force recheck of all watches |
tag |
String | Optional | Optional name of tag to limit results |
curl http://localhost:5000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45"
{
"6a4b7d5c-fee4-4616-9f43-4ac97046b595": {
"last_changed": 1677103794,
"last_checked": 1677103794,
"last_error": false,
"title": "",
"url": "http://www.quotationspage.com/random.php"
},
"e6f5fd5c-dbfe-468b-b8f3-f9d6ff5ad69b": {
"last_changed": 0,
"last_checked": 1676662819,
"last_error": false,
"title": "QuickLook",
"url": "https://github.com/QL-Win/QuickLook/tags"
}
}
/api/v1/watch
curl http://localhost:5000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"name": "Work related"}'
/api/v1/tag/:uuid
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Tag unique ID. |
curl http://localhost:5000/api/v1/tag/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X DELETE -H"x-api-key:813031b16330fe25e3780cf0325daa45"
/api/v1/tag/:uuid
Retrieve tag information, set notification_muted status, recheck all in tag.
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Tag unique ID. |
| Name | Type | Required | Description |
|---|---|---|---|
muted |
String | Optional | =`muted` or =`unmuted` , Sets the MUTE NOTIFICATIONS state |
recheck |
String | Optional | = True, Queue all watches with this tag for recheck |
/api/v1/tag/:uuid
Updates an existing tag using JSON
| Name | Type | Required | Description |
|---|---|---|---|
uuid |
uuid | Required | Tag unique ID. |
curl http://localhost:5000/api/v1/tag/cc0cfffa-f449-477b-83ea-0caafd1dc091 -X PUT -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"title": "New Tag Title"}'
"OK"
/api/v1/tags
Return list of available tags
curl http://localhost:5000/api/v1/tags -H"x-api-key:813031b16330fe25e3780cf0325daa45"
{
"cc0cfffa-f449-477b-83ea-0caafd1dc091": {
"title": "Tech News",
"notification_muted": false,
"date_created": 1677103794
},
"e6f5fd5c-dbfe-468b-b8f3-f9d6ff5ad69b": {
"title": "Shopping",
"notification_muted": true,
"date_created": 1676662819
}
}
/api/v1/import
Accepts a line-feed separated list of URLs to import, additionally with ?tag_uuids=(tag id), ?tag=(name), ?proxy={key}, ?dedupe=true (default true) one URL per line.
curl http://localhost:5000/api/v1/import --data-binary @list-of-sites.txt -H"x-api-key:8a111a21bc2f8f1dd9b9353bbd46049a"
/api/v1/notifications
Add one or more notification URLs from the configuration
curl http://localhost:5000/api/v1/notifications/batch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"notification_urls": ["url1", "url2"]}'
/api/v1/notifications
Deletes one or more notification URLs from the configuration
| Name | Type | Required | Description |
|---|---|---|---|
notification_urls |
String[] | Required | The notification URLs to delete. |
curl http://localhost:5000/api/v1/notifications -X DELETE -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"notification_urls": ["url1", "url2"]}'
/api/v1/notifications
Return the Notification URL List from the configuration
curl http://localhost:5000/api/v1/notifications -H"x-api-key:813031b16330fe25e3780cf0325daa45"
HTTP/1.0 200
{
'notification_urls': ["notification-urls-list"]
}
/api/v1/notifications
Replace all notification URLs with the provided list (can be empty)
curl -X PUT http://localhost:5000/api/v1/notifications -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: application/json" -d '{"notification_urls": ["url1", "url2"]}'
/api/v1/search
Search watches by URL or title text
| Name | Type | Required | Description |
|---|---|---|---|
q |
String | Required | Search query to match against watch URLs and titles |
tag |
String | Optional | Optional name of tag to limit results (name not UUID) |
partial |
String | Optional | Allow partial matching of URL query |
curl "http://localhost:5000/api/v1/search?q=https://example.com/page1" -H"x-api-key:813031b16330fe25e3780cf0325daa45"
curl "http://localhost:5000/api/v1/search?q=https://example.com/page1?tag=Favourites" -H"x-api-key:813031b16330fe25e3780cf0325daa45"
curl "http://localhost:5000/api/v1/search?q=https://example.com?partial=true" -H"x-api-key:813031b16330fe25e3780cf0325daa45"
/api/v1/systeminfo
Return some info about the current system state
curl http://localhost:5000/api/v1/systeminfo -H"x-api-key:813031b16330fe25e3780cf0325daa45"
HTTP/1.0 200
{
'queue_size': 10 ,
'overdue_watches': ["watch-uuid-list"],
'uptime': 38344.55,
'watch_count': 800,
'version': "0.40.1"
}