https://github.com/foo290/flat-webpage-api
given an url, will return json
https://github.com/foo290/flat-webpage-api
Last synced: about 1 year ago
JSON representation
given an url, will return json
- Host: GitHub
- URL: https://github.com/foo290/flat-webpage-api
- Owner: foo290
- License: mit
- Created: 2021-07-19T17:16:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-21T10:20:35.000Z (over 4 years ago)
- Last Synced: 2025-01-06T21:47:40.445Z (about 1 year ago)
- Language: Python
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flat-webpage-api
give a url, get a json
## API Request
**Endpoint:**
```
http://127.0.0.1:8000/api
```
**Request format**
```
{
"url": "any url here"
}
```
**Response format**
```
{
"title": "...",
"h1": [
...
],
"h2": [
...
]
...
}
```
### Example:
**Request**
```
{
"url": "https://en.wikipedia.org/wiki/Machine_learning"
}
```
**Response:**
```
HTTP 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"title": "Machine learning - Wikipedia",
"h1": [
"Machine learning"
],
"h2": [
"Contents",
"Overview[edit]",
"History and relationships to other fields[edit]",
...
],
"h3": [
"Artificial intelligence[edit]",
"Data mining[edit]",
"Optimization[edit]",
...
],
"h4": [
"Self learning[edit]",
"Feature learning[edit]",
"Sparse dictionary learning[edit]",
...
],
"h5": [],
"p": [
"Machine learning (ML) is the study of computer algorithms that improve
automatically through experience and by the use of data.[1]...
...
]
"a": [
{
"Jump to navigation": "#mw-head"
},
{
"Jump to search": "#searchInput"
},
{
"Machine Learning (journal)": "/wiki/Machine_Learning_(journal)"
},
...
]
}
```