참고소스 수정본
This commit is contained in:
38
참고/firecrawl-main/apps/api/requests/branding.requests.http
Normal file
38
참고/firecrawl-main/apps/api/requests/branding.requests.http
Normal file
@@ -0,0 +1,38 @@
|
||||
### Test 1: Firecrawl, SVG logo, bright colors, light theme
|
||||
# @name brandingTest1
|
||||
POST http://localhost:3002/v2/scrape
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"url": "https://firecrawl.dev",
|
||||
"formats": [
|
||||
{ "type": "branding" }
|
||||
]
|
||||
}
|
||||
|
||||
### Test 2: Supabase, dark mode, dark colors, png logo
|
||||
# @name brandingTest2
|
||||
POST http://localhost:3002/v2/scrape
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"url": "https://supabase.com",
|
||||
"formats": [
|
||||
{ "type": "branding" }
|
||||
]
|
||||
}
|
||||
|
||||
### Test 3: Vercel, light mode, light colors, svg logo
|
||||
# @name brandingTest3
|
||||
POST http://localhost:3002/v2/scrape
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"url": "https://vercel.com",
|
||||
"formats": [
|
||||
{ "type": "branding" }
|
||||
]
|
||||
}
|
||||
91
참고/firecrawl-main/apps/api/requests/v2/browser.requests.http
Normal file
91
참고/firecrawl-main/apps/api/requests/v2/browser.requests.http
Normal file
@@ -0,0 +1,91 @@
|
||||
# Pick your baseUrl here:
|
||||
# @baseUrl = http://localhost:3002
|
||||
@baseUrl = https://api.firecrawl.dev
|
||||
|
||||
### Create Browser Session (defaults)
|
||||
POST {{baseUrl}}/v2/browser HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{}
|
||||
|
||||
### Create Browser Session (with options)
|
||||
POST {{baseUrl}}/v2/browser HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"ttlTotal": 600,
|
||||
"ttlWithoutActivity": 120,
|
||||
"streamWebView": false
|
||||
}
|
||||
|
||||
### Create Browser Session (with webview streaming)
|
||||
POST {{baseUrl}}/v2/browser HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"ttlTotal": 300,
|
||||
"streamWebView": true
|
||||
}
|
||||
|
||||
### List Browser Sessions (all)
|
||||
GET {{baseUrl}}/v2/browser HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
|
||||
### List Browser Sessions (active only)
|
||||
GET {{baseUrl}}/v2/browser?status=active HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
|
||||
### Execute Code (Python) — replace sessionId with actual id from create response
|
||||
@sessionId = {{}}
|
||||
|
||||
POST {{baseUrl}}/v2/browser/{{sessionId}}/execute HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"code": "await page.goto(\"https://example.com\")\nprint(await page.title())",
|
||||
"language": "python"
|
||||
}
|
||||
|
||||
|
||||
### Execute Code (JS) — replace sessionId with actual id
|
||||
POST {{baseUrl}}/v2/browser/{{sessionId}}/execute HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"code": "await page.goto('https://example.com');\nconst title = await page.title();\nconsole.log(title);",
|
||||
"language": "js"
|
||||
}
|
||||
|
||||
### Execute Code — screenshot to base64
|
||||
POST {{baseUrl}}/v2/browser/{{sessionId}}/execute HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"code": "await page.goto(\"https://example.com\")\nscreenshot = await page.screenshot()\nimport base64\nprint(base64.b64encode(screenshot).decode()[:100])",
|
||||
"language": "python"
|
||||
}
|
||||
|
||||
### Execute Code — extract page content
|
||||
POST {{baseUrl}}/v2/browser/{{sessionId}}/execute HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"code": "await page.goto(\"https://news.ycombinator.com\")\ntitles = await page.query_selector_all(\".titleline > a\")\nfor t in titles[:5]:\n print(await t.inner_text())",
|
||||
"language": "python"
|
||||
}
|
||||
|
||||
### Delete Browser Session — replace sessionId with actual id
|
||||
DELETE {{baseUrl}}/v2/browser/{{sessionId}} HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
|
||||
### WebSocket — webview stream (use a WS client, e.g. wscat)
|
||||
# wscat -c "ws://localhost:3002/v2/browser/{{sessionId}}" -H "Authorization: Bearer YOUR_API_KEY"
|
||||
57
참고/firecrawl-main/apps/api/requests/v2/crawl.requests.http
Normal file
57
참고/firecrawl-main/apps/api/requests/v2/crawl.requests.http
Normal file
@@ -0,0 +1,57 @@
|
||||
# Pick your baseUrl here:
|
||||
@baseUrl = http://localhost:3002
|
||||
# @baseUrl = https://api.firecrawl.dev
|
||||
|
||||
|
||||
### Crawl
|
||||
# @name crawl
|
||||
POST {{baseUrl}}/v2/crawl HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://firecrawl.dev",
|
||||
"prompt": "only get me the blog posts"
|
||||
}
|
||||
|
||||
|
||||
### Crawl Parameters Preview
|
||||
# @name crawlParamsPreview
|
||||
POST {{baseUrl}}/v2/crawl/params-preview HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://firecrawl.dev",
|
||||
"prompt": "only get me the blog and news posts"
|
||||
}
|
||||
|
||||
# Expected response:
|
||||
# {
|
||||
# "success": true,
|
||||
# "data": {
|
||||
# "url": "https://firecrawl.dev",
|
||||
# "includePaths": ["blog", "news"],
|
||||
# "excludePaths": [],
|
||||
# "limit": 50,
|
||||
# "maxDepth": 2
|
||||
# }
|
||||
# }
|
||||
|
||||
### Crawl with Generated Parameters
|
||||
# @name crawlWithParams
|
||||
POST {{baseUrl}}/v2/crawl HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://firecrawl.dev",
|
||||
"includePaths": ["blog", "news"]
|
||||
}
|
||||
|
||||
|
||||
### Active Crawls
|
||||
# @name activeCrawls
|
||||
GET {{baseUrl}}/v2/crawl/active HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
30
참고/firecrawl-main/apps/api/requests/v2/map.requests.http
Normal file
30
참고/firecrawl-main/apps/api/requests/v2/map.requests.http
Normal file
@@ -0,0 +1,30 @@
|
||||
# Pick your baseUrl here:
|
||||
@baseUrl = http://localhost:3002
|
||||
# @baseUrl = https://api.firecrawl.dev
|
||||
|
||||
|
||||
### Crawl
|
||||
# @name crawl
|
||||
POST {{baseUrl}}/v2/map HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://firecrawl.dev",
|
||||
"limit": 2
|
||||
}
|
||||
|
||||
# {
|
||||
# "web": [
|
||||
# {
|
||||
# "url": "https://firecrawl.dev",
|
||||
# "title": "Firecrawl",
|
||||
# "description": "Firecrawl is a platform for crawling and mapping websites."
|
||||
# },
|
||||
# {
|
||||
# "url": "https://firecrawl.dev/blog",
|
||||
# "title": "Firecrawl Blog",
|
||||
# "description": "Firecrawl Blog is a blog about Firecrawl."
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
58
참고/firecrawl-main/apps/api/requests/v2/scrape.requests.http
Normal file
58
참고/firecrawl-main/apps/api/requests/v2/scrape.requests.http
Normal file
@@ -0,0 +1,58 @@
|
||||
# Pick your baseUrl here:
|
||||
@baseUrl = http://localhost:3002
|
||||
# @baseUrl = https://api.firecrawl.dev
|
||||
|
||||
### Summary
|
||||
POST {{baseUrl}}/v2/scrape HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://docs.firecrawl.dev",
|
||||
"formats": ["summary"]
|
||||
}
|
||||
|
||||
### JSON
|
||||
POST {{baseUrl}}/v2/scrape HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://docs.firecrawl.dev",
|
||||
"formats": [{
|
||||
"type": "json",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
### Change Tracking
|
||||
POST {{baseUrl}}/v2/scrape HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://docs.firecrawl.dev",
|
||||
"formats": [{
|
||||
"type": "changeTracking",
|
||||
"modes": ["git-diff"]
|
||||
}]
|
||||
}
|
||||
|
||||
### Parsers
|
||||
POST {{baseUrl}}/v2/scrape HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"url": "https://www.orimi.com/pdf-test.pdf",
|
||||
"parsers": {
|
||||
"pdf": false
|
||||
}
|
||||
}
|
||||
35
참고/firecrawl-main/apps/api/requests/v2/search.requests.http
Normal file
35
참고/firecrawl-main/apps/api/requests/v2/search.requests.http
Normal file
@@ -0,0 +1,35 @@
|
||||
# Pick your baseUrl here:
|
||||
@baseUrl = http://localhost:3002
|
||||
# @baseUrl = https://api.firecrawl.dev
|
||||
|
||||
|
||||
### Search - Simple string array format
|
||||
# @name searchSimple
|
||||
POST {{baseUrl}}/v2/search HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"query": "firecrawl",
|
||||
"sources": ["web", "images", "news"],
|
||||
"limit": 5
|
||||
}
|
||||
|
||||
### Search - Object array format (with custom parameters per source)
|
||||
# @name searchAdvanced
|
||||
POST {{baseUrl}}/v2/search HTTP/1.1
|
||||
Authorization: Bearer {{$dotenv TEST_API_KEY}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"query": "firecrawl",
|
||||
"sources": [
|
||||
{
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"type": "images"
|
||||
}
|
||||
],
|
||||
"limit": 5
|
||||
}
|
||||
Reference in New Issue
Block a user