x

Retrieving data from a site

Hello.

I wanted to ask you, is it possible to get the data written on a website?

I want to retrieve, for example, the text that is written in a text element from my test website.

Is there an endpoint that allows me to do this? And if there is, can you point me to it please. I've been searching for one and I didn't find anything related.

2,768 Views
Message 1 of 6
Report
1 Best Answer

Best Answer

Hello @Bala

Unfortunately, we currently do not support the ability to dynamically GET/POST/PUT Page content via the API (beyond the PATCH functionality with the `title` you highlighted earlier). We also do not support the functionality to GET the schema for a Form, or to modify submission data.

You would need to have two types of services to GET the information you're seeking, one that works with our API to locate the appropriate resources (pages with forms) and then a second service to GET (via `wget`, `cURL`, or other utility) the Page content (markup) and then to inspect that content for the form you want.

Of course, you wouldn't be able to modify that data, only retrieve the data, which might not be suitable for your specific use-case.

The only other alternative I could think of would be to build an app which provides the ability to manage custom forms, and to inject the form content into live sites on-demand (and then the data would live in your app's backend, so you could do as you choose with it). Of course, this could easily introduce security risks if not properly vetted, pen-tested, and vigorously maintained.

View Best Answer >

Tags (3)
2,713 Views
Message 4 of 6
Report
5 REPLIES 5

Weebly does not currently support retriving page content via the API, but rather the metadata about the page using the Pages API.

Once you have the `page_url` for a given page, you could have a backend service request the page content if you need to inspect that dynamically.

Does this answer your question?

Tags (3)
2,738 Views
Message 2 of 6
Report

It answers a part of my question.

I want to be able to modify or add new data based on the data I retrieved from the url of the page. But I only saw that you can modify the title. Is there a way to work around it?

Also, is there a way to get the model of a form? I want to get the questions and the answers from a form and also be able to change the data or create new data. I know you can get the forms that were submited, but I am intrested in the content that is on the site of the user.

Do you think that in the future there would exist the capabilities to extract/change the content of a site?

2,728 Views
Message 3 of 6
Report

Best Answer

Hello @Bala

Unfortunately, we currently do not support the ability to dynamically GET/POST/PUT Page content via the API (beyond the PATCH functionality with the `title` you highlighted earlier). We also do not support the functionality to GET the schema for a Form, or to modify submission data.

You would need to have two types of services to GET the information you're seeking, one that works with our API to locate the appropriate resources (pages with forms) and then a second service to GET (via `wget`, `cURL`, or other utility) the Page content (markup) and then to inspect that content for the form you want.

Of course, you wouldn't be able to modify that data, only retrieve the data, which might not be suitable for your specific use-case.

The only other alternative I could think of would be to build an app which provides the ability to manage custom forms, and to inject the form content into live sites on-demand (and then the data would live in your app's backend, so you could do as you choose with it). Of course, this could easily introduce security risks if not properly vetted, pen-tested, and vigorously maintained.

Tags (3)
2,714 Views
Message 4 of 6
Report

Thank you very much for the quick answers and sorry for the continuous bother I gave you.

Have a wonderful Christmas and a good New Year.

Cheers.

2,706 Views
Message 5 of 6
Report

You're welcome.

Did you receive the information you needed to continue development?

2,505 Views
Message 6 of 6
Report