Loading
Loading
https://api.apifreaks.com/v1.0/scraping
$ pip install requestsimport requests
import json
url = "https://api.apifreaks.com/v1.0/scraping"
payload = json.dumps({
"instructions": []
})
headers = {
'Content-Type': 'application/json',
'X-apiKey': ''
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Click Test it to start the request and see the response here!
| Field | Type | Requirement | Description |
|---|---|---|---|
| extractedData | Object | Mandatory | Container for the values extracted by your scraping instructions. The returned keys depend on the names used inside the extract action. |
The extractedData object is instruction-driven. Common response shapes include the following fields:
| Field | Type | Requirement | Description |
|---|---|---|---|
| html | String | Optional | HTML content extracted from a selector or XPath when the extract instruction requests html output. |
| text | String | Optional | Plain text content extracted from a selector or XPath when the extract instruction requests text output. |
| <custom field> | String | Number | Boolean | Array | Object | Optional | Any custom key defined inside extract. The response type depends on the selector result and the structure of the extraction rule. |
| <custom array field> | Array<String> | Optional | Returned when an extract rule maps a field to multiple selectors, such as repeated rows, links, or name server values. |
Error responses can contain the following fields when scraping fails or the request is invalid:
| Field | Type | Requirement | Description |
|---|---|---|---|
| error | String | Mandatory | Human-readable error message describing the failure. |
| code | Integer | Optional | Numeric error code returned by the API when available. |
| details | Object | Optional | Additional context about invalid parameters, failed instructions, or provider-side processing issues. |