Add a URL
Register web sources that should be crawled, cleaned, and indexed for retrieval.
Overview
URLs let you ingest external web content without uploading files. Each URL is crawled, normalized, and processed through the ingestion pipeline to extract text, generate chunks, and create vector embeddings. Submit multiple URLs in a single request for efficient batch ingestion.Authentication
Requires valid JWT token or session authentication. You must be the owner of the target corpus.Request Body
- Optimal: 5-20 URLs per request
- Maximum: Check your instance configuration (typically 50)
Example request
Response
Returns an array of URL objects (one for each submitted URL):null while processing.PRS- Processing (crawling and indexing in progress)IND- Indexed (content ready for queries)ERR- Error (crawling or processing failed)PND- Pending (queued for crawling)
Example Response
Important Notes
DELETE /api/data/urls/{id}/ immediately removes all derived chunks from the vector store. This action cannot be undone.Client examples
- Python
- TypeScript / JavaScript
- Java
Best Practices
Choosing URLs Wisely
Choosing URLs Wisely
- Documentation pages with stable content
- Knowledge base articles
- Blog posts and tutorials
- Product specifications
- API reference pages
- Dynamic pages with frequently changing content
- Pages behind authentication/paywalls
- JavaScript-heavy SPAs (content may not extract properly)
- Pages with primarily images/videos (limited text content)
- Auto-generated index pages with little content
Sitemap Scraping Strategy
Sitemap Scraping Strategy
scrape_sitemap: true strategically:When to enable:- Well-structured documentation sites
- Blog archives (when you want all posts)
- Product catalogs with many pages
- Knowledge bases with comprehensive sitemaps
- Sites with 100+ pages (submit sections instead)
- Frequently updated news sites (content becomes stale)
- Sites with dynamic pagination (submit specific URLs)
Handling Crawl Failures
Handling Crawl Failures
- Verify URL is correct and accessible
- Check if page was moved or deleted
- Try accessing in a browser first
- Page requires authentication
- Site blocks bots/crawlers
- Consider uploading content as file instead
- Page is too slow to load
- Server is experiencing issues
- Try again later or contact site admin
- JavaScript-heavy page (content not in initial HTML)
- Page has anti-scraping measures
- Consider using an alternative format (PDF, markdown)
Content Freshness
Content Freshness
- Delete the old URL resource
- Re-add the URL to fetch latest content
- Best for infrequently changing content
- Implement periodic refresh via API calls
- Delete and re-add URLs on a schedule
- Good for documentation that updates regularly
- Set up webhooks to trigger updates on content changes
- Requires integration with content management system
- Best for real-time accuracy requirements
Robots.txt Compliance
Robots.txt Compliance
robots.txt directives:- Crawlers follow site-specific rate limits
- Disallowed paths are not crawled
- User-agent identification:
SoarLabsBot
- Check the site’s
robots.txt - Verify your URLs aren’t disallowed
- Consider reaching out to site owner for permission
- Alternative: Upload content as files if you have access
Management Operations
List All URLs
List All URLs
page and page_size parameters.Update a URL
Update a URL
Refresh URL Content
Refresh URL Content
Delete URLs
Delete URLs
Crawling Performance
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
URL of the resource
200Corpora to which the Maps to
Canonical form of the URL - free of tracking parameters
200Whether to scrape the sitemap for additional URLs
Additional metadata for the URL
Response
The date and time the organization was created
Last updated time
PND- PendingIQE- In QueuePRS- ProcessingDEX- Data Extracted SuccessfullyDER- Data Extraction ErrorIND- IndexedCMP- CompletedERR- Error
PND, IQE, PRS, DEX, DER, IND, CMP, ERR URL of the resource
200Corpora to which the Maps to
Canonical form of the URL - free of tracking parameters
200Whether to scrape the sitemap for additional URLs
Additional metadata for the URL

