# Universal Scraping API

### Basic Information

**Interface Description:**  Unlock target pages via a universal scraping API.

**Interface URL:** <https://universalapi.thordata.com/request>

**Request Method:** <mark style="color:green;">POST</mark>

### Request parameters

**Headers：**

<table><thead><tr><th width="130">Parameter name</th><th width="130">Type</th><th width="130">Required</th><th>Describe</th></tr></thead><tbody><tr><td><code>token</code></td><td>string</td><td>Yes</td><td>Please log in to the Please log in to the <a href="https://dashboard.thordata.com/account-settings">Dashboard-account-settings</a> to view your token.</td></tr></tbody></table>

**Body：**

<table><thead><tr><th width="152">Parameter</th><th width="130">Type</th><th width="130">Required</th><th width="358">Description</th></tr></thead><tbody><tr><td><code>url</code></td><td>string</td><td>Yes</td><td>The target URL to crawl . Supports custom search engine or webpage links.</td></tr><tr><td><code>js_render</code></td><td>string</td><td>No</td><td>Enables dynamic content rendering (e.g., SPAs, JavaScript-heavy sites). <strong>Recommended:</strong> Enable for modern websites.</td></tr><tr><td><code>type</code></td><td>string</td><td>No</td><td>Output format of crawled data. Options: <code>HTML</code> (default) or <code>PNG</code> (screenshot).</td></tr><tr><td><code>block_resources</code></td><td>string</td><td>No</td><td>Blocks non-essential resources (e.g., images, ads) to accelerate scraping speed.</td></tr><tr><td><code>country</code></td><td>string</td><td>No</td><td>ets proxy location for the request. Default: No proxy. Example: <code>us</code> for United States.</td></tr></tbody></table>

### Response example

```html
<html><head><meta name="color-scheme" content="light dark"><meta charset="utf-8"></head><body><pre>{
    "ip": "**.***.***.***",
    "city": "SantaClara",
    "region": "California",
    "country": "US",
    "loc": "**.3483,-**.9844",
    "org": "AS132203 Tencent Building, Kejizhongyi Avenue",
    "postal": "***",
    "asn": "AS132203",
    "timezone": "America/Los_Angeles"
}</pre><div class="json-formatter-container"></div></body></html>
```

| Parameter Name | Type   | Required |
| -------------- | ------ | -------- |
| `ip`           | string | yes      |
| `city`         | string | yes      |
| `region`       | string | yes      |
| `country`      | string | yes      |
| `loc`          | string | yes      |
| `org`          | string | yes      |
| `postal`       | string | yes      |
| `asn`          | string | yes      |
| `timezone`     | string | yes      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/interface-documentation/universal-scraping-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
